Search
A Step-By-Step Process for Turning Designs Into Code
21.7.2021
Turning website design files into a combination of HTML, CSS and JavaScript is the bread and butter of many front-end web development jobs, but there’s a part of this work that doesn’t neatly fit in to tutorials on any specific …
The post A Step-By-Step Process for Turning Designs Into Code...
WordPress Admin Warnings in the Block Editor
16.7.2021
We sent out an email the other week that ultimately had a <video> in the HTML markup. We send the newsletter by creating it here in the WordPress block editor, which is fetched through RSS-to-Mailchimp. Mailchimp dutifully sent it out, …
The post WordPress Admin Warnings in the Block...
Some Typography Links
16.7.2021
Glitter text — whO (I learned a name for people who go by a one-word moniker like that: Mononymous) created a builder for fancy SVG-based type. It’s a custom font with <text>, and the fancy comes in with a
…
The post Some Typography Links appeared first on CSS-Tricks. You...
Fix Seeing “0” in Your JSX Code
9.7.2021
The early days of the web felt like the wild west when it came to coding practices — just make it work. Then we became enlightened to better practices, separating HTML from CSS and JavaScript. Then came React and JSX, where we combine JavaScript, HTML, and even CSS with Styled Components...
The Web’s Worst Default
7.7.2021
There are a lot of great defaults when it comes to browsers and the web. Think about all the accessibility features that are baked into HTML so that you don’t have to do weird stuff, like this example from Manuel…
The post The Web’s Worst Default appeared first on CSS-Tricks. You can support...
Body Toggle
6.7.2021
I appreciate the clarity of this trick that Mikael Ainalem posted over on Reddit:
It’s a one-liner that toggles the class on the <body> so you can mock up different states and toggle between them on click.
<body onclick="this.classList.toggle("active");"
Could …
The post...
Zero-Width Space
2.7.2021
The name zero-width space is antithetical, but it’s not without uses. In text, maybe you’d use it around slashes because you want to be sure the words are treated individually but not have any physical space around the slash:…
The post Zero-Width Space appeared first...
World Wide Web Inventor Tim Berners-Lee Sells NFT for $5.4M — ‘Embarrassing’ Coding Error Spotted in NFT
1.7.2021
Sir Timothy John Berners-Lee, the English computer scientist who is well known for inventing the world wide web has sold a non-fungible token (NFT) in an online auction hosted by the auction house Sotheby’s. The NFT is basically a video of the World Wide Web’s source code created...
When a Click is Not Just a Click
30.6.2021
The click event is quite simple and easy to use; you listen for the event and run code when the event is fired. It works on just about every HTML element there is, a core feature of the DOM API.…
The post When a Click is Not Just a Click appeared first on CSS-Tricks. You can support...
What does `font: 110%/1.4 system-ui` mean?
30.6.2021
I use this line, or one like it, in a lot of quick demos. Not that it’s not a production-worthy line of code—I just tend to be a bit more explicit on bigger projects.
html {
font: 110%/1.4 system-ui;
}
…
The post What does `font: 110%/1.4 system-ui` mean? appeared first...
Chromium spelling and grammar features
29.6.2021
Delan Azabani digs into the (hopefully) coming soon ::spelling-error and ::grammar-error pseudo selectors in CSS. Design control is always nice. Hey, if we can style scrollbars and style selected text, why not this?
The squiggly lines that indicate...
“Weak declaration”
23.6.2021
PPK looks at aspect-ratio, a CSS property for layout that, for the most part, does exactly what you would think it does. It’s getting more interesting as it’s behind a flag in Firefox and Safari now, so we’ll have …
The post “Weak declaration” appeared first...
Detect Unused Classes in… HTML
16.6.2021
Usually, when “unused” comes up in conversation regarding CSS, it’s about removing chunks of CSS that are not used in your site or, at least, the styles not currently in use on a specific page. The minimal amount of CSS …
The post Detect Unused Classes in… HTML...
Making Tables With Sticky Header and Footers Got a Bit Easier
15.6.2021
It wasn’t long ago when I looked at sticky headers and footers in HTML <table>s in the blog post A table with both a sticky header and a sticky first column. In it, I never used position: sticky on …
The post Making Tables With Sticky Header and Footers Got a Bit Easier...
CSS-Tricks Chronicle XXXX
14.6.2021
Just a little link roundup of some off-site stuff I’ve done recently. As I’m wont to do from time to time.
DevJourney Podcast
#151 Chris Coyier from ceramics to CSS-Tricks and CodePen‘
Chris took us from playing on
…
The post CSS-Tricks Chronicle XXXX appeared first...
target=”blank”
9.6.2021
Does that make your eye twitch a little bit? Like… it’s a typo. It should be target="_blank" with an underscore to start the value. As in…
<a target="_blank" href="https://codepen.io"Open CodePen in a New Tab
</a
Welp, that’s correct syntax!…
The post...
VS Code Extensions for HTML
7.6.2021
Let’s look at some extensions for VS Code that make writing and editing HTML (and languages that are basically HTML with extra powers) better. You may not like all of them. Maybe some of them don’t appeal to you, solve …
The post VS Code Extensions for HTML appeared first...
Principles for user-centered front-end development
4.6.2021
Colin Oakley:
• Accessible — Use semantic HTML, and make sure we meet the WCAG 2.1 AA standard as a minimum and it works with assisted technologies (this sits alongside the DWP Accessibility Manual)
• Agnostic — Build
…
The post Principles for user-centered front-end...
Can I :has()
4.6.2021
I just joked that we’re basically getting everything we want in CSS super fast (mostly referring to container queries, my gosh, can you imagine they are actually coming?). Now we might actually get parent selectors?! As in .parent:has(.child) { …
The post Can I :has() appeared first...
Are Custom Properties a “Menu of What Will Change”?
2.6.2021
PPK laid out an interesting situation in “Two options for using custom properties” where he and Stefan Judis had two different approaches for doing the same thing with custom properties. In one approach, hover and focus styles for a …
The post Are Custom Properties a “Menu...