Search
How Auto Margins Work in Flexbox
6.1.2020
Robin has covered this before, but I've heard some confusion about it in the past few weeks and saw another person take a stab at explaining it, and I wanted to join the party.
Say you have a flex container with some flex items inside that don't fill the whole area.
See the Pen
ZEYLVEX...
Getting In and Out of the Cryptocurrency Economy Can Be Costly
24.12.2019
Since bitcoin and digital currencies have become popular, fiat on and off-ramps have sprung up that allow investors to enter and exit the cryptoconomy. However, many of the entryways into cryptocurrency markets have a hefty fee between 1-4% of the overall purchase and in order to obtain fiat...
Make a smooth shadow, friend.
19.12.2019
One box-shadow is cool and all, but check out Philipp Brumm's tool for building out comma-separated multiple box-shadows, which result in a much smoother and more natural look.
This reminds me very much of the idea for easing linear-gradient. In a gradient, this smoothing effect is handled...
SLP Token Market Cap Surpasses $50 Million
12.12.2019
For over a year now, the Simple Ledger Protocol (SLP) token universe has grown quite vast. There are now more than 6,000 SLP tokens in existence and a number of SLP tokens have seen price discovery. Moreover, tokens listed on our SLP market capitalization aggregator show in the last two months...
Masking GIFs with other GIFs
3.12.2019
The other day, Cassie Evans tweeted a really neat trick that I’ve never seen before: using SVG to mask one GIF on top of another. The effect is quite lovely, especially if you happen to grab a colorful GIF and place it on top of a monochrome one:
See the Pen
Masking gifs with other gifs......
The Thought Process Behind a Flexbox Layout
27.11.2019
I just need to put two boxes side-by-side and I hear flexbox is good at stuff like that.
Just adding display: flex; to the parent element lays out the children in a row.
Well, that's cool. I guess I could have floated them, but this is easier.
They should probably take up the full space they have...
Pac-Man… in CSS!
11.11.2019
You all know famous Pac-Man video game, right? The game is fun and building an animated Pac-Man character in HTML and CSS is just as fun! I’ll show you how to create one while leveraging the powers of the clip-path property.
See the Pen
Animated Pac-Man by Maks Akymenko (@maximakymenko)
...
Two-Value Display Syntax (and Sometimes Three)
8.11.2019
You know the single-value syntax: .thing { display: block; }. The value "block" being a single value. There are lots of single values for display. For example, inline-flex, which is like flex in that it becomse a flex container, but behaves like an inline-level element rather than a block-level...
Making Tables Responsive With Minimal CSS
17.10.2019
Here’s a fabulous CSS trick from Bradley Taunt in which he shows how to make tables work on mobile with just a little bit of extra code. He styles each table row into a card that looks something like this:
See the Pen
Responsive Tables #2.5: Flexbox by Bradley Taunt (@bradleytaunt)
...
Multiline truncated text with “show more” button
4.9.2019
Now that we've got cross-browser support for the line-clamp property, I expect we'll see a lot more of that around the web. And as we start to see it more in use, it’s worth the reminder that: Truncation is not a content strategy.
We should at least offer a way to read that that truncated content...
Navbar Nudging on @keyframers
22.8.2019
I got to be the featured guest over on The Keyframers the other day. We looked at a Dribbble shot by Björgvin Pétur Sigurjónsson and then slowly built it, taking some purposeful detours along the way to discuss various tech.
We start by considering doing it entirely in CSS, then go for some light...
Tokens Built on Bitcoin Cash Are Cheaper to Send Than Those of Rival Networks
10.8.2019
Satoshi Nakamoto’s Bitcoin technology has inspired a lot of innovation spawning a myriad of tokens representing digitized assets. There are now token creation systems on blockchain networks like Omni Layer, Counterparty, and Ethereum. Each framework comes with the cost of sending tokens...
Cryptophyl.com Launches Dedicated Exchange for SLP Tokens and BCH
8.8.2019
The team behind the former cryptocurrency exchange Voltaire recently announced the launch of a new trading platform specifically designed for Simple Ledger Protocol (SLP) tokens. Three weeks ago the new exchange called Cryptophyl.com launched its trading engine and the first SLP token supported...
The Twelfth Fourth
4.7.2019
CSS-Tricks is 12 years old! Firmly into that Early Adolescence stage, I'd say ;) As we do each year, let's reflect upon the past year. I'd better have something to say, right? Otherwise, John Prine would get mad at me.
How the hell can a person go to work in the morning
And come home in...
Making width and flexible items play nice together
1.7.2019
The short answer: flex-shrink and flex-basis are probably what you’re lookin’ for.
The long answer
Let’s say you want to align an image and some text next to each other with like this:
Now let's say you reach for flexbox to make it happen. Setting the parent element to display: flex; is a good...
Different Approaches for Creating a Staggered Animation
27.6.2019
Animating elements, at its most basic, is fairly straightforward. Define the keyframes. Name the animation. Call it on an element.
But sometimes we need something a little more complex to get the right “feel" for the way things move. For example, a sound equalizer might use the same animation...
Different Approaches for Creating a Staggered Animation
27.6.2019
Animating elements, at its most basic, is fairly straightforward. Define the keyframes. Name the animation. Call it on an element.
But sometimes we need something a little more complex to get the right “feel" for the way things move. For example, a sound equalizer might use the same animation...
Movin’ Modals Along a Path
4.6.2019
Modals always be just appearin'. You might see one once in a while that slides in from one of the edges, or uses some kind of scale/opacity thing to appear from "above" or "below." But we can get weirder than that. Why not have them come in on an offset-path?
Just a swoopy arc is kinda fun.
...
Prevent Page Scrolling When a Modal is Open
3.6.2019
Please stop me if you've heard this one before. You open a modal, scroll through it, close it, and wind up somewhere else on the page than you were when you opened the modal.
That's because modals are elements on a page just like any other. It may stay in place (assuming that's what it's meant...
Change Color of SVG on Hover
13.5.2019
There are a lot of different ways to use SVG. Depending on which way, the tactic for recoloring that SVG in different states or conditions — :hover, :active, :focus, class name change, etc. — is different.
Let's look at the ways.
Inline SVG
Inline SVG is my favorite way to use...