Split page styling (fonts h1body etc) from components
Hello everyone, It would be nice to split the CSS in two parts. This is how i would split:
- One related to the page styling so body h1 h2 fonts ... and so
- And the other related to the components.
It is bit annoying that my font style and other stuff are declared many times in my concataned CSS and if i do not override them correctly in my own CSS (extra work) i can came up with strange and unexpected results.
If you have other suggestion how to handle this issue please explain. And btw angular material is very cool!
@rschmukler - thoughts on this and our Theme solutions?
In addition to the full css, it is also broken out within bower-material:
- angular-material-layout.css - our layout system
- css for each component, e.g. backdrop.css
- css related to theming for each component, e.g. backdrop-theme.css
We don't offer the page styling by itself, but everything else sounds like its already there.
I didn't find specific styling for basic HTML text elements like h1-h6 or p. Styling each one with a class every time it is used, as the documentation suggests, violates DRY.
I made a custom.css file, which I add to my app, to match the typography listed.
/************
* Headings
************/
h1.xl {
font-size: 112px;
font-weight: 300;
letter-spacing: -0.01em;
line-height: 112px; }
h1 {
font-size: 56px;
font-weight: 400;
letter-spacing: -0.005em;
line-height: 56px; }
h2 {
font-size: 45px;
font-weight: 400;
line-height: 64px; }
h3 {
font-size: 34px;
font-weight: 400;
line-height: 40px; }
h4 {
font-size: 24px;
font-weight: 400;
line-height: 32px; }
h5 {
font-size: 20px;
font-weight: 500;
letter-spacing: 0.005em; }
h6{
font-size: 16px;
font-weight: 400;
letter-spacing: 0.01em;
line-height: 24px; }
/************
* Body Copy
************/
p {
font-size: 14px;
font-weight: 400;
letter-spacing: 0.01em;
line-height: 20px; }
p.demibold {
font-size: 14px;
font-weight: 500;
letter-spacing: 0.01em;
line-height: }
Then, I don't need to style any of these tags unless I want to override my defaults.
Something like this might make sense for angular-material.