Adding Tailwind CSS to New and Existing WordPress Themes | CSS-Tricks

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 isn’t close). When I began working with Tailwind, there was an up-to-date, first-party repository on GitHub describing how to use Tailwind with WordPress. That repository hasn’t been updated since 2019.

Read More

Maximize Your Front-End Test Locators | CSS-Tricks

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, then make assertions about the state of the application after the interactions. This lets us confirm that everything described in the tests work as expected in the application. Since this

Read More

Jeff Starr Interview – The Author of “Digging Into WordPress”

Hi, everyone. Welcome to a new interview with another professional that knows WordPress inside-out. Today, you will get insights about web design, development, and WordPress from Jeff Starr – one of the most experienced people in our community. If you missed our latest interview with Tom Greenwood about green business and sustainable web design, check it out here. Feel free to also browse through our full collection of interviews to

Read More

Nested Components in a Design System | CSS-Tricks

When creating a component-based, front-end infrastructure, one of the biggest pain points I’ve personally encountered is making components that are both reusable and responsive when there are nested components within components. Take the following “call to action” (<CTA />) component, for example: On smaller devices we want it to look like this: This is simple enough with basic media queries. If we’re using flexbox, a media query can change the

Read More

Protect Your WordPress Site From Malicious Threats With BBQ Firewall

Almost as soon as you install a new WordPress site malicious bots begin scanning it for vulnerabilities. Over the years hackers have built up long lists of web vulnerabilities that they can use to compromise a site. They create bots than scan your site by running through that long list looking for weaknesses. We all know the importance of securing our sites, but there are a bewildering array of options

Read More

Cool Hover Effects That Use Background Properties | CSS-Tricks

A while ago, Geoff wrote an article about a cool hover effect. The effect relies on a combination of CSS pseudo-elements, transforms, and transitions. A lot of comments have shown that the same effect can be done using background properties. Geoff mentioned that was his initial thought and that’s what I was thinking as well. I am not saying the pseudo-element he landed on is bad, but knowing different methods

Read More

Digging Into WordPress | Take your WordPress skills to the next level.

Quick post that explains how to fix the error, “The authorization header is missing”. This error may be found under “recommended improvements” in the WordPress Site Health tool (located under the WP menu ▸ Tools ▸ Site Health). When running a Site Health check, the “authorization header” warning happens when you’ve upgraded WordPress (to version 5.6 or better) and have Permalinks enabled, but the site’s .htaccess rules have not been

Read More

Setting Up CloudFront to Host Your Web App | CSS-Tricks

In my last article, we went over how to set up a web app that serves chunks and bundles of CSS and JavaScript from CloudFront. We integrated it into Vite so that when the app runs in a browser, the assets requested from the app’s root HTML file would pull from CloudFront as the CDN. While CloudFront’s edge caching does offer benefits, serving your app’s resources from these multiple locations

Read More

How to Disable Gutenberg Styles on the Frontend

By default the Gutenberg Block Editor loads its default CSS/stylesheet on the front-end of your WordPress site. This is fine for most cases, but there may be situations where you want to disable the Gutenberg styles for whatever reason. For example, my free WordPress plugin, Disable Gutenberg, enables users to disable the Gutenberg Block Editor and restore the Classic Editor. Included in the plugin settings is an option called “Enable

Read More

Creating the DigitalOcean Logo in 3D With CSS | CSS-Tricks

Howdy y’all! Unless you’ve been living under a rock (and maybe even then), you’ve undoubtedly heard the news that CSS-Tricks, was acquired by DigitalOcean. Congratulations to everyone! 🥳 As a little hurrah to commemorate the occasion, I wanted to create the DigitalOcean logo in CSS. I did that, but then took it a little further with some 3D and parallax. This also makes for quite a good article because the

Read More