-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
[core] Rename CSS vars to include component name #820
base: master
Are you sure you want to change the base?
Conversation
atomiks
commented
Nov 15, 2024
- I have followed (at least) the PR section of the contributing guide.
max-width: var(--popover-available-width); | ||
max-height: var(--popover-available-height); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we add component prefixes, this makes classes like this non-reusable across different popups... @vladmoroz. In fact, I'm not sure if this popup is used for popover specifically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm yeah good point, I was thinking that the Popup component would be used across different popups, such as Popovers, Preview Cards, Dialogs, etc. Let's discuss it on Monday in detail. We need to consider whether prefixing everything maps well to how components would be styled.
elements.floating.style.setProperty(`--${name}-arrow-origin`, arrowOrigin); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The arrow origin and transform origin are a bit different. For edge-aligned popups, you want the transform-origin
to be at the edge, not arrow's point/anchor center.
Netlify deploy preview |