tags:

views:

38

answers:

2

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?

+2  A: 

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:

Netbeans CSS Navigator

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.

banzaimonkey
A: 

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.

angryobject