Skip to content

Commit

Permalink
Style address blocks with margins
Browse files Browse the repository at this point in the history
Addresses are used in the $A markdown pattern:
https://github.com/alphagov/govspeak/blob/a04ef6b54f090ec03911d0daaed4c7
4741578fea/lib/govspeak.rb#L249-L251

This pattern is used in specialist documents that include contacts.
https://www.gov.uk/drug-device-alerts/transwarmer-infant-transport-mattr
ess-novaplus-transwarmer-infant-heat-therapy-mattress-with-warmgel-infan
t-heel-warmer-risk-of-serious-burn

Include address example
  • Loading branch information
fofr committed Apr 19, 2017
1 parent 905cea7 commit 468c3d4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
7 changes: 3 additions & 4 deletions app/assets/stylesheets/govuk-component/govspeak/_contact.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@
// - alphagov/govspeak: ✔︎

.govuk-govspeak {
// No obvious signs of the address class being used in alphagov/whitehall or
// alphagov/govspeak.
// .address is used by the `$A` markdown pattern
.address,
.contact {
border-left: 1px solid $border-colour;
padding-left: $gutter-half;
margin-bottom: $gutter;
margin-top: $gutter;
}

.contact {
@extend %contain-floats;
margin-bottom: $gutter;
margin-top: $gutter;
position: relative;

.content {
Expand Down
15 changes: 15 additions & 0 deletions app/views/govuk_component/docs/govspeak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,21 @@ fixtures:
</tr>
</tbody>
</table>
address:
content: |
<div class="address">
<div class="adr org fn">
<p>
First line of address
<br>Second line of address
<br>75 This street
<br>United Kindom
<br>Phone: 07123456789
<br>
</p>
</div>
</div>
<p>Addresses are generated when using the `$A` markdown pattern.</p>
contact:
content: |
<div class="contact" id="contact_1017">
Expand Down

0 comments on commit 468c3d4

Please sign in to comment.