-
-
Notifications
You must be signed in to change notification settings - Fork 101
CSS Variables extension, PX to EM #1389
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
base: main
Are you sure you want to change the base?
Conversation
- Added and extended CSS variables - Converted PX values to REM
Out of curiosity, why Also, I think |
.large .bubble-container { | ||
height: 44px; | ||
--bubble-separator-height: 2.75em; | ||
} |
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.
How does this work? I see you do this in more places.
I know that this works:
height: var(--bubble-separator-height, 2.75em);
But replacing:
height: 44px;
with:
--bubble-separator-height: 2,75em
How does CSS knows, that this is the height-property which is set here? Curious to learn/understand.
transition-duration: var(--bubble-backdrop-transition-duration, 0.3s); | ||
transition-timing-function: var(--bubble-backdrop-transition-timing-function, ease-in-out); |
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.
Indentation is off
Hi! I hope you're doing well. I'm currently reviewing your PR and I've run into a few issues, actually the first three CSS files I checked (maybe just bad luck) needed some fixes because some elements were not looking the same 😅 I'll wait for your response before continuing, since I can't merge the PR as it is. I'm planning to release the stable v3.0.0 in less than 2 weeks 🥳 So if I don't have news from you until that, this PR will be for the next release, like v3.0.1 🙂 |
Proposed change
Extend Bubble Card CSS Variables to give users easier access to theming.
Convert Bubble Card full to EM units instead of PX.
Type of change
Example configuration
Example printscreens/gif
Visually Bubble Card remains the same:

Additional information
Some user styling could be overrided by these changes - to specify transition and margin. It has been splitted into standalone properties rather than using transition: all 1.5s; for future user-overrides specific (for ex. only to change the duration of the animation via variable).
Fallbacks remained the same. For users with compatibility issue - take a look at new css vars and consider changing them instead of other code overrides.
This PR opens the way to style Bubble Card more easily with just CSS variables without need to use !important.
Additional documentation needed.
This can be used to scale Bubble Card proportionally and globally. Change the font-size to see how the Bubble Card scales. Changing this value scales everything, not just a font-size. To understand how does em / rem sizing works, take a look here: https://www.a11y-collective.com/blog/what-is-rem-in-css/
Checklist
If user exposed functionality or configuration variables are added/changed: