How to split a single line CSS file for readability? [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 7 years ago.
Improve this question
This is hardly a programming question but I am dealing with a 3rd party CSS file that I would like to examine but it is all one line. I tried both the Sublime 2 text editor and Eclipse CSS editor but neither would split the file contents into style blocks easily consumable by the naked eye.
What are some tools that can split a single line CSS file into multi line style blocks for readability?

Download and install the code editor Brackets. (It's free)
http://brackets.io/
Once installed, open it and go to File->Extension Manger.
Search for and install "Beautify".
Once the extension is installed, close and re-open Brackets.
Now open the minified css file in Brackets and go to Edit->Beautify or press Cmd-Shift-L(Mac) / Ctrl-Shift-L(Win) key.
The css file should now be beautified and easy to read.

I have found "HTML, CSS & JavaScript Minifier/Maxifier" as a very useful on-line tool to split minified CSS contents into style blocks. Here is the link to the site.
<http://codepen.io/depthdev/pen/HKuLs>
The same tool could be used to split minified JavaScript and HTML files. And it could be used to minify HTML, CSS and JavaScript as well.

There are many different code "beautifiers" This SO question (Sublime Text 2 Code Formatting) and subsequent answers should give you a good start.
Many people who saw that post found this answer to be helpful. Basically what Sergio Morlán said is that there is a built in option in Sublime Text that can be found in Edit->Line->Reindent.
Other answers to the question include using HTML Prettify, and Sublime CodeFormatter.

SynWrite editor (free, Windows). Go to Options/AddonsManager/Install, type "css format" and install item "CSS format".
After opening css file, call menuitem "Plugins/ CSS Format".

Related

CSS plagiarism checker [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 sell a theme for a well known php web script. The theme that I sell is only CSS, I wrote this CSS code and it's about 700 lines of code.
I'm starting to get the suspicion that people are illegally using my theme so my question is, is there a website where I can paste my CSS code and it will check other websites for the same CSS code?
For example, the website CopyScape.com will check websites for matching content, but not CSS.
If anyone can help, it would be great. Thanks!
The ability to search multiple websites for matching or similar code, is a little slow and can be faulted easily.. Say for example, if the css file is generated using PHP and is only visible on a valid / active session..
This would mask the use and ability for someone like google to index it anyway..
Generally people use callback type methods, Say for example... Some where hidden or hard to find... you would have a simple 1 pixel image that is actually a direct/absolute URL to your webserver.
When the image is requested, you have a server side language like PHP grab the requesting URL and log that while still returning the correct 1 pixel image so to them it does not seem obvious what is happening.
As long as somewhere in your template you have a link/script/image/iframe or some other means of requesting a file.. You can catch a few of these people easily..

SASS/Compass style checker [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 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.

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.

Css editor with certain features [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 need a light css editor with certain functions. Already downloaded and tried a few apps but still no luck, none of them fit my requirements. Actually, there is one, CssEdit (or TextMate), but unfortunately i'm a windows user...
Already tried:
built-in NetBeans IDE css editor (btw nice editor, the one i'm using now for css)
IntelJ IDE (very good html and css editor, but using the entire ide just for this - that's crazy)
ArduoCss (very buggy in win7 environment)
Notepad
Notepad++ (it rules, but as i said, i need something more functional for css editing)
Style Master ( if i don't find anything else, probably i'll choose this one)
Stylizer ( also might be my choice, but it's black interface kills me, also extremy noob-oriented, i even couldn't find a way to see the source code)
Some of the features i am looking for:
grouping by comments like here
snippets
autocomplete,
if i type for instance f-s, it should recognize and expand it to "font-size" property
color picker
The editor must have at least the first feature that i listed above.
Sorry for my poor english.
This is the closest thing to TextMate on the windows platform that I know of:
http://www.e-texteditor.com/
Check out TopStyle v4 - excellent Windows CSS (and HTML) editor. Great product, well worth its registration price.
Have a look at Zen Coding. It's a plug-in for several diferent editors adding helpful functionality for CSS (and HTML) coding.
http://code.google.com/p/zen-coding/
You can switch Stylizer's black interface to the white interface with CTRL + F10. Also, the Stylizer philosophy is setup differently that you don't need to see the "source code"...it's interface is just a graphical representation of the source code.

Resources