SASS/Compass style checker [closed] - css

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
In a company where are work we're trying to automate build processes and testing and we've got all covered except for SASS/Compass style checker. Note that I'm not talking about checking for syntax errors, but about checking against some sort of style guide - indentation, spacing line-length, etc.
I've been searching for similar software for a while now but I'm either bad at searching or google doesn't have all the answers. Only condition is that it can be run from unix command line.
Any help or clue is more than welcome,
Thanks

I think SCSS-Lint does what you are looking for.

Do you really need to control the input scss or sass files, or just the output?
If you are after layout control of the Compass produced stylesheets (in other words - the end result), and if you run compass with ruby, you can choose the "output_style" in the config.rb file from the following:-
:expanded or :nested or :compact or :compressed
I mostly use :compact which removes all the tab vs spaces and newline issues, while keeping the file easily readable.
As for style checking the original scss or sass files, I have not seen anything in my travels other than EditorConfig as #steveax commented.
I would have just commented on this one, but not enough points yet :( Hope this helps.

Related

Is there any tool for auto maintaining css code [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I have a huge CSS file which should be about 20'000 lines and it was accidentally saved on one line a while ago, making it extremely hard to read and maintain.
I was looking for a tool that would automatically separate lines of CSS files, but I am finding it difficult as I can't find an English definition describing what I'm after. Does anyone know any tool that would do that? I'm sure that such a tool exists somewhere.
It would help me a lot. Thanks.
As well as using SO's inbuilt feature, you could try looking at CSS Beautifiers.
Such as http://codebeautify.org/
Most of these work with other languages too! Hope this helps
Just use stackoverflow's code snippet tool (looks like [<>]) and click tidy...
Use a splitter, replace system such as
FIND: "; "
REPLACE ";
"
because the ; is the line end for CSS code so this would break all the code-lines into new lines, leaving only the brackets.
So then run the Find/Replace routine again to then add linebreaks outside the } characters.
FIND "}"
REPLACE: "}
";

Code Analysis for CSS [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm looking for automated tools to help me refactor a bunch of CSS files, for example:
Remove unnecessary selectors (e.g. not used inside the page)
detect repeatable rules inside several selectors and suggest a merge
Are there any such tools?
Thanks!
Yes Google Page Speed does this CSS investigation. Link:
http://code.google.com/speed/page-speed/docs/overview.html
not totally automated, but this one works well.
I like the fact that I can see what I'm changing. While I've done UI for 15 years, there's always little things that I notice myself repeating via using this tool. In the long run, doing things a bit manually is going to make me a better developer.
Doing one that looks for unnecessary selectors is a dangerous game. You could do it, but if you ever find yourself doing dynamic and/or ajax injected divs, you'll immediately blow up your page or app using an automated tool. If you do it, make sure it's not something that works on the fly, without some sort of very good testing environment to verify the resulting output. My current corporate clients would never allow me to use any sort of point-of-request tool based on their requirements of 100% tested and verified CSS.
This tool can do automatic css refactoring, though its value in project still need to evaluate carefully.

Any programs to generate css classes from your html? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Just curious does anyone know a program or script to generate a style sheet(with blank values obviously) from the structure of your html document? Basically just pull out the ID's and Classes you set in your html and make placeholder css so you don't have to plan it ahead of time or write it again ,remember D.R.Y. anyone?:) Feel free to yell at me if you don't think this could help anyone else here :D . I'm sure I could whip something up like that but if it's already out there I might as well stick to my rule of DRABEE(Don't repeat any body else either) . Thanks.
Did you check http://primercss.com/ ?
Seems to be doing exactly what you are asking for.
CSS Frame Generator http://lab.xms.pl/css-generator/ works better than Primer.
Little late to the party but these days, there is also BearCSS:
http://www.bearcss.com/
Disclaimer
This answer is primarily meant to add extra value to this thread and create an overview of CSS generators.
In my opinion, after trying all the mentioned tools in this thread, http://lab.xms.pl/css-generator/ is the best one.
I found the best tools out there, after rigorous comparisons of the different available ones:
If you want to generate CSS automatically from the markup online for free, then you need BeeCSS - CSS Generator:
http://beecss.theextremewebdesigns.com/
If you already have (messy) CSS & you would like to clean/minify it online for free, then you need BeeCSS - Cleaner Minifier
http://beecss.theextremewebdesigns.com/css_clean_css_minify/

CSS editor recognize and index comments? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
A web page is usually consist of several areas, header, content, sidebar, footer, and can be more detailed, navigation, logo, slider, widgets...
I use comments to mark these areas in css file, as many others do. And used to scrolling or by search to locate the area while editing the css, it is slow and inconvenient especially when css file grows big.
Is there a css editor can recognize comments and produce an index table for quickly jump from one to another?
Netbeans has CSS selector jump support.
It indexes the CSS file you're working with and lets you choose which selector you want to jump to.
When you're editing HTML you can CTRL+click on the class or id to jump to the CSS rule that styles it (if there are several you get a list).
Here's an example:
Unfortunately, these Netbeans features will completely ignore your comments. I haven't come across a tool that does exactly what you're describing for CSS files.
If you were using a programming language you would probably use Javadoc-style comments, but these aren't typically used in CSS. You may be able to find a tool that will parse them and build an index anyway, but I'm afraid I can't suggest one.
Why not using separate css-files and then glue them in one file with ant? If you are using Eclipse - ant is already there. Or you can use ant as a command line tool.
Try it. You can perform other tasks with ant. For example you can minimize your .css or .js files as well.

Tool to Convert External CSS to Inline CSS in Ruby? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I am messing around with GoogleDocs and it has very very primitive CSS support. If you upload an MSWord .doc or an HTML file and export it as HTML, all styles are applied inline. They have a style block in the html file, but when you upload the HTML file back to google docs, it doesn't apply any non-inline styles.
So I was thinking "maybe there's a ruby tool for this". Is there anything out there I could use to take some CSS and have it parse it into the HTML nodes, maybe some nokogiri plugin?
Check out alexdunae's Premailer on GitHub:
http://github.com/alexdunae/premailer
Never tried it by myself, just stumbled upon. Maybe it helps.
MailStyle is another solution: http://github.com/purify/mail_style
Looks like it has easy rails integration (actionmailer, sass), but I'm not sure that's what you are/were looking for.
Ruby Toolbox has a list of even more options. Premailer is the most used, though Roadie has been updated more recently.

Resources