Search
You want minmax(10px, 1fr) not 1fr
22.1.2021
There are a lot of grids on the web like this:
.grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
}
My message is that what they really should be is:
.grid {
display: grid;
grid-template-columns: repeat(3, minmax(10px, 1fr));
}
Why? In …
The post You want minmax(10px, 1fr)...
How to Play and Pause CSS Animations with CSS Custom Properties
21.1.2021
Let’s have a look CSS @keyframes animations, and specifically about how you can pause and otherwise control them. There is a CSS property specifically for it, that can be controlled with JavaScript, but there is plenty of nuance to get …
The post How to Play and Pause CSS Animations with...
Clothing the Naked Emperor – the Blockchain Potential Unleashed With Prasaga
21.1.2021
Prasaga is a Foundation-based organization and the creator the DataGrid Blockchain, a new native chain and coin project, embracing developers, miners, and token holders. DGB will be language agnostic, allowing developers to have full code reuse on a global scale, which will greatly reduce...
New in Chrome 88: aspect-ratio
20.1.2021
And it was released yesterday! The big news for us in CSS Land is that the new release supports the aspect-ratio property. This comes right on the heels of Safari announcing support for it in Safari Technology Preview 118, …
The post New in Chrome 88: aspect-ratio appeared first...
Life with ESM
19.1.2021
ESM, meaning ES Modules, meaning JavaScript Modules. Like, import and friends.
Browsers support it these days. There is plenty of nuance, but as long as you’ve dropped IE, the door is fairly open.
Before ESM, the situation for JavaScript …
The post Life with ESM appeared first...
Drawing 2D Metaballs with WebGL2
19.1.2021
An in-depth tutorial on how to code 2D visuals using WebGL2.
The post Drawing 2D Metaballs with WebGL2 appeared first on Codrops
Noise.cash: Social Microblogging App Fueled by Bitcoin Cash Tips Gathers Traction
18.1.2021
For quite some time now, bitcoin cash users have been leveraging the web portal read.cash in order to write blog posts, connect with like-minded individuals, and earn bitcoin cash for providing popular content. Now the creators of read.cash have introduced another application called noise.cash...
3 Approaches to Integrate React with Custom Elements
15.1.2021
In my role as a web developer who sits at the intersection of design and code, I am drawn to Web Components because of their portability. It makes sense: custom elements are fully-functional HTML elements that work in all modern …
The post 3 Approaches to Integrate React with Custom Elements...
Fighting Game Players Create Community-Wide Code Of Conduct
14.1.2021
Members of the fighting game community recently unveiled a code of conduct for the competitive scene. Much like a similar (and, as of December 2020, disbanded) project in the Smash community, the document is a list of common-sense rules that includes a firm stance against several forms of abuse...
Dynamic, Conditional Imports
13.1.2021
With ES Modules, you can natively import other JavaScript. Like confetti, duh:
import confetti from 'https://cdn.skypack.dev/canvas-confetti';
confetti();
That import statement is just gonna run. There is a pattern to do it conditionally though. It’s like this:
(async ()
…
The post...
Fading in a Page on Load with CSS & JavaScript
13.1.2021
Louis Lazaris demonstrates a very simple way of doing this.
Hide the body (with JavaScript) right away with opacity: 0
Wait for all the JavaScript to execute
Unhide the body by transitioning it back to opacity: 1
Like this:
CodePen…
The post Fading in a Page on Load with CSS &...
Two Issues Styling the Details Element and How to Solve Them
13.1.2021
In the not-too-distant past, even basic accordion-like interactions required JavaScript event listeners or some CSS… trickery. And, depending on the solution used, editing the underlying HTML could get complicated.
Now, the <details> and <summary> elements (which combine to form...
A (terrible?) way to do footnotes in HTML
13.1.2021
Terence Eden poked around with a way to do footnotes using the <details>/<summary> elements. I think it’s kind of clever. Rather than a hyperlink that jumps down to explain the footnote elsewhere, the details are right there next …
The post A (terrible?) way to...
Fixing Smooth Scrolling with Find-on-Page
13.1.2021
Back when we released the v17 design (we’re on v18 now) of this site. I added html { scroll-behavior: smooth; } to the CSS. Right away, I got comments like this (just one example):
… when you control+f or
…
The post Fixing Smooth Scrolling with Find-on-Page appeared first...
Building Flexible Components With Transparency
12.1.2021
Good thinking from Paul Herbert on the Cloudfour blog about colorizing a component. You might look at a design comp and see a card component with a header background of #dddddd, content background of #ffffff, on an overall …
The post Building Flexible Components With Transparency appeared...
Careful When Changing the Display of `summary`
12.1.2021
I got a very helpful bug report the other day (thanks Kilian!) about the <details> element in a blog post of mine not showing the default ▶ icon, and thus looking rather like any ol’ random <p>.
It …
The post Careful When Changing the Display of `summary`...
`aspect-ratio` is going to deprecate FitVids
8.1.2021
Jen was just tweetin’ about how the latest Safari Technical Preview has aspect-ratio. Looks like Chrome and Firefox both have it behind a flag, so with Safari joining the party, we’ll all have it soon.
I played with it …
The post `aspect-ratio` is going to deprecate FitVids...
Styling Code In and Out of Blocks
6.1.2021
There is a <code> tag in HTML. I literally just used it to wrap that tag in the previous sentence — so meta. It is an inline-by-default element that denotes any sort of code. It has default (user agent) styles …
The post Styling Code In and Out of Blocks appeared first...
Nier: Automata's "Final Secret" Has Been Found And It Lets You Skip The Whole Game
3.1.2021
A new secret cheat code has been found in Neir: Automata that lets players skip the entire game after only beating the first boss. This new discovery has also been confirmed to be the “final secret” that the game’s developers teased a few years ago.Read more
A font-display setting for slow connections
31.12.2020
Me, I really dislike FOUT. I like that it’s an option, because not displaying text quickly on the web is no good. I know font-display: swap; is popular because it’s good for performance, but that FOUT stuff pains me. Matt …
The post A font-display setting for slow connections...