Search
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...
Crypto is the New Black: 20 Crypto Jokes
3.8.2019
Any week is a news-filled week in the cryptoverse.
We were fine without BTC's 10K-up-and-down antics this week, but it met its first interest cut by the US Federal Reserve, and people are not quite sure how to interpret the impact of this event. Nonetheless, after a senator said that U.S. can't...
How much specificity do @rules have, like @keyframes and @media?
31.7.2019
I got this question the other day. My first thought is: weird question! Specificity is about selectors, and at-rules are not selectors, so... irrelevant?
To prove that, we can use the same selector inside and outside of an at-rule and see if it seems to affect specificity.
body {
background:...
Firearm Firm Wins Patent for Integrating Blockchain into ‘Black Box’ for Guns
30.7.2019
A new solution adds a blockchain-based recording system to firearms
When Cash Is Banned, Centralized Cryptos Are Not Going to Save You
30.7.2019
Australia is now moving forward with its proposed legislation to ban cash purchases over 10,000 AUD ($6,900) for business purposes. According to the treasury website: “The Black Economy Taskforce recommended this action to tackle tax evasion and other criminal activities.” While many...
‘Zimdollar’ Reboot: Bitcoin Fills Liquidity Gaps as New Zimbabwe Currency Flounders
12.7.2019
P2P bitcoin trade is surging in Zimbabwe via mobile exchange platforms like Ecocash, despite recent government efforts to curb the use of competing currencies locally. As of June 24, the reinstated Zimbabwe dollar (formerly RTGS dollar) is now the only recognized currency in the economically...
Why Bitcoin Maximalists Ignore the Value Proposition of BCH
7.7.2019
Some crypto companies keep wilfully ignoring BCH. Let’s compare the coins and see if BCH haters rail against Bitcoin Cash on purpose or simply due to a lack of understanding. Also read: Bitcoin and Black Market Fiat: Hyperinflation Crushes Venezuela as Global Devaluation Ramps Up Bitcoin...
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...
Bitcoin and Black Market Fiat: Hyperinflation Crushes Venezuela as Global Devaluation Ramps Up
2.7.2019
Venezuela is being crushed by staggering hyperinflation as a sharply divisive political crisis has the economy in ruins. Some are seeking refuge in alternatives to the national currency, like foreign fiat and crypto. The situation also calls into question the long-term trajectories of other, less...
Kapesní drony Black Hornet budou poprvé nasazeny do akce. Kde je americká armáda využije?
2.7.2019
V únoru média informovala o tom, že americká armáda utratila 39 milionů za vývoj tzv. Black Hornet Personal Reconnaissance Systems. Jde o průzkumné drony, které lze vzhledem k jejich malým rozměrům lehce skrýt v dlani či kapse.
Tiskový mluvčí 82. výsadkové divize nyní oznámil, že „černé sršně“
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...
[aktualita] Pátá sezóna Black Mirror bude mít tři díly a premiéru 5. června (trailer)
17.5.2019
Netflix před pár hodinami zveřejnil trailer k páté sezóně dnes již v podstatě kultovního seriálu Black Mirror, který řeší stinné stránky technologií a internetu. Nové díly mají mít na streamovací službě premiéru 5. června 2019. Tvůrci trochu zvolní v tom smyslu, že nabídnou pouze tři díly. Názvy...
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...
Getting To Know The MutationObserver API
8.5.2019
MutationObserver watches the DOM, specifically the places you tell it to, like:
document.querySelector('#watch-this');
...and it can tell you (trigger a callback) when stuff happens — like when a child is added, removed, changed, or a number of other things.
I used it just the other day...
Convert Video to Grayscale
24.4.2019
I’m a JavaScript fanatic but I’ve always been fascinated with media manipulation. Maybe it’s because I’ve secretly always wanted to be a designer, but I’m fine with being able to manipulate art with software instead of create the art myself. One type of art I’ve...