Search
ECMAScript proposal: JSON modules
21.7.2021
Dr. Axel Rauschmayer looks at JSON modules, which is already live in Chrome 91 (but nothing else). It looks just like an ES Modules-style import, only you asset the type at the end.
import configData from './config-data.json' assert {type:
…
The post ECMAScript proposal: JSON modules...
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...
Images are hard.
19.7.2021
Putting images on websites is incredibly simple, yes? Actually, yes, it is. You use <img> and link it to a valid source in the href attribute and you’re done. Except that there are (counts fingers) 927 things you could (and …
The post Images are hard. appeared first...
Practical Use Cases for Scroll-Linked Animations in CSS with Scroll Timelines
19.7.2021
The Scroll-Linked Animations specification is an upcoming and experimental addition to CSS. Using the @scroll-timeline at-rule and animation-timeline property this specification provides you can control the time position of regular CSS Animations by scrolling.
In this post, we take a …
The...
Dark Mode in One Line of Code!
19.7.2021
Dark mode has seemingly become the desired visual mode for websites and mobile apps alike. Dark mode is easier on the eyes, especially for those like me who like to burn the midnight oil by coding and reading tutorials. Unfortunately not all websites offer dark mode, so it’s up to me...
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...
Of Course We Can Make a CSS-Only Clock That Tells the Current Time!
16.7.2021
Let’s build a fully functioning and settable “analog” clock with CSS custom properties and the calc() function. Then we’ll convert it into a “digital” clock as well. All this with no JavaScript!
Here’s a quick look at the clocks …
The post Of Course We Can Make a CSS-Only Clock That Tells...
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...
Limited Edition NFT by Glimpse You Can Get by Scanning QR Code
15.7.2021
Disclaimer: The text below is a press release that was not written by Cryptonews.com.
Some of you might have noticed a 10,000 square-foot billboard in Times Square by Glimpse, just above McDonald’s–with a redeemable NFT.
Glimpse, the project behind this publicity gambit, is also giving away $1,000...
Build Complex CSS Transitions using Custom Properties and cubic-bezier()
14.7.2021
I recently illustrated how we can achieve complex CSS animations using cubic-bezier() and how to do the same when it comes to CSS transitions. I was able to create complex hover effect without resorting to keyframes. In this article, I …
The post Build Complex CSS Transitions using Custom...
Meta Theme Color and Trickery
13.7.2021
Starting with Version 15, Safari supports the theme-color <meta> tag both on macOS and iOS. That’s exciting news because now the first desktop browser supports this <meta> tag and it also supports the media attribute and the prefers-color-scheme media feature.…
The post Meta...
Using the Specificity of :where() as a CSS Reset
12.7.2021
I don’t know about you, but I write these three declarations many times in my CSS:
ul {
padding: 0;
margin: 0;
list-style-type: none;
}
You might yell at me and say I can just put those in my CSS …
The post Using the Specificity of :where() as a CSS Reset appeared first on CSS-Tricks....
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...
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...
Nifty News: Embarrassing mistake in $5.4M NFT of web source code, Animoca raises $50M ...
2.7.2021
Sotheby’s has made an embarrassing mistake in its $5.4 million NFT auction, Animoca brands has raised $138.88 in funding, and data shows limited collector numbers on SuperRare
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...
Bargain? World Wide Web’s source code NFT sells for $5.4M at Sotheby’s
1.7.2021
The source code for the World Wide Web has been sold by the inventor for $5.4 million
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...
How to Code the K72 Marquee Hover Animation
30.6.2021
Learn how to recreate the direction-aware marquee menu hover effect seen on the website of K72 by Locomotive.
The post How to Code the K72 Marquee Hover Animation appeared first on Codrops
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...