This popped up on lobsters today: Chrome Platform Status: CSS usage. It’s a report on the prevalence of CSS properties as found in the wild. It’s interesting. I was surprised by some things. e.g. ‘display’ and ‘position’ are more prevalent than ‘padding’ and ‘margin’.
Tag Archives: usage
CSS Variables and How To Use Them
A quick run down on CSS Variables and How To Use Them. Note the var() function can take 2nd parameter for a default value.
:root {
--primary-color: #333;
}
div {
color: var(--primary-color, #444);
}
p {
background-color: var(--primary-color);
}
.fancy {
border-color: var(--primary-color);
}