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.
Related
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 working on a right way to conduct the styling for a rather big website project, as I get usually stuck half-way, when the complexity increases. I already read quite some literature and found a lot of useful tips on the Internet, e.g. "use meaningful class names", and the like.
However, most sources are concerned with the actual working principle of CSS which are illustrated by rather short code examples. What I am actually looking for is a guide describing the styling of a website from start to end, including possible naming conventions, class management, file management and the like. Really great would also be a code example of medium-sized, or big site.
I am also grateful for any reference to books, magazines, articles and the like.
As I am not aware of any reference to book, I just follow basic things which makes my work quite smooth. Yes meaningful class names are must with that Try following the below which might help you
Keep the code clean and neat which is indenting the code before you wrap up for the day
Divide your css into part (Place the code of header and footer in one files Ex:base.css and the body part in another css Ex:main.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
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..
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 would really like to learn how to use Twitter Bootstrap 3. The problem is that it seems I can't find a good source to learn it from. Any source I've tried so far assumed that you somehow have some knowledge and wasn't explaining what are the available classes for elements, what are the classes they have used are actually doing etc.
I simply want a source it can either be a book/videos or w/e that will start from scratch and if possible, will use HTML5, modernizr and respond.js to make it cross-browser supported and actually give me a start point (base folder just like H5BP) which I can then later on start building my own websites.
Thanks in advance!
The bootstrap docs are really helpful, probably the best resource.
http://getbootstrap.com/getting-started/
http://getbootstrap.com/components
My first recommendation is to learn CSS in depth. Oftentimes, Bootstrap is just not necessary, but developers rely on it because they are too lazy to master CSS fundamentals. You are welcome to check my book series - Functional CSS - which covers almost the entirety of CSS using practical examples.
If you are keen on sticking with Bootstrap, then you can 1) print the source code for their example (Bootstrap examples) and simply re-implement them on your own, typing each block of code one line at a time and observing the effect, and 2) read the Bootstrap source code. The latter is a bit over 6000 lines and should not take long to go through. And, 3) reflecting on what you have learned in 1 and 2, create personal realistic website that uses Bootstrap.
If you are looking for a good source here is one: http://ieatcss.com/twitter-bootstrap-tutorial.html
3 Step by step real time examples are used in Ieatcss bootstrap 3 tutorial. You can easily understand them without any knowledge of the basics.
Don't worry about learning CSS & other messy things. The tutorials in http://ieatcss.com is targeted at complete beginners, you can easily understand them.
Regards,
Hussain.
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/
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.