vmware-clarity / core

Clarity is a scalable, accessible, customizable, open-source design system built with web components. Works with any JavaScript framework, created for enterprises, and designed to be inclusive.
https://clarity.design
MIT License
163 stars 41 forks source link

`CdsSelect` has !important inline CSS that disallows setting the padding on it, #309

Open squidjam opened 5 months ago

squidjam commented 5 months ago

Describe the bug

The CdsSelect element will make select tags to render with inline CSS styles that place padding-left and padding-right with an !important tag, making impossible (or at least difficult) to change the X-axis padding on the select element.

How to reproduce

Implement any CdsSelect as per instructions in the documentation

Steps to reproduce the behavior:

  1. Create a CSS file to alter the style on the cds-select tag
  2. Use --padding and set it to 0 30px
  3. Check the styles being applied using the development console inspection

Expected behavior

It should be possible to change the padding on the X-axis on the CdsSelect element.

Versions

Clarity project:

Clarity version:

Framework:

Framework version: N/A

Device:

Additional notes

Please note that this behavior overrides the internally set --padding value too. image

squidjam commented 1 week ago

Plink