Skip to content

Commit

Permalink
Merge pull request #782 from alphagov/remove-circle-object
Browse files Browse the repository at this point in the history
Remove the ‘circle shape’ object
  • Loading branch information
36degrees authored Jun 13, 2018
2 parents afc7b93 + 3192f61 commit b155ae9
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ Note: We're not following semantic versioning yet, we are going to talk about th
- `mellow-red` → `bright-red`
- `grass-green` → `light-green`

- The 'circle shape' object (`.govuk-circle`) which was used by the warning text
component's '!' icon has been removed and the `govuk-warning-text__icon` class
has been updated to make it circular without the need for another class.

([PR #782](https://github.com/alphagov/govuk-frontend/pull/782))

🔧 Fixes:

Expand Down
2 changes: 1 addition & 1 deletion src/components/warning-text/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Find out when to use the Warning text component in your service in the [GOV.UK D
#### Markup

<div class="govuk-warning-text">
<span class="govuk-warning-text__icon govuk-circle" aria-hidden="true">!</span>
<span class="govuk-warning-text__icon" aria-hidden="true">!</span>
<strong class="govuk-warning-text__text">
<span class="govuk-warning-text__assistive">Warning</span>
You can be fined up to £5,000 if you don’t register.
Expand Down
9 changes: 7 additions & 2 deletions src/components/warning-text/_warning-text.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
@import "../../tools/all";
@import "../../helpers/all";

@import "../../objects/shapes";

@include govuk-exports("govuk/component/warning-text") {

.govuk-warning-text {
Expand Down Expand Up @@ -33,8 +31,15 @@
margin-top: -20px; // Half the height of the 38px circle (adjusted for NTA)
padding-top: 3px;

border-radius: 50%;

color: govuk-colour("white");
background: govuk-colour("black");

font-size: 1.6em;
line-height: 35px;

text-align: center;
}

.govuk-warning-text__text {
Expand Down
2 changes: 1 addition & 1 deletion src/components/warning-text/template.njk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="govuk-warning-text {{- ' ' + params.classes if params.classes}}"
{%- for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor -%}
>
<span class="govuk-warning-text__icon govuk-circle" aria-hidden="true">!</span>
<span class="govuk-warning-text__icon" aria-hidden="true">!</span>
<strong class="govuk-warning-text__text">
<span class="govuk-warning-text__assistive">{{ params.iconFallbackText }}</span>
{{ params.html | safe if params.html else params.text }}
Expand Down
1 change: 0 additions & 1 deletion src/objects/_all.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@import "form-group";
@import "grid";
@import "main-wrapper";
@import "shapes";
@import "width-container";
9 changes: 0 additions & 9 deletions src/objects/_shapes.scss

This file was deleted.

0 comments on commit b155ae9

Please sign in to comment.