chore(icons): centralize rtl handling for icons in swc-ui-icon - #6579
chore(icons): centralize rtl handling for icons in swc-ui-icon#6579cdransf wants to merge 1 commit into
Conversation
|
d68ef6c to
6be2d79
Compare
📚 Branch Preview Links🔍 Gen1 Visual Regression Test ResultsWhen a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:
Deployed to Azure Blob Storage: If the changes are expected, update the |
6be2d79 to
3072ee4
Compare
3072ee4 to
9447838
Compare
Description
Moves chevron/arrow RTL mirroring into
<swc-ui-icon>itself (newui-icon-direction.css, curatedchevron/arrowlist,iconnowreflect: true). Removesaccordion-item.css's now-redundant mirror rule (kept its RTL+open rotation compensation, which is genuinely Accordion-specific). Adds 5 tests covering direct + inheriteddir, both curated icons, and non-directional exclusion. Note::host(:dir(rtl))[icon="x"]silently fails to match in Chromium; both conditions must be inside:host()'s own argument (:host(:dir(rtl)[icon="x"])), documented in the CSS.Motivation and context
RFC icon-rfc.md section 11 (resolved): mirror directional UI icons via
:dir(rtl)in the UI icon stylesheet, owned by<swc-ui-icon>, not components.Related issue(s)
Screenshots (if appropriate)
None. Accordion's VRT snapshot (covers RTL) is byte-identical before/after.
Author's checklist
Reviewer's checklist
patch,minor, ormajorfeaturesManual review test cases
swc-ui-icon(e.g. Accordion): flip pagedirtortl, confirm it mirrors; flip back, confirm it un-mirrors.Device review
Accessibility testing checklist
IconBase's existing host-owned a11y (decorative by default,role="img"when labeled) is untouched; the icon's own inner SVG was already never announced.