Search
Gaps? Gasp!
6.4.2021
At first, there were flexboxes (the children of a display: flex container). If you wanted them to be visually separate, you had to use content justification (i.e. justify-content: space-between), margin trickery, or sometimes, both. Then along came grids (a …
The post Gaps? Gasp! appeared...
Yes, People Are Writing Horny Fanfic About the Suez Canal and the Ever Given
26.3.2021
You know the story by now: A massive container ship has been stuck in the Suez Canal since Tuesday, successfully blocking one of the busiest shipping routes on the planet. Ships have been forced to travel around the Cape of Good Hope like it’s the 1700s, global trade has been disrupted, there...
Better Line Breaks for Long URLs
16.3.2021
CSS-Tricks has covered how to break text that overflows its container before, but not much as much as you might think. Back in 2012, Chris penned “Handling Long Words and URLs (Forcing Breaks, Hyphenation, Ellipsis, etc)” and it is still …
The post Better Line Breaks for Long URLs appeared...
CSS Switch-Case Conditions
17.2.2021
CSS is yet to have a switch rule or conditional if, aside from the specific nature of @media queries and some deep trickery with CSS custom properties. Let’s have a look at why it would be useful if we …
The post CSS Switch-Case Conditions appeared first on CSS-Tricks.
You can support...
(Jay Freestone’s) Front-end predictions for 2021
8.2.2021
React framework maturity, early container queries, WASM adoption, and monoliths. I’ll take all four, please. Not feeling like a particularly front-end-y? Jay says:
Interestingly, the biggest developments in the front-end are unlikely to be traditionally front-end concerns. Back...
What if you could cut your hosting costs by 80%? Webiny Serverless CMS makes it possible.
21.1.2021
Are you hosting one or more websites and are using a headless CMS? Are you hosting your CMS on a virtual machine or a container, or using a SaaS solution? If so, then you’re paying for the uptime, regardless if …
The post What if you could cut your hosting costs by 80%? Webiny...
Genesis Mining Is Converting Excess Bitcoin Datacenter Heat Into Greenhouse Power in Sweden
20.12.2020
One of the largest bitcoin mining operations in the world, Genesis Mining, has been working on an experiment with Systemair, Lulea Technical University, Research Institute of Sweden, and the local Boden municipality. The teams in Sweden are developing a system that converts excess heat from...
Minimal Takes on Faking Container Queries
2.12.2020
It’s sounding more and more likely that we’re actually going to get real container queries. Google is prototyping a syntax idea from David Baron and refined by Miriam Suzanne. Apparently, there has already been some prototyping done for a switch() syntax which is like container queries...
What’s Missing from CSS?
21.11.2020
The survey results from the State of CSS aren’t out yet, but they made this landing page that randomly shows you what one person wrote to answer that question. Just clicking the reload button a bunch, I get the sense that the top answers are:
Container Queries
Parent...
The Raven Technique: One Step Closer to Container Queries
10.11.2020
For the millionth time: We need container queries in CSS! And guess what, it looks like we’re heading in that direction.
When building components for a website, you don’t always know how that component will be used. Maybe it will be render as wide as the browser window is. Maybe two of them...
A Gentle Introduction to Using a Docker Container as a Dev Environment
24.9.2020
Sarcasm disclaimer: This article is mostly sarcasm. I do not think that I actually speak for Dylan Thomas and I would never encourage you to foist a light theme on people who don’t want it. No matter how wrong they may be.
When Dylan Thomas penned the words, “Do not go gentle into that good...
Using max() for an inner-element max-width
7.9.2020
I go into all this in The “Inside” Problem. The gist: you want an edge-to-edge container, but the content inside to have a limited width. I think there is absolutely no problem using a nested element inside, but it’s also fun to look at the possibilities of making that work on...
How to Make a Media Query-less Card Component
1.9.2020
Fun fact: it’s possible to create responsive components without any media queries at all. Certainly, if we had container queries, those would be very useful for responsive design at the component level. But we don’t. Still, with or without container queries, we can do things to make our components...
Holy Albatross with Widths
24.7.2020
Heydon’s Holy Albatross is a technique to have a row of elements break into a column of elements at a specific width. A specified parent width, not a screen width like a media query would have. So, like a container query (ya know, those things that don’t exist yet that we...
Backdrop Filter effect with CSS
16.7.2020
I love these little posts where some tricky-looking design is solved by a single line of CSS using a little-known property. In this case, the design is a frosted glass effect and the CSS property is backdrop-filter.
The approach? Easy peasy:
.container {
backdrop-filter: blur(10px);
}
The...
Sri Lankan Container Terminal Joins TradeLens Blockchain Platform
16.7.2020
South Asia Gateway Terminals becomes first Sri Lankan container terminal joined TradeLens platform
First Steps into a Possible CSS Masonry Layout
18.5.2020
It’s not at the level of demand as, say, container queries, but being able to make “masonry” layouts in CSS has been a big ask for CSS developers for a long time. Masonry being that kind of layout where unevenly-sized elements are layed out in ragged rows. Sorta like a typical...
Chromium lands Flexbox gap
9.5.2020
I mentioned this the other day via Michelle Barker’s coverage, but here I’ll link to the official announcement. The main thing is that we’ll be getting gap with flexbox, which means:
.flex-parent {
display: flex;
gap: 1rem;
}
.flex-child {
flex: 1;
}
That’s excellent...
Playing With (Fake) Container Queries With watched-box & resizeasaurus
5.5.2020
Heydon’s <watched-box> is a damn fantastic tool. It’s a custom element that essentially does container queries by way of class names that get added to the box based on size breakpoints that are calculated with ResizeObserver. It’s like a cleaner version of what Philip...
[David Baron’s] Thoughts on an implementable path forward for Container Queries
29.4.2020
That’s the title of a public post from David Baron, a Principal Engineer at Firefox, with thoughts toward container queries. I know a lot of people have been holding their breath waiting for David’s ideas, as he’s one of few uniquely qualified to understand the ins and outs...