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

Overriding --thaw-drawer--size and other variables set inline in element style #301

Open
ydirson opened this issue Nov 11, 2024 · 3 comments

Comments

@ydirson
Copy link
Contributor

ydirson commented Nov 11, 2024

OverlayDrawer width is by default driver by a width: var(--thaw-drawer--size); CSS rule, but the --thaw-drawer--size is being set inline in the element, and thus cannot be overridden by CSS - the width property itself has to be overridden, making the variable not very useful.
git grep -B1 '"--' reveals that a few more places may show similar limitations.

@luoxiaozero
Copy link
Collaborator

You can use !important to override inline style.

@ydirson
Copy link
Contributor Author

ydirson commented Nov 12, 2024

You can use !important to override inline style.

Thanks for pointing that out. They seem to say, though, that it should mostly be used as a workaround.

Wouldn't be useful to use layers in the builtin styles, so the app author would have more flexibility?

@luoxiaozero
Copy link
Collaborator

Maybe I can add DrawerSize::Px(u16) to fix this problem?

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

No branches or pull requests

2 participants