element-hq / compound

Element's design system
https://compound.element.io
Apache License 2.0
12 stars 3 forks source link

Compound doesn't prevent mistakes in CSS class names #247

Open t3chguy opened 1 year ago

t3chguy commented 1 year ago

https://github.com/vector-im/compound-web/pull/103 changed a used classname from shortcut to caption but the css file wasn't updated - https://github.com/vector-im/compound-web/blob/main/src/components/Tooltip/Tooltip.module.css#L29 - this caused the styles to not be applied. This caused the styles to revert. Should be prevented in CI as an easy way to prevent mistakes.

t3chguy commented 1 year ago

https://www.npmjs.com/package/typescript-plugin-css-modules or https://github.com/Quramy/typed-css-modules might do the trick

t3chguy commented 1 year ago

Vite issue https://github.com/vitejs/vite/issues/12917