Search
Writing Strong Front-end Test Element Locators
22.4.2022
Automated front-end tests are awesome. We can write a test with code to visit a page — or load up just a single component — and have that test code click on things or type text like a user would, …
Writing Strong Front-end Test Element Locators originally published on CSS-Tricks. You should...
Adding Tailwind CSS to New and Existing WordPress Themes
20.4.2022
In the 15 or so years since I started making WordPress websites, nothing has had more of an impact on my productivity — and my ability to enjoy front-end development — than adding Tailwind CSS to my workflow (and it …
Adding Tailwind CSS to New and Existing WordPress Themes originally...
Making Mermaid Diagrams in Markdown
18.4.2022
Mermaid diagrams and flowcharts have been gaining traction, especially with GitHub’s announcement that they are natively supported in Markdown. Let’s take a look at what they are, how to use them, and just as importantly: why.
Just like you …
Making Mermaid Diagrams in Markdown originally...
Add a CSS Lens Flare to Photos for a Bright Touch
12.4.2022
I’m a big fan of movies by J.J. Abrams. I enjoy their tight plots, quippy dialog, and of course: anamorphic lens flares. Filmmakers like Abrams use lens flare to add a dash of ‘homemade’ realism to their movies, …
Add a CSS Lens Flare to Photos for a Bright Touch originally...
Adding CDN Caching to a Vite Build
4.4.2022
Content delivery networks, or CDNs, allow you to improve the delivery of your website’s static resources, most notably, with CDN caching. They do this by serving your content from edge locations, which are located all over the world. When a …
Adding CDN Caching to a Vite Build originally...
Tricks to Cut Corners Using CSS Mask and Clip-Path Properties
30.3.2022
We recently covered creating fancy borders with CSS mask properties, and now we are going to cut the corners with CSS mask and clip-path! A lot of techniques exist to cut different shapes from the corners of any element. …
Tricks to Cut Corners Using CSS Mask and Clip-Path Properties...
6 Useful Bookmarklets to Boost Web Development
28.3.2022
A bookmarklet is a JavaScript-based bookmark that adds to a web browser. I’d like to show you some awesome web browser hacks to aid your web development workflow and how to convert those hacks into time-saving bookmarklets.
Activating design mode
…
6 Useful Bookmarklets to Boost...
Write HTML, the HTML Way (Not the XHTML Way)
21.3.2022
You may not use XHTML (anymore), but when you write HTML, you may be more influenced by XHTML than you think. You are very likely writing HTML, the XHTML way.
What is the XHTML way of writing HTML, and what …
Write HTML, the HTML Way (Not the XHTML Way) originally published on CSS-Tricks....
Optimizing SVG Patterns to Their Smallest Size
18.3.2022
I recently created a brick wall pattern as part of my #PetitePatterns series, a challenge where I create organic-looking patterns or textures in SVG within 560 bytes (or approximately the size of two tweets). To fit this constraint, I have …
Optimizing SVG Patterns to Their Smallest Size...
CSS-Tricks is joining DigitalOcean!
15.3.2022
Hey hey!
I’ve got a big announcement to make here. (Where’s my gong? I feel like this really needs a good gong hit.)
CSS-Tricks, this very website you’re looking at, has been acquired by DigitalOcean!
You can hear …
CSS-Tricks is joining DigitalOcean! originally published...
Say Hello to selectmenu, a Fully Style-able select Element
3.3.2022
I want to introduce you to a new, experimental form control called <selectmenu>. We’ll get deep into it, including how much easier it is to style than a traditional <select> element. But first, let’s fill in some context …
Say Hello to selectmenu, a Fully Style-able select...
Build Membership Businesses with Memberful
3.3.2022
(This is a sponsored post.)
What would your business be like if you sold memberships? It might be more than fun to think about, in fact, it might just be transformative. With membership, would you include little add-ons or …
Build Membership Businesses with Memberful originally published...
7 Fresh Links on Performance For March 2022
2.3.2022
I have a handful of good links to articles about performance that are burning a hole in my bookmarks folder, and wanna drop them here to share.
The new WebPageTest website design
From fonts to SVG: an icon migration strategy
…
7 Fresh Links on Performance For March 2022 originally...
How to Make a “Raise the Curtains” Effect in CSS
2.3.2022
“Raise the curtains” is what I call an effect where the background goes from dark to light on scroll, and the content on top also goes from light to dark while in a sticky position.
Here’s an example where I …
How to Make a “Raise the Curtains” Effect in CSS originally published...
CSS Custom Highlight API: The Future of Highlighting Text Ranges on the Web
1.3.2022
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...
Ahmad Shadeed: Use Cases For CSS fit-content
1.3.2022
Ahmad Shadeed covers the CSS fit-content sizing keyword. It’s useful! It just doesn’t come up super often. I find myself using min-content a lot more, like when setting up the height of a grid-template-row.
The fit-content keyword is actually …
Ahmad Shadeed: Use Cases For...
IE Down, Edge Up… Global Browser Usage Stats Are for Cocktail Parties and Conference Slides
1.3.2022
I enjoy articles like Hartley Charlton’s “Microsoft Edge Looks Set to Overtake Safari as World’s Second Most Popular Desktop Browser.” It’s juicy! We know these massive players in the browser market care very much about their market share, so when …
IE Down...
Web Component Pseudo-Classes and Pseudo-Elements are Easier Than You Think
28.2.2022
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...
Trailing Slashes on URLs: Contentious or Settled?
25.2.2022
A fun deep dive from Zach. Do you have an opinion on which you should use?
1) https://website.com/foo/
2) https://websites.com/foo
The first option has a “trailing slash.” The second does not.
I’ve always preferred this thinking: you use a trailing …
Trailing Slashes...
When to Avoid the text-decoration Shorthand Property
25.2.2022
In my recent article about CSS underline bugs in Chrome, I discussed text-decoration-thickness and text-underline-offset, two relatively new and widely-supported CSS properties that give us more control over the styling of underlines.
Let me demonstrate the usefulness of …
When to Avoid...