-
Notifications
You must be signed in to change notification settings - Fork 340
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Display the ! character inside a circle, rather than using an image for the circle and ! icon. Add aria-hidden to the ! character to ensure it isn't read by AT.
- Loading branch information
1 parent
2292c11
commit 1ac78a0
Showing
5 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Legal text | ||
|
||
Use bold text with an exclamation icon if there are legal consequences - for example, a fine or prison sentence. | ||
|
||
## Guidance | ||
|
||
Guidance and documentation can be found on [GOV.UK Design System](linkgoeshere). | ||
|
||
## Demo | ||
|
||
Legal text [demo](legal-text.html). | ||
|
||
## Usage | ||
|
||
Code example(s) | ||
|
||
``` | ||
@@include('legal-text.html') | ||
``` | ||
|
||
|
||
<!-- | ||
## Installation | ||
``` | ||
npm install --save @govuk-frontend/component-name | ||
``` | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
@import "../../globals/scss/colours"; | ||
@import "../../globals/scss/font-face"; | ||
@import "../../globals/scss/media-queries"; | ||
@import "../../globals/scss/typography"; | ||
@import "../../globals/scss/utilities/visually-hidden"; | ||
@import "../../globals/scss/utilities/shapes"; | ||
@import "../../globals/scss/import-once"; | ||
|
||
@include exports("legal-text") { | ||
|
||
.govuk-c-legal-text { | ||
position: relative; | ||
padding: 5px 0; | ||
|
||
font-family: $govuk-font-stack; | ||
@include font-smoothing; | ||
@include govuk-core-19; | ||
} | ||
|
||
.govuk-c-legal-text__assistive { | ||
@include govuk-u-visually-hidden; | ||
} | ||
|
||
.govuk-c-legal-text__icon { | ||
display: inline-block; | ||
|
||
position: absolute; | ||
top: 50%; | ||
left: 0; | ||
|
||
min-width: 38px; | ||
min-height: 35px; | ||
margin-top: -19px; // Half the height of the 38px circle | ||
padding-top: 3px; | ||
|
||
font-size: 1.6em; | ||
@include govuk-bold; | ||
line-height: 35px; | ||
} | ||
|
||
.govuk-c-legal-text__text { | ||
display: block; | ||
margin-left: -$govuk-gutter-half; | ||
padding-left: 65px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<div class="govuk-c-legal-text"> | ||
<span class="govuk-c-legal-text__icon govuk-u-circle" aria-hidden="true">!</span> | ||
<strong class="govuk-c-legal-text__text"> | ||
<span class="govuk-c-legal-text__assistive">Warning</span> | ||
You can be fined up to £5,000 if you don’t register. | ||
</strong> | ||
</div> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters