:target-within
This feature is discouraged — The :target-within pseudo-class was dropped from the specification in favor of :has(:target).
Consider using :has() , :target instead.
For more information, see: selectors-4/#the-target-pseudo (CSSWG draft) , w3c/csswg-drafts/issues/8357 (GitHub)
The :target-within CSS pseudo-class matches the element with an ID matching the URL fragment and its ancestors.
Status
Discouraged
MDN documentation
Browser support
- Chrome ❌
- Chrome Android ❌
- Edge ❌
- Firefox ❌
- Firefox for Android ❌
- Safari ❌
- Safari on iOS ❌
View as JSON | Edit this feature | Report an issue | Web-features entry: source, dist