|
1 | | -# optimizing-css-compiler |
2 | | - |
3 | | -This README outlines the details of collaborating on this Ember addon. |
| 1 | +# [WIP] optimizing-css-compiler |
| 2 | + |
| 3 | +What does a little convention get you? A lot, as it turns out. |
| 4 | + |
| 5 | +When following the conventions listed below, the Optimizing CSS Compiler |
| 6 | + will be able to aggressively optimize, compile and minify your CSS by |
| 7 | + taking the following steps: |
| 8 | + |
| 9 | +- builds a broccoli tree of handlebars templates and styles |
| 10 | +- constructs a graph of all possible style paths in your CSS files |
| 11 | +- constructs a new graph of all used style paths in your handlebars files |
| 12 | +- compiles css down to the smallest possible set of rules. |
| 13 | +- applies those rules to the templates, removing any existing classes |
| 14 | +- writes a style sheet containing the rules |
| 15 | + |
| 16 | +## The Guidelines |
| 17 | + |
| 18 | +- **Don't expect this to work (because it doesn't yet)** |
| 19 | +- Do contribute if you find this neat, ask in #dev-html-next in the Ember Slack |
| 20 | +- Componetize your CSS |
| 21 | +- Use `&` for the component root element |
| 22 | +- Tag dynamic selectors (things to leave alone) with `@dynamic` or `/* @dynamic */` |
| 23 | +- Don't use media-queries and breakpoints (yet! they will be doable long term) |
| 24 | +- Don't use any CSS preprocessors (yet! also will be doable long term) |
| 25 | +- Don't add class names within `component.js` files (yet! most usage in this pattern will eventually be allowed) |
4 | 26 |
|
5 | 27 | ## Installation
|
6 | 28 |
|
|
0 commit comments