ic-ui-kit icon indicating copy to clipboard operation
ic-ui-kit copied to clipboard

Internal issue 3132 - Using the radio button component causes all apps padding to disappear

Open ticket-sync[bot] opened this issue 2 months ago • 1 comments

Summary of the bug

The radio button component is not using the shadow DOM in @Component styles, so styles are leaking outside of the component. It is then importing normalise.css which is overriding all app styles.

This means that all padding within my app is lost when using the radio button component meaning I am not currently using it

🪜 How to reproduce

View reproduction of this bug in StackBlitz The linked StackBlitz demonstrates that adding styling for the "container" class, inadvertently affects ic-radio-option because its styling hasn't been scoped.

📸 Screenshots or code

Image

🧐 Expected behaviour

Styling in ic-radio-option should be scoped so that its styling doesn't affect other components and vice versa

ticket-sync[bot] avatar Nov 11 '25 09:11 ticket-sync[bot]

It seems that the scoped: true flag needs to be added to the @Component decorator. This will likely affect spec tests and possibly Cypress tests

EDIT: this is something we do in Divider and Menu already - follow their lead?

GCHQ-Developer-112 avatar Nov 11 '25 09:11 GCHQ-Developer-112