Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Popover] Unreasonable complex selectors with duplicate classes generated #2705

Open
Westbrook opened this issue Apr 26, 2024 · 1 comment
Open

Comments

@Westbrook
Copy link
Contributor

/* right, left, start, end popover position with tip default to pointing right ▷ */
&.spectrum-Popover--left,
&.spectrum-Popover--left-bottom,
&.spectrum-Popover--left-top,
&.spectrum-Popover--right,
&.spectrum-Popover--right-bottom,
&.spectrum-Popover--right-top,
&.spectrum-Popover--start,
&.spectrum-Popover--start-top,
&.spectrum-Popover--start-bottom,
&.spectrum-Popover--end,
&.spectrum-Popover--end-top,
&.spectrum-Popover--end-bottom {
.spectrum-Popover-tip {
/* swap height and width for vertical triangle */
inline-size: var(--mod-popover-pointer-height, var(--spectrum-popover-pointer-height));
block-size: var(--mod-popover-pointer-width, var(--spectrum-popover-pointer-width));
inset-block: 0;
}
/* left popover with tip pointing right ▷ */
&.spectrum-Popover--left,
&.spectrum-Popover--left-bottom,
&.spectrum-Popover--left-top {
.spectrum-Popover-tip {
inset-inline: 100% auto;
}
}

This will generate selectors like .spectrum-Popover--withTip.spectrum-Popover--left.spectrum-Popover--left .spectrum-Popover-tip wherein the spectrum-Popover--left is duplicated.

Can this be smoothed out? It creates additional difficult when processing the output downstream.

@pfulton
Copy link
Collaborator

pfulton commented May 1, 2024

Tracking this in Jira via CSS-750

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants