Skip to content

Normalize.css has higher precedence in version 3 #4698

@sawyerh

Description

@sawyerh

While working through the v3 migration, I got tripped up by a change in ordering between _normalize.scss and some of the content styles, like _typography.scss.

For instance, in v2 headings have 0 for their margins, but in v3 headings have non-zero margins because _normalize.scss has higher precedence:

Version 2.x Version 3.x
CleanShot 2022-05-17 at 15 44 12@2x CleanShot 2022-05-17 at 15 46 55@2x

Similarly, the margins for buttons following a p tag are different:

Version 2.x Version 3.x
CleanShot 2022-05-17 at 15 49 09@2x CleanShot 2022-05-17 at 15 48 23@2x

Steps to reproduce the bug

I've created a repo reproducing this issue here: https://github.com/sawyerh/uswds-normalize-reproduction

To reproduce:

  1. Install the project
  2. Run the dev server
  3. Toggle which stylesheet is commented out then wait for the stylesheet to recompile

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions