jacobrask / styledocco

Automatically generate a style guide from your stylesheets.
http://jacobrask.github.com/styledocco/
MIT License
1.07k stars 119 forks source link

Order of Stylesheets to be processed #56

Open rmdort opened 12 years ago

rmdort commented 12 years ago

How do you set the order in which the style sheets to be processed? Right now its alphabetical

jdelight commented 11 years ago

Firstly thanks for this tool - it's really great!

I'd like to 'bump' this ordering issue! Ideally when using the --include option I would like 2 things to happen:

1) the order of files you specify is carried over to the preview 2) the included files appear before the css being documented

For example if I do this: styledocco --include bootstrap.css /my-css/module.css Then at the moment it seems like bootstrap is added after the css from module and therefore overrides it.

I may be wrong but that seems to be happening in my tests.

marrs commented 11 years ago

I think this should happen as well. I'm wondering if it would be better to do this in the style sheet's doc block though. A user of the tool might forget to --include all dependencies, or he might include them in the wrong order. I prefer the idea of the parser getting dependencies from the doc block and Styledocco including them automatically.

For example:

/*
Standard font
@requires normalize.css
@requires fonts.css
    <p>The quick brown fox</p>
*/
p {
  font-family: "my custom font";
  font-size: 12px;
}
brosig commented 11 years ago

Would be great if it work this way. The --import option will bring all given css files to the entire documentation. Some times you will need a dependence only for a piece of it.

By the way, sorry for my english. ;-)