Search
:where() has a cool specificity trick, too.
30.3.2021
There is a lot of hype on the :is() pseudo-selector lately, probably because now that Safari 14 has it, it’s supported across all the major browsers. You’ve got Miriam tweeting about it, Kevin Powell doing a video, Šime …
The post :where() has a cool specificity trick, too....
Tricking WCV
30.3.2021
Google has said that Web Core Vitals (WCV) are going to be an SEO factor, and the date is nigh: May 2021. So, I’m seeing some scrambling to make sure those metrics are good. Ya know, the acronym …
The post Tricking WCV appeared first on CSS-Tricks.
You can support CSS-Tricks by being...
Legendary Skateboarder Tony Hawk to Auction NFT of Trick Footage
23.3.2021
Tony Hawk joins a growing list of celebrities digitizing and selling their collectibles as non-fungible tokens. The skateboarding icon plans to auction a film of the last time he performed the Ollie 540 – the trick he first mastered 32 years ago. Ethernity Chain to Mint and Auction...
In Praise of the Unambiguous Click Menu
18.3.2021
I still remember my excitement when I learned how to build a hover-triggered submenu with just CSS. (It was probably after reading this 2003 article from A List Apart.) At the time, it was a true CSS trick. Seriously. …
The post In Praise of the Unambiguous Click Menu appeared first...
Valve Bans 'Very Positive' Developer For Trying To Trick Steam Users
17.2.2021
Emoji Evolution is a puzzle game on Steam about combining weird symbols. Or at least it was: Valve recently removed it from the storefront and banned its creator’s developer account after apparently discovering how they were exploiting Steam’s layout to try to trick people into playing...
Animating a CSS Gradient Border
8.2.2021
This little trick for gradient borders is super useful:
.border-gradient {
border: 5px solid;
border-image-slice: 1;
border-image-source: linear-gradient(to left, #743ad5, #d53a9d);
}
Here’s some basic demos from our article on the subject. Sephanie Eckles was sharing around the idea...
Going From Solid to Knockout Text on Scroll
3.2.2021
Here’s a fun CSS trick to show your friends: a large title that switches from a solid color to knockout text as the background image behind it scrolls into place. And we can do it using plain ol’ HTML and …
The post Going From Solid to Knockout Text on Scroll appeared first...
Dynamically Switching From One HTML Element to Another in Vue
2.2.2021
A friend once contacted me asking if I had a way to dynamically change one HTML element into another within Vue’s template block. For instance, shifting a <div> element to a <span> element based on some criteria. The trick was …
The post Dynamically Switching From One HTML...
Bulletproof flag components
29.1.2021
A clever use of CSS grid from Jay Freestone to accomplish a particular variation of the media object design pattern (where the image is centered with the title) without any magic numbers anything that isn’t flexible and resiliant.
The trick …
The post Bulletproof flag components...
Where Brooklyn At? Spike Lee Gets His Own Funko Pop Figurine, Cementing His Creative Genius on the Culture
25.1.2021
Spike Lee Funko Pop | $9 | TargetRead more
Hat-trick hero: Empty stadiums get blockchain and soccer to play together
24.1.2021
Soccer clubs are now resorting to blockchain and crypto for fan engagement, tokenization and even new signings, with the potential for many more use cases
Breath Of The Wild Player Snipes Guardian From Over 1,400 Meters Away
11.1.2021
Although The Legend of Zelda: Breath of the Wild came out almost four years ago, folks continue to pull off incredible feats in the game. Case in point: this player nailing a Guardian with an arrow from over 1,400 meters away.Read more
Here's a Little Magic Trick: Get a $25 Xbox Gift Card for $21
6.1.2021
$25 Xbox Gift Card | $21 | Eneba | Use code XBOX20OFFRead more
A Calendar in Three Lines of CSS
24.12.2020
This article has no byline and is on a website that is even more weirdly specific than this one is, but I appreciate the trick here. A seven-column grid makes for a calendar layout pretty quick. You can let the days (grid items) fall onto it naturally, except kick the first day over to the correct...
Return a Default Value with Promises Using catch
23.12.2020
Last week I tweeted all of you looking for your best JavaScript Array and Promise tricks, and as always, it didn’t disappoint — I learned quite a bit! Today’s JavaScript Promise trick is brought to you by Claudio Semeraro: how to use catch to set a default value instead of...
Break a forEach Loop with JavaScript
22.12.2020
I’ve written a number of blog posts about JavaScript tricks: Promise tricks, type conversion tricks, spread tricks, and a host of other JavaScript tricks. I recently ran into another JavaScript trick that blew my mind: how to break a forEach loop. To break the forEach loop at any point,...
It's Okay To Love 'Bad' Art
15.12.2020
The further I get from my childhood, the closer I come to articulating what I miss about it. Through the confusing fog of nostalgia, it’s easy to mix up what you thought you loved, with what you actually loved. I don’t miss being a kid—I’m both taller and funnier as an adult—but I do covet...
‘Bypass’ Attack in Coldcard Bitcoin Wallet Could Trick Users Into Sending Incorrect Funds
25.11.2020
Bitcoin hardware wallet Coldcard is fixing a flaw that could trick users into sending bitcoin on mainnet when they meant to use its testnet
Use a Submit Button Outside of !
24.11.2020
Have you ever felt like you’ve been a professional developer or designer forever, and somehow not known something basic, and borderline hate yourself? That’s me with a trick that was introduced to me by Miguel Piedrafita: 🔥 You can submit forms from a button outside of the form...
console.log({ myVariable });
19.11.2020
I think this might be my most popular tweet of all time, but I’m not sure how to verify that these days. I’ll restate this neat little trick here because blogging is cool and fun.
I used to do this a lot while debugging JavaScript:
console.log("myVariable: ", myVariable);
But now I...