Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Update Govspeak "Warning Text" component styles #4487

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
* Use component wrapper on reorderable list component ([PR #4474](https://github.com/alphagov/govuk_publishing_components/pull/4474))
* Use "button" button type for copy to clipboard component ([PR #4480](https://github.com/alphagov/govuk_publishing_components/pull/4480))
* Use component wrapper on signup link component ([PR #4481](https://github.com/alphagov/govuk_publishing_components/pull/4481))
* Update Govspeak "Warning Text" component styles ([PR #4487](https://github.com/alphagov/govuk_publishing_components/pull/4487))

## 46.2.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,24 @@

.govspeak, // Legacy class name that's still used in some content items - needs to be kept until `.govspeak` is removed from the content items.
.gem-c-govspeak {
@import "govuk/components/warning-text/warning-text";

.help-notice {
$icon-size: 35px;
$line-height-mobile: 20px;
$line-height-tablet: 25px;
$icon-spacing: 10px;

margin: 2em 0;
padding-left: calc($icon-size + $icon-spacing);
position: relative;

// Add '!' icon
background-image: url("govuk_publishing_components/icon-important.svg");
background-size: $icon-size $icon-size;
background-repeat: no-repeat;
min-height: $icon-size;
padding-left: $icon-size;

// Center the icon around the baseline
padding-top: calc(($icon-size - $line-height-mobile) / 2);

@include govuk-media-query($from: tablet) {
padding-top: calc(($icon-size - $line-height-tablet) / 2);
&::before {
content: "!";
@include govuk-typography-weight-bold($important: false);
// stylelint-disable scss/at-extend-no-missing-placeholder
@extend .govuk-warning-text__icon;
}

p {
margin-left: 1em;
@include govuk-font($size: 19, $weight: bold);
}
}
Expand Down
Loading