Sharing a Variable Across HTML, CSS, and JavaScript
Set a variable in Pug, then create an inline script which sets that variable for using in JavaScript and use setProperty to pass it to CSS.
Set a variable in Pug, then create an inline script which sets that variable for using in JavaScript and use setProperty to pass it to CSS.
CSS can truncate text on a single line or on multiple lines, but it always does so from the end of the text. I’ve seen a (bad) trick reversing the text direction to trim text from the front instead, but never from the middle. Christian Heilmann wrote a package to help with this. I agree […]
Accordion details, toggle switches, styleable selects, responsive video, and more!
If you’ve applied `container` to an element, know that, for the next little while, that makes a new “formatting context” in Safari, and does not in Chrome or Firefox.
You can build your own TypeScript build process, and you might want to if you need true type checking and compatibility with a wider ecosystem of tools. But lots of tools, including now Node itself, just accept TypeScript as if it were JavaScript.
Safari is first to drop text-box in CSS, which plenty of people are excited for as it takes care of aligning text in many cases without the use of fragile magic numbers. They say: Now you can declare which font metric you want the browser to consider the edge of the text box when calculating […]
Why can’t we see if a feature is polyfillable or able to be progressively enhanced in the baseline data? There are reasons.
Shoutout to Stephanie Eckles’ 12 Days of Web advent blogging this year. I found each article fresh and with good information, a real standout to me. Just one day left but of course you can read them anytime.
It’s quite fun to have an element react to another element scrolling in an unexpected way!
Imagine this simple data set: Norway Denmark Sweden 2004 5 4 13 2002 8 10 15 Pretty simple, but there is interesting stuff going on. Someone might be trying to reference an individual bit of information, but they also might be looking to compare data, or look at the rate of change of the data […]
Frontend Masters donates to open source projects through thanks.dev and Open Collective, as well as donates to non-profits like The Last Mile, Annie Canons, and Vets Who Code.