postcss-gridlover
Version:
Enables using Gridlover sx and gr units in your CSS
73 lines (69 loc) • 1.26 kB
CSS
html {
--base-font-size: 21px;
--base-line-height: 1.2;
--base-scale-factor: 1.618;
--base-units: px;
font-size: var(--base-font-size);
line-height: var(--base-line-height);
}
body {
font-family: sans-serif;
font-size: 21px;
line-height: 25px;
max-width: 560px;
margin: auto;
}
h1 {
font-size: 89px;
line-height: 100px;
margin-top: 25px;
margin-bottom: 50px;
}
p, ul, ol, pre , table, blockquote {
margin-top: 0px;
margin-bottom: 25px;
}
ul ul, ol ol, ul ol, ol ul {
margin-top: 0px;
margin-bottom: 0px;
}
@media (max-width: 500px) {
html {
--base-font-size: 15px;
--base-line-height: 1.32;
--base-scale-factor: 1.333;
--base-units: px;
font-size: var(--base-font-size);
line-height: var(--base-line-height);
}
body {
font-size: 15px;
line-height: 20px;
max-width: 320px;
}
h1 {
font-size: 36px;
line-height: 40px;
margin-top: 20px;
margin-bottom: 40px;
}
}
/* Clean up any elements that might throw off the grid */
hr {
border: 1px solid;
margin: -1px 0;
}
a, b, i, strong, em, small, code {
line-height: 20px;
}
sub, sup {
line-height: 20px;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}