Tag

:has() selector

0 views collected around this technical thread.

Sohu Tech Products
Sohu Tech Products
Apr 24, 2024 · Frontend Development

CSS :has Pseudo-class for Modal Scroll Locking

This article shows how to lock page scrolling when a modal is open by using the new CSS :has pseudo‑class—replacing JavaScript‑driven overflow toggles that fail with nested dialogs—and demonstrates a simple body:has(dialog[open]) selector that works across all modern browsers.

:has() selectorCSSJavaScript
0 likes · 4 min read
CSS :has Pseudo-class for Modal Scroll Locking
Sohu Tech Products
Sohu Tech Products
Dec 28, 2022 · Frontend Development

Using the CSS :has Selector to Style Parent Elements Based on Child Content

This article explains the new CSS :has parent selector, showing how to conditionally apply styles to parent elements based on the presence of child elements such as images, links, or form inputs, and provides multiple practical examples and browser support details.

:has() selectorCSSWeb Development
0 likes · 10 min read
Using the CSS :has Selector to Style Parent Elements Based on Child Content
Laravel Tech Community
Laravel Tech Community
Dec 15, 2022 · Frontend Development

jQuery 3.6.2 Released with Adjustments for Chrome’s New :has() Selector

jQuery 3.6.2, released four months after version 3.6.1, introduces compatibility fixes for Chrome’s newly added :has() selector, handling forgiving parsing and complex selector scenarios, while ensuring older versions may still be affected and directing users to the full changelog for additional changes.

3.6.2:has() selectorChrome
0 likes · 3 min read
jQuery 3.6.2 Released with Adjustments for Chrome’s New :has() Selector