Page MenuHomePhabricator

Decide on an approach to style resets
Closed, ResolvedPublic

Description

If and how do we insulate our components' styles from other styles on the page, not developed with isolation in mind?
Example: How would a global style p { margin: 20px } affect the style of a <p> element in one of our components?

  • e.g. reset.css/normalize.css

Event Timeline

Comparison of tools to use for style resets

normalize.css

✔️ Browser Support:

Chrome
Edge
Firefox ESR+
Internet Explorer 10+
Safari 8+
Opera

✔️ Resets margins on all elements
❌ Does not reset padding on all elements.
❌ No special accessibility rules.

bootstrap-reboot

Build on top of nomralize.css
Used by bootstrap

❌ Browser Support

Chrome >= 60
Firefox >= 60
Edge >= 16
iOS >= 10
Safari >= 10
Android >= 6

Does not support IE and Opera

ress

Build on top of nomralize.css
Used by Vuetify

✔️ Browser Support:

Chrome
Edge
Firefox ESR+
Internet Explorer 10+
Safari 8+
Opera

✔️ Resets the margins and paddings on all elements.
✔️ Has accessibility rules:

  • Hide content from screens but not screen readers
  • Specify the progress cursor of updating elements
  • Specify the pointer cursor of trigger elements
  • Specify the unstyled cursor of disabled, not-editable, or otherwise inoperable elements