-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #899 from alphagov/add-callouts
Add callouts to Govspeak component; Remove information-block
- Loading branch information
Showing
7 changed files
with
125 additions
and
70 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
57 changes: 0 additions & 57 deletions
57
app/assets/stylesheets/govuk-component/govspeak/_call-out-block.scss
This file was deleted.
Oops, something went wrong.
25 changes: 25 additions & 0 deletions
25
app/assets/stylesheets/govuk-component/govspeak/_call-to-action.scss
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,25 @@ | ||
// Govspeak call to action | ||
// http://govuk-component-guide.herokuapp.com/components/govspeak/fixtures/call_to_action | ||
// | ||
// Support: | ||
// | ||
// - alphagov/whitehall: ✔︎ | ||
// - alphagov/govspeak: ✔︎ | ||
|
||
.govuk-govspeak { | ||
.call-to-action { | ||
margin: 2em 0; | ||
background-color: $panel-colour; | ||
padding: 2em; | ||
|
||
&:first-child { | ||
margin-top: 0; | ||
} | ||
|
||
p:last-child, | ||
ul:last-child, | ||
ol:last-child { | ||
margin-bottom: 0; | ||
} | ||
} | ||
} |
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
22 changes: 22 additions & 0 deletions
22
app/assets/stylesheets/govuk-component/govspeak/_information-callout.scss
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,22 @@ | ||
// Govspeak information callout | ||
// http://govuk-component-guide.herokuapp.com/components/govspeak/fixtures/information_callout | ||
// | ||
// Support: | ||
// | ||
// - alphagov/whitehall: ✔︎ | ||
// - alphagov/govspeak: ✔︎ | ||
|
||
.govuk-govspeak { | ||
.info-notice { | ||
border-left: 1em solid $panel-colour; | ||
padding: 1em 0 1em 1em; | ||
margin: 2em 0; | ||
|
||
// Remove margin from the last element | ||
p:last-child, | ||
ul:last-child, | ||
ol:last-child { | ||
margin-bottom: 0; | ||
} | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
app/assets/stylesheets/govuk-component/govspeak/_warning-callout.scss
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,41 @@ | ||
// Govspeak warning callout | ||
// http://govuk-component-guide.herokuapp.com/components/govspeak/fixtures/warning_callout | ||
// | ||
// Support: | ||
// | ||
// - alphagov/whitehall: ✔︎ | ||
// - alphagov/govspeak: ✔︎ | ||
|
||
.govuk-govspeak { | ||
.help-notice { | ||
$icon-size: 34px; | ||
$line-height-mobile: 20px; | ||
$line-height-tablet: 25px; | ||
|
||
margin: 2em 0; | ||
|
||
// Add '!' icon | ||
background-image: image-url("icon-important.png"); | ||
background-size: $icon-size $icon-size; | ||
background-repeat: no-repeat; | ||
|
||
@include device-pixel-ratio() { | ||
background-image: image-url("icon-important-2x.png"); | ||
} | ||
|
||
min-height: $icon-size; | ||
padding-left: $icon-size; | ||
|
||
// Center the icon around the baseline | ||
padding-top: ($icon-size - $line-height-mobile) / 2; | ||
|
||
@include media(tablet) { | ||
padding-top: ($icon-size - $line-height-tablet) / 2; | ||
} | ||
|
||
p { | ||
@include bold-19; | ||
margin-left: 1em; | ||
} | ||
} | ||
} |
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