liground icon indicating copy to clipboard operation
liground copied to clipboard

Avoid unscoped styles & using IDs

Open Zerthox opened this issue 4 years ago • 0 comments

We currently still have unscoped styles in some components, which may lead to conflicts in styling. We also have a lot of IDs used in our components. This is bad since HTML requires IDs to be unique. See id attribute @ MDN & Html duplicated ID @ Stack Overflow.

I'd suggest to:

  1. Use scoped styles in components whenever possible. Split the styles into a global & scoped part if necessary.
  2. Prefer classes to ids unless the id is 100% guaranteed to be unique in the whole DOM.

Zerthox avatar Mar 12 '21 13:03 Zerthox