TheoSoti
banner
theoleff.bsky.social
TheoSoti
@theoleff.bsky.social
Freelance front-end developer — I share CSS and JS tips & tricks.
Checkout my blog https://theosoti.com
Have you ever wanted to create an inverted hover effect?
I'll show you how with just 2 extra lines of CSS!

No hacks. No JavaScript. Just the magic of the :has() selector.
CSS is evolving fast, and :has() is proof of that.
January 13, 2025 at 4:10 PM
Did you know CSS has a hidden gem called “display: contents"?

“display: contents" makes an element disappear from the layout visually, while keeping its children styled and functional as usual.

Checkout the example below, or go to the codepen https://buff.ly/3BP8hD4 I created to see it live.
January 8, 2025 at 9:50 AM
Did you know you could have responsive text without using any media queries?

It can be done with one line of code:
font-size: clamp(1rem, 0.5rem + 2vw, 2rem);

Not easily readable at first, but once you know the logic it's pretty simple (thread) ⬇️
December 11, 2024 at 10:09 AM
Need to limit text to 3 lines with a neat ellipsis? Here's a quick CSS trick:

display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;

Perfect for cards and previews!

#CSS #learnCSS
December 4, 2024 at 7:00 PM
Ok the gif didn't work. This is the gif I wanted to import:
December 2, 2024 at 7:42 AM