Named Element IDs Can Be Referenced as JavaScript Globals

Named Element IDs Can Be Referenced as JavaScript Globals

Did you know that DOM elements with IDs are accessible in JavaScript as global variables? It’s one of those things that’s been around, like, forever but I’m really digging into it for the first time. If this is the first … Named Element IDs Can Be Referenced as JavaScript Globals originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter. ...
When is it OK to Disable Text Selection?

When is it OK to Disable Text Selection?

Using CSS, it’s possible to prevent users from selecting text within an element using user-select: none. Now, it’s understandable why doing so might be considered “controversial”. I mean, should we be disabling standard user behaviors? Generally speaking, no, we … When is it OK to Disable Text Selection? originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter. ...
Overlapping Bar Charts

Overlapping Bar Charts

As the name suggests, overlapping charts visualize two different sets of data in a single diagram. The idea is that the overlapping bars allow us to compare data, say, year-over-year. They are also useful for things like tracking progress for … Overlapping Bar Charts originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter. ...
CSS Custom Highlight API: The Future of Highlighting Text Ranges on the Web

CSS Custom Highlight API: The Future of Highlighting Text Ranges on the Web

Styling ranges of text in software is a very useful thing to be able to do. Thankfully, we have the CSS Custom Highlight API to look forward to because it represents the future of styling text ranges on the web.… CSS Custom Highlight API: The Future of Highlighting Text Ranges on the Web originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter. ...
Web Component Pseudo-Classes and Pseudo-Elements are Easier Than You Think

Web Component Pseudo-Classes and Pseudo-Elements are Easier Than You Think

We’ve discussed a lot about the internals of using CSS in this ongoing series on web components, but there are a few special pseudo-elements and pseudo-classes that, like good friends, willingly smell your possibly halitotic breath before you go … Web Component Pseudo-Classes and Pseudo-Elements are Easier Than You Think originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter. ...
Superior Image Optimization: An Ideal Solution Using Gatsby & ImageEngine

Superior Image Optimization: An Ideal Solution Using Gatsby & ImageEngine

(This is a sponsored post.) In recent years, the Jamstack methodology for building websites has become increasingly popular. Performance, scalable, and secure, it’s easy to see why it’s becoming an attractive way to build websites for developers. GatsbyJS is … Superior Image Optimization: An Ideal Solution Using Gatsby & ImageEngine originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter. ...
CSS Database Queries? Sure We Can!

CSS Database Queries? Sure We Can!

Kinda silly sounding, isn’t it? CSS database queries. But, hey, CSS is capable of talking to other languages in the sense that it can set the values of things that they can read. Plus, CSS can request other files, and … CSS Database Queries? Sure We Can! originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter. ...