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

Amend data visualisation examples #351

Merged
merged 2 commits into from
Nov 15, 2016
Merged
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
4 changes: 2 additions & 2 deletions app/views/snippets/data_48px_16px.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="data">
<h2 class="bold-xlarge">48px</h2>
<p class="bold-xsmall">16px</p>
<span class="data-item bold-xlarge">48px</span>
<span class="data-item bold-xsmall">16px</span>
</div>
4 changes: 2 additions & 2 deletions app/views/snippets/data_48px_16px_example.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="data">
<h2 class="bold-xlarge">56/154</h2>
<p class="bold-xsmall">on GOV.UK</p>
<span class="data-item bold-xlarge">56/154</span>
<span class="data-item bold-xsmall">on GOV.UK</span>
</div>
4 changes: 2 additions & 2 deletions app/views/snippets/data_80px_16px.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="data">
<h2 class="bold-xxlarge">80px</h2>
<p class="bold-xsmall">16px</p>
<span class="data-item bold-xxlarge">80px</span>
<span class="data-item bold-xsmall">16px</span>
</div>
4 changes: 2 additions & 2 deletions app/views/snippets/data_80px_16px_example.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="data">
<h2 class="bold-xxlarge">24</h2>
<p class="bold-xsmall">Ministerial departments</p>
<span class="data-item bold-xxlarge">24</span>
<span class="data-item bold-xsmall">Ministerial departments</span>
</div>
7 changes: 1 addition & 6 deletions public/sass/elements-page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -357,12 +357,7 @@ $palette: (
// 5. Data
// ==========================================================================

.data .bold-xlarge,
.data .bold-xxlarge {
line-height: 0.8;
}

.example .data p {
.example .data {
margin-bottom: 0;
}

Expand Down
16 changes: 16 additions & 0 deletions public/sass/elements/_elements-typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -291,3 +291,19 @@ hr {
margin-left: -$gutter-half;
}
}

// Data
.data {
margin-top: em(5, 16);
margin-bottom: em(20, 16);

@include media(tablet) {
margin-top: em(5, 19);
margin-bottom: em(20, 19);
}
}

.data-item {
display: block;
line-height: 1;
}