Code Monkey home page Code Monkey logo

Comments (9)

sedovsek avatar sedovsek commented on July 20, 2024

Dear @shmulim,

Would you mind sharing your index.html as well?

Best,
Robert.

from grunt-uncss.

shmulim avatar shmulim commented on July 20, 2024

Hi @sedovsek,

Unfortunately I can't share that without modification because I'm contract bound. Is there one particular part you'd like to share?

Thanks!

from grunt-uncss.

sedovsek avatar sedovsek commented on July 20, 2024

@shmulim, well as far as I can tell, the source of the issue is somewhere in your index.html file, not in your setup.
But I might be wrong.

from grunt-uncss.

shmulim avatar shmulim commented on July 20, 2024

@sedovsek,

I get the same error even from the most minimalistic index.html, such as this:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">

  <!-- build:css docs/tidy.css -->
  <link rel="stylesheet" href="css/stylesheet_example1.css">
  <link rel="stylesheet" href="css/stylesheet_example2.css">
  <link rel="stylesheet" href="css/stylesheet_example3.css">
  <link rel="stylesheet" href="css/stylesheet_example4.css">
  <link rel="stylesheet" href="css/stylesheet_example5.css">
  <link rel="stylesheet" href="css/stylesheet_example6.css">
  <!-- /build -->

  <script src="js/script_example1.js"></script>
  <script src="js/script_example2.js"></script>
  <script src="js/script_example3.js"></script>
  <script src="js/script_example4.js"></script>
  <script src="js/script_example5.js"></script>
  <script src="js/script_example6.js"></script>

</head>

<body>

</body>

</html> 

from grunt-uncss.

sedovsek avatar sedovsek commented on July 20, 2024

Have you looked at your CSS?
Looks like one of your selectors is "(http", which isn't valid CSS selector.

from grunt-uncss.

shmulim avatar shmulim commented on July 20, 2024

The only thing that I can think of is that in one of my stylesheets I'm pulling in a background from cloudinary using a url, but I don't have any http selectors "proper". I also have base64 in my CSS. That could be throwing off the parser. I don't know...

from grunt-uncss.

sedovsek avatar sedovsek commented on July 20, 2024

I've tried both (remote background images and base64 encoded files) and it works.
Please try to replicate the minimum code that causes problem.

from grunt-uncss.

giakki avatar giakki commented on July 20, 2024

We actually had a similar problem before (see uncss/uncss#3). The "SyntaxError: Unmatched selector" pops up when cheerio-select can't parse a CSS selector.
If you could find the line that contains "(http", and try to replicate it, I can look into it!

from grunt-uncss.

addyosmani avatar addyosmani commented on July 20, 2024

@shmulim could you re-post this issue upstream to https://github.com/giakki/uncss/issues? If we can debug it directly with uncss and solve the issue, grunt-uncss should be able to process it correctly.

from grunt-uncss.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.