mastodon.xyz is one of the many independent Mastodon servers you can use to participate in the fediverse.
A Mastodon instance, open to everyone, but mainly English and French speaking.

Administered by:

Server stats:

842
active users

#csstricks

0 posts0 participants0 posts today

If you did not know, in CSS you can detect if the device you're running on has hover support or not (e.g. touchscreens) by using this media query:

@media (hover : hover) { ... }

or

@media (hover : none) { ... }

so you can handle the unavailability of hover effects even if you're planning to run on large tablets

A little @codepen demo I made some years back: #duotone a B&W image using pure #CSS #blending (and very little code in total) codepen.io/thebabydino/pen/MWb

With a comparison slider between the two blend modes that may be used for the effect and a picker for duotone palette base.

Created for my Taming Blend Modes #CSSTricks article css-tricks.com/taming-blend-mo

Saw this in @cassidoo newsletter and it blew my mind:

"Text fragments are a powerful feature of the modern web platform that allows for precise linking to specific text within a web page without the need to add an anchor! This feature is complemented by the ::target-text #CSS pseudo-element, which provides a way to style the highlighted text."

alfy.blog/2024/10/19/linking-d?

Continued thread

`feComposite` & `feBlend` take 2 inputs: the 2 layers we're compositing/ blending. Compositing/ blending take 2 layers and combine them in a single one using a compositing operation/ blend mode.

`operator='out'` for `feComposite` is kinda like `mask-composite: subtract` - mask compositing is something I've detailed in this #cssTricks article css-tricks.com/mask-compositin

#tinySVGtip Create a barcode ▌│█║▌║▌║ with a CSS gradient pattern (only a handful of CSS declarations in total) + a super simple SVG filter!

Also an entry for this week's #CodePenChallenge codepen.io/thebabydino/pen/abr

The background gradients pattern was heavily inspired by "cicada stripes" from the CSS3 Patterns gallery by @leaverou projects.verou.me/css3patterns

#CSS#SVG#filter
Continued thread

Animating a custom property* that the gradients used for the effect depend on can also produce cool effects, like in codepen.io/thebabydino/pen/wvR - also an entry for this week's #CodePenChallenge😎

And a solution to mastodon.social/@anatudor/1112

*not yet in Firefox stable, only in Nightly mastodon.social/@anatudor/1121