CSS
-
19 Jun 2023
The best light/dark mode theme toggle in JavaScript
Learn how to build The Ultimate Theme Toggle™️ for your website using JavaScript, CSS custom properties, local storage and system settings. No framework required!
-
3 May 2023
The universal CSS * selector isn't actually universal
I learned this week that for my ENTIRE professional career I have been living with an enormous misconception: the universal CSS selector doesn't actually select EVERYTHING.
-
23 Apr 2023
Hide text in CSS pseudo elements from screen readers with this one weird trick
Learn how to hide decorative text generated by CSS pseudo elements from screen readers, so that your weird and wonderful designs don't interrupt the flow of the text.
-
22 Nov 2022
A responsive striped CSS gradient inspired by 80s VHS tapes
Create a responsive, horizontal-striped CSS gradient inspired by 80s VHS tapes using CSS custom properties and a linear gradient.
-
31 Aug 2022
What's the difference between : and :: in CSS?
I spent years Googling “what is the difference between : and :: in CSS” before the information stayed in my brain. Sound familiar? Then this post is for you.
-
11 May 2022
Light and dark mode in just 14 lines of CSS
Want to add quick support for light mode and dark mode to your website using only CSS? Combine two CSS custom properties with a media query to get set up in seconds.
-
6 Feb 2022
Debug your CSS layouts with this one simple trick
Are you battling with layouts in CSS? Use this one line of CSS to help you debug what's up and get you back on the road to success.
-
16 May 2021
How to make your font sizes accessible with CSS
Everyone uses the web differently. Here's how to make sure your website respects font size preferences specified in browser settings using two important CSS concepts.
-
10 May 2021
What is BEM in CSS?
Have you ever worked on an application with one huge CSS file and found that when you changed something in one place, something unexpected happened somewhere else? I had this problem a lot in my early days of front end development. It was frustrating! So what can you do to stop this from happening?
-
26 Feb 2021
How to make your code blocks accessible on your website
If you’re a developer or technical writer who publishes content on the internet, you’ll want to make sure your code examples are presented beautifully for your audience to consume. But how do you ensure your code blocks adhere to Web Content Accessibility Guidelines (WCAG) standards?