How to Safely Share Your Email Address on a Website | CSS-Tricks

[ad_1] Spammers are a huge deal nowadays. If you want to share your contact information without getting overwhelmed by spam email you need a solution. I run into this problem a few months ago. While I was researching how to solve it, I found different interesting solutions. Only one of them was perfect for my needs. In this article, I am going to show you how to easily protect your

Read More

State of CSS 2022 Survey Now Open | CSS-Tricks

[ad_1] The State of CSS survey recently opened up. Last year, the survey confirmed everyone’s assumptions that TailwindCSS is super popular and CSS variables are mainstream. It also codified what many of us want from CSS, from Container Queries to a parent selector. (Spoiler alert, we now have both of ’em.) While I wouldn’t say the results have been super surprising each year, this time I’m excited to start seeing

Read More

Using Web Components With Next (or Any SSR Framework) | CSS-Tricks

[ad_1] In my previous post we looked at Shoelace, which is a component library with a full suite of UX components that are beautiful, accessible, and — perhaps unexpectedly — built with Web Components. This means they can be used with any JavaScript framework. While React’s Web Component interoperability is, at present, less than ideal, there are workarounds. But one serious shortcoming of Web Components is their current lack of

Read More

Getting Started With WordPress Block Development | CSS-Tricks

[ad_1] Let’s acknowledge that developing for WordPress is weird right now. Whether you’re new to WordPress or have worked with it for eons, the introduction of “Full-Site Editing” (FSE) features, including the Block Editor (WordPress 5.0) and the Site Editor (WordPress 5.9), have upended the traditional way we build WordPress themes and plugins. Even though it’s been five years since we met the Block Editor for the first time, developing

Read More

GIFs Without the .gif: The Most Performant Image and Video Options Right Now | CSS-Tricks

[ad_1] So you want an auto-playing looping video without sound? In popular vernacular this is the very meaning of the word GIF. The word has stuck around but the image format itself is ancient and obsolete. Twitter, for example, has a “GIF” button that actually inserts a <video> element with an MP4 file into your tweet — no .gif in sight. There are a beguiling amount of ways to achieve

Read More

How to Create Wavy Shapes & Patterns in CSS | CSS-Tricks

[ad_1] The wave is probably one of the most difficult shapes to make in CSS. We always try to approximate it with properties like border-radius and lots of magic numbers until we get something that feels kinda close. And that’s before we even get into wavy patterns, which are more difficult. “SVG it!” you might say, and you are probably right that it’s a better way to go. But we

Read More

Named Element IDs Can Be Referenced as JavaScript Globals | CSS-Tricks

[ad_1] 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 time you’re hearing about it, brace yourself! We can see it in action simply by adding an ID to an element in HTML: <div id=”cool”></div> Normally, we’d define a

Read More

How I Made an Icon System Out of CSS Custom Properties | CSS-Tricks

[ad_1] SVG is the best format for icons on a website, there is no doubt about that. It allows you to have sharp icons no matter the screen pixel density, you can change the styles of the SVG on hover and you can even animate the icons with CSS or JavaScript. There are many ways to include an SVG on a page and each technique has its own advantages and

Read More

New Free WordPress Plugins! | Plugin Planet

[ad_1] Excited to announce the launch of two free WordPress plugins. First is Simple Login Notification, a simple plugin that notifies you whenever an admin-level user logs in to your site. The second plugin is Simple Download Counter, which tracks the number of times files are downloaded from your site. Both of these plugins are 100% free and open source, available for download at the WordPress Plugin Directory. Learn more

Read More

How To Customize WordPress Block Theme Cover Templates with Dynamic Post Feature Images | CSS-Tricks

[ad_1] If we browse the WordPress theme directory, a majority of themes showcase cover images. It is a feature in popular demand. The cover page trend is true even in the block theme directory screenshots as well. Let’s consider the following example from Twenty Twenty (a classic theme) which includes a cover template that can be used to display both in single post and page, where the post’s featured image displays at

Read More