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

.govie-radios--inline .govie-radios__item is not specific enough when size attribute is also defined #223

Closed
ekynoxe opened this issue Aug 7, 2024 · 1 comment

Comments

@ekynoxe
Copy link

ekynoxe commented Aug 7, 2024

Looking at the working example at https://storybook.design-system.ogcio.gov.ie/?path=/docs/form-radio--docs#inline, which works, it doesn't have a size attribute.

When using .govie-radios--medium in our codebase (FormsIE), the clear: none; property gets overridden by clear: left; defined in .govie-radios--medium .govie-radios__item.

The issue is that the specificity for both .govie-radios--medium .govie-radios__item and .govie-radios--inline .govie-radios__item is identical, therefore it's pot-luck which arrives first in the compiled css.

I have fixed this issue with an override locally in our file like so:

.govie-radios--inline.govie-radios--medium .govie-radios__item {
  clear: none;
}

But ideally, this would be taken care of in this library

Identical specificity leads to the issue:

Screenshot 2024-08-07 at 16 07 51

Increased specificity when size is included fixes the problem:
Screenshot 2024-08-07 at 16 10 45

@hamza14khan
Copy link
Contributor

Resolved in 0.4.4 #219

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