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

width: auto and height: auto are ignored when applied in more specific CSS classes #662

Open
NipponSunrise opened this issue Feb 6, 2025 · 0 comments

Comments

@NipponSunrise
Copy link

NipponSunrise commented Feb 6, 2025

Description:

Setting width: auto and/or height: auto in a more specific CSS class does not override a general width/height definition. Instead, the element retains the width/height from the general rule, ignoring the expected CSS specificity behavior. Other styles (e.g., color, border, font) correctly follow specificity rules, so the issue is specific to dimensions calculation.

Tracing viewComponent.style confirms that rules are switched correctly, but as a result the button does not resize.

Code to Reproduce:

https://haxeui.org/builder/?95a582d0

Actual Behavior:

width: auto and height: auto are ignored if the general definition has a fixed width and height. The element remains stuck at the width and height defined in the general selector.

Expected:

The more specific .i18n_en class should override width: 6rem with width: auto and height: 2rem with height: auto.

Environments:

HaxeUI Version: 1.7 (HTML5 runtime)
Official Playground

@NipponSunrise NipponSunrise changed the title width: auto is ignored when applied in more specific CSS classes width: auto and height: auto are ignored when applied in more specific CSS classes Feb 6, 2025
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

1 participant