Comments (24)
@hallodom csscss doesn't currently support less. I'm not sure if it will. Less depends on node.js and I don't have a great idea on how to resolve that dependency chain. Sass was an easy win since that was already in ruby.
Hopefully running against the css result will be good enough. It will also download the css from http if that helps.
That said, I'd welcome some pull requests or ideas on how to add less support without it becoming an installation or maintenance burden.
from csscss.
Hey thanks for the response. Shame it doesn't support less, a lot of tools are missing around Less like this. If I had more experience with node I'd be sure to give it a go but unfortunately have only briefly played with it.
Great tool though! Still helps on the outputted css but doesn't have much luck on minified CSS files where all selectors are on one line, get the following error:
Had a problem parsing the css at line: 1, column: 1
Run with CSSCSS_DEBUG=true for verbose parser errors
from csscss.
^ Actually just tried it on another single line minified css file and it worked :/ must be something up with my CSS!
from csscss.
@hallodom it could still be a bug in the parser. If it is good in a validator please send me a snippet that csscss breaks on so I can fix it.
from csscss.
Hi, I ran both the one which worked and the one which didn't work in the validator and they both fail but one worked in csscss and the other didn't:
This one worked in csscss:
http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fwww.landofjoy.co.uk%2Fwp-content%2Fthemes%2Flandofjoy%2Fstyle.css&profile=css3&usermedium=all&warning=1&vextwarning=&lang=en
from csscss.
Sorry I can't be of much more help
from csscss.
Looks like the issue is with css expressions.
.icon-glass{*zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = ' ')}
This is the first I've seen css expressions. Sounds like they were only available in IE versions up to 8, so I won't extend the parser for them.
from csscss.
Cool, that's from Font Awesome stuff.
http://fortawesome.github.io/Font-Awesome/#icon/icon-glass
from csscss.
Thanks for taking a look!
from csscss.
i have see this http://rubygems.org/gems/less can be help for resolve this issues?
from csscss.
@Mte90 Oh thanks. I didn't see that. Perhaps I can use it in the same way I'm using sass and compass. Thanks for pointing it out!
from csscss.
+1 for less support.
from csscss.
IMHO it's better to run it against the final CSS file. I have 14 different .less files in the project that I'm currently working on and running csscss against them would be such a hassle.
from csscss.
I assumed that csscss would be smart enough to figure out the imports and tell you what duplicates are in which less files?? Haven't tried it with Sass so not sure if it works this way.
from csscss.
@creativityhurts @hallodom I'll experiment with hitting the LESS preprocessor first. In theory you should be able to pass csscss multiple files but I think I found an issue with that in #16
from csscss.
@creativityhurts With the final result you would again have the problem that sourcemaps try to solve. You get an error in a file, but do not know which file (and line) is really references.
from csscss.
+1 LESS support as well.
from csscss.
For what it's worth, source maps will also be an issue for displaying line numbers which has been a recurring request.
Is LESS much like SASS in that it translates source files into a 1:1 css file? (ignoring included partials stuff). It might still straightforward to implement, but yeah the line numbers are going to be awkward. Reminds me of debugging a javascript error in the browser and having to flip back to the coffeescript source.
from csscss.
Indeed. And my current workflow is to segment out classes by sections; in other words the same class might appear three or more times in the same LESS file: In positioning section, typography section and presentation section. I could see how line number references would make this more valuable to me. Once the LESS is minified, it compiles all classes and mixins - making the line numbering obsolete.
from csscss.
I just added LESS support and sent Zach a pull request. Feel free to give it a whirl. It would be great to get some some real world testing to know if this works for you guys.
- cheers
from csscss.
All set in master and will go out in the next release. Thanks @mekka!
from csscss.
Released in v1.2.0
from csscss.
Awesome thanks @mekka!
from csscss.
Thank you. I'll try it as soon as possible.
from csscss.
Related Issues (20)
- Terminology HOT 4
- Unable to install HOT 4
- "command not found: csscss" HOT 3
- Include SASS files from the cli HOT 7
- fail on import of Compass plugin HOT 3
- Don't know what to do with "@keyframes" HOT 2
- Line numbers HOT 1
- less @import statements with relative paths fail HOT 1
- undefined method `downcase' HOT 8
- csscss has problems with unicode even when ruby version is 2.0 HOT 1
- Add Gulp extension to community extensions HOT 1
- http://connectionrequired.com/ is down HOT 1
- csscss hanging/giving no output HOT 2
- No check for duplicate selector HOT 1
- Duplicate CSS selectors not returned int result HOT 1
- Multiple Rulesets with exact same Selector HOT 1
- Community extension: csscssbeauty
- Comments/charset declarations are included in selectors
- charset followed by comment with code inside raises error
- Requirement of saas Gem
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from csscss.