Combining CSS :has() And HTML 

Amit Sheen demonstrates using :has() to apply styles conditionally when a certain <option> in a <select> element is chosen by the user and how we gain even more conditional styling capabilities when chaining :has() with other pseudo-classes, such as :not() — no JavaScript necessary. https://smashingmagazine.com/2024/05/combining-css-has-html-select-conditional-styling/

Établi 15d | 2 mai 2024 à 12:30:03


Connectez-vous pour ajouter un commentaire

Autres messages de ce groupe

Beyond CSS Media Queries

Juan Diego Rodriguez explains why media queries still occupy a vital role in responsive layouts; only they are now one tool in a larger toolbox with modern techniques that are best when used together.

16 mai 2024 à 16:40:15 | Smashing magazine
Transforming The Relationship Between Designers And Developers

Is there such a thing as harmony between designers and developers in the workplace, and if so, how can it be achieved? In this article, Chris Day explores the challenges of effective collaboration, ou

15 mai 2024 à 12:50:04 | Smashing magazine
Why Designers Aren’t Understood

How do we conduct UX research when there is no or only limited access to users? Here are some workarounds to run UX research or make a strong case for it. An upcoming part of [Smart Interface Design P

14 mai 2024 à 14:10:06 | Smashing magazine
The Times You Need A Custom @property Instead Of A CSS Variable

Preethi Sam walks through an example that demonstrates where custom properties are more suitable than variables while showcasing the greater freedom and flexibility that custom properties provide for

13 mai 2024 à 14:40:18 | Smashing magazine
The Modern Guide For Making CSS Shapes

In this comprehensive guide, Temani Afif explores different techniques for creating common shapes with the smallest and most flexible code possible. https://smashingmagazine.com/2024/05/modern-guide-m

10 mai 2024 à 14:20:20 | Smashing magazine
The Forensics Of React Server Components (RSCs)

React Server Components (RSCs) combine the best of client-side rendering, and author Lazar Nikolov thoroughly examines how we got here with a deep look at the impact that RSCs have on the page load ti

9 mai 2024 à 15:40:02 | Smashing magazine
How To Run UX Research Without Access To Users

How do we conduct UX research when there is no or only limited access to users? Here are some workarounds to run UX research or make a strong case for it. An upcoming part of <a href='https://smart-in

7 mai 2024 à 18:10:02 | Smashing magazine