Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Move font style to section-button in accordion #2514

Conversation

JoshuaLicense
Copy link

@JoshuaLicense JoshuaLicense commented Jan 21, 2022

The accordion heading text is currently not styled when JavaScript (JS) is disabled. Current font styling applies to govuk-accordion__section-heading-text, but that element only exists when JS is enabled.

This MR:

  • Moves the govuk-font() macro to govuk-accordion__section-button.
  • Removes govuk-font() from govuk-accordion__section-toggle and replaces with the explicit macros govuk-typography-responsive($size: 19) & govuk-typography-weight-regular - to reduce the font property duplication; govuk-accordion__section-toggle will inherit the font properties from govuk-accordion__section-button.

Closes #2481

Happy to make any changes if required.

@36degrees 36degrees self-requested a review January 25, 2022 10:28
Copy link
Contributor

@36degrees 36degrees left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks very much @JoshuaLicense – these changes look good to me 👍🏻

This just needs another review from our team before we can get this merged.

Copy link
Contributor

@owenatgov owenatgov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good ot me too 👍🏻 Thanks @JoshuaLicense! This just needs the changelog conflict resolved and we're good to go.

Joshua License added 2 commits January 25, 2022 20:29
The accordion heading text is not styled while JavaScript (JS) is disabled. `govuk-accordion__section-heading-text` is styled but that element only exists while JS is enabled.

Remove font from `govuk-accordion__section-toggle` to reduce duplicate styles.
@JoshuaLicense JoshuaLicense force-pushed the move-font-style-to-govuk-accordion-section-button branch from a9c6630 to a4ec7b7 Compare January 25, 2022 20:31
@36degrees 36degrees merged commit 2f9d8c1 into alphagov:main Jan 26, 2022
@owenatgov owenatgov mentioned this pull request Feb 8, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accordion styles missing the correct font when javascript not available
3 participants