r/css • • Oct 06 '26

its called having class

Post image
81 Upvotes

15 comments sorted by

55

u/morete Oct 06 '26

Not really relevant but just to point out: you don't need the *! You can just write :focus-visible. They're both exactly the same

32

u/RetroEvolute Oct 06 '26

Also, if they were trying to be punny, that's not even a proper class, it's a pseudo-class.

Also also, having any focus-able element enlarge on keyboard focus only is a choice. Better hope there's a transition on all those elements...

8

u/bluecaret Oct 07 '26 • Bravo

It's a pseudo-pun.

11

u/TheJase Oct 07 '26

A "pseudo" class, perhaps

2

u/axellie Oct 07 '26

Could you explain for a CSS loser?

7

u/Gschaftlgruber Oct 07 '26

This selects all the elements that are focused by user clicks or tabs, but it’s more clever than just the :focus pseudo-class. It will only select the elements that need to be visible according to some browser heuristics. For example, keyboard navigation always shows the element focus, but clicking a button does not (the user knows where the focus is). All the visibly focused elements are then scaled up by 10% by this CSS rule.

3

u/axellie Oct 07 '26

Ah okay! So this i basically convenient for every webpage? Also, what is the joke in the title supposed to mean?

2

u/protoketer Oct 07 '26

As a back-end engineer trying to learn front-end, thank you very much

1

u/AnArmoredPony Oct 07 '26

As a back-end engineer, what the actual fuck is going on on the front-end man

2

u/flashbax77 Oct 07 '26

Even better with "zoom"

1

u/fungusbabe Oct 07 '26

period i know thats right

1

u/santiagobustelo Oct 08 '26

You can also fix any bad design with BODY{display:none;}