CSS Variables: var(--subtitle);
11/13/16About 1 minCSSArticle(s)blogbram.uscss
CSS Variables: var(--subtitle); 관련
CSS > Article(s)
Article(s)
CSS Variables: var(--subtitle);
As per usual, great talk by Lea Verou: The key takeaway about CSS Custom Properties to me is the very first one Lea mentioned: they’re just properties like the other CSS properties we already know. This means that the normal behavior of inheritance is in place, you can manipulate them from within media queries, and … Continue reading ”CSS Variables: var(--subtitle);”
As per usual, great talk by Lea Verou:
The key takeaway about CSS Custom Properties to me is the very first one Lea mentioned: they’re just properties like the other CSS properties we already know. This means that the normal behavior of inheritance is in place, you can manipulate them from within media queries, and you can even get/set them via style attributes or even JavaScript:
const el = document.querySelector('#my-elem');
// Get
var foo = window.getComputedStyle(el).getPropertyValue('--foo');
// Set
el.style.setProperty('--foo', newValue);
I’ve created pens for the background mouse position follower (bramus), and for the CSS scroll indicator (bramus).
See CSS Variables: Follow Mouse Position by bramus on CodePen.
CSS Variables: var(--subtitle);
As per usual, great talk by Lea Verou: The key takeaway about CSS Custom Properties to me is the very first one Lea mentioned: they’re just properties like the other CSS properties we already know. This means that the normal behavior of inheritance is in place, you can manipulate them from within media queries, and … Continue reading ”CSS Variables: var(--subtitle);”