Feature summary:
Allow the :focus-within pseudo-class in CSS pages using the sanitized-css content model (e.g. Template:.../styles.css).
Use case(s):
Some templates require styles to change when one of their descendant elements receives keyboard focus. The standard CSS way to express this is with the :focus-within pseudo-class. For example:
menu.dropdown:focus-within { transition: none; }
However, when the stylesheet uses the sanitized-css content model, :focus-within is rejected, making it impossible to implement this behaviour in TemplateStyles.
Benefits:
Supporting :focus-within would allow TemplateStyles to use a standard CSS feature that is already widely supported by browsers. It would improve accessibility by making it easier to style components that respond appropriately to keyboard navigation and focus, without requiring other workarounds.