-
Notifications
You must be signed in to change notification settings - Fork 330
Description
Bug Description
First noted by @kelvinballoo as part of the QA, h1 and h2 titles have the wrong color in some cases.
Looking at this in more detail, after removing the googlesitekit-heading-X classes, the WP Core styles for headings take precedence:
eg. for the "Settings" heading on the main plugin settings page the color is being taken from the WP Core styles for h1 tags.
The expected behaviour for headings without a specific color override would be to take the default color defined in on the .googlesitekit-plugin class:
| color: $c-primary; |
However the heading tag styles are higher specificity that this general class.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- The plugin default styles should define a default font color for each heading tag
h1,h2,h3,h4,h5,h6with higher specificity than the WordPress heading styles based on the plugin design guidelines. - Typography components which use these heading tags, which have no additional style overrides, should display with these default font colors in the dashboard.
Implementation Brief
- Update
assets/sass/base/_defaults.scss:- Remove the previous definitions of
h3andh6styles as these should all be handled by the typography styles now: site-kit-wp/assets/sass/base/_defaults.scss
Lines 48 to 53 in d14b485
h3, h6 { color: $c-surfaces-on-surface; font-family: $f-secondary; line-height: 1.16; } - Add a css block for
h1,h2,h3,h4,h5andh6, setting onlycolor: $c-primary;as all other styles are handled by the Typography component.
- Remove the previous definitions of
Test Coverage
- Some VRTs may need to be updated, no addition test coverage required.
QA Brief
- Verify that
Settingsheading in settings screens (as reported in the issue) has primary color (#161b18) - Do a general smoke testing
Changelog entry
- Fix color issues for hX tags created by the
Typographycomponent.