Document CSS API
Add a 'CSS' section to the documentation for each component, and decide on good CSS classes where they don't exist yet.
@ajoslin - I cannot recall; why this is needed ?
This was something I proposed. Without documenting anything at all, it's impossible to say if changes to CSS classes are considered breaking. By documenting a CSS API, you make explicit what you expect people can use to customize components, and anything not documented is considered private and subject to change at any time.
The given API for any component could be very small (maybe just the root element and modifiers), or more detailed (a class for each logical part), but the important thing is to make it explicit.
:+1: This is great because now it will be easier to interact with designers who want to work with clean css :-)
This is a great idea!
We feel hesitant using some classes because we don't know if they are gonna disappear or change in future releases. This feeling is increased by the fact that some classes are documented (I'm thinking about .md-whiteframe-z*), while others can only be found on (sometimes unrelated) examples (e.g. .md-mini).
@david-gang , @nicbon - Documenting CSS is definitely on our roadmap. The Angular Material team is currently focused on implementation of components for the planned Q2 1.0 release. Perhaps you guys could help us and create a initial CSS markdown document (submit via PR)?
@ThomasBurleson I will be happy to document every css class i make a customization on. What should be the name of the file and where should it be located ?
@david-gang - As you prepare this document, I will connect with you as a formal contributor and we can dialog as needed so I can help with questions, suggestions, and feedback. What is your email? I will contact you and we can discuss ideas on CSS documentation.
The 1st question is whether to have a separate CSS section that discusses the CSS for all components or the enhancement of each component's online docs with a CSS section. Currently, the component docs have Usage and Attributes sections; we could easily add a "CSS" section there; but that would require jsDocs instead of markdown docs.
@david-gang Thanks for doing this. As a front-end developer, I appreciate it. Having worked with many UI frameworks, I would suggest that Bootstrap has the best and easiest-to-follow documentation and might be a good reference point.
Thank you for the reference, @ThomasBurleson.
From the linked issue:
"As a user, I expect the demos to be copy/paste and "just work"; instead, I need to dig into the docs.css to get the same visual styles."
As a developer who works with designers (and fears the days he must dabble in design himself), this is a critical story for "working" demos.
related: https://github.com/angular/material-start/issues/19
:+1: really happy to see this being worked on!