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

Add callouts to Govspeak component; Remove information-block #899

Merged
merged 9 commits into from
Feb 10, 2017
3 changes: 2 additions & 1 deletion app/assets/stylesheets/govuk-component/_govspeak.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
@import "govspeak/attachment";
@import "govspeak/call-out-block";
@import "govspeak/call-to-action";
@import "govspeak/charts";
@import "govspeak/contact";
@import "govspeak/example";
@import "govspeak/footnotes";
@import "govspeak/fraction";
@import "govspeak/images";
@import "govspeak/information-block";
@import "govspeak/legislative-list";
@import "govspeak/media-player";
@import "govspeak/stat-headline";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// 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-top: $gutter;
margin-bottom: $gutter;
background-color: $panel-colour;
padding: $gutter-half;

&:first-child {
margin-top: 0;
}

p:last-child,
ul:last-child,
ol:last-child {
margin-bottom: 0;
}

ol {
@include media(desktop) {
list-style-position: outside;
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
// Govspeak call out blocks
// http://govuk-component-guide.herokuapp.com/components/govspeak/fixtures/call_out_blocks
// Govspeak information block
// http://govuk-component-guide.herokuapp.com/components/govspeak/fixtures/information_block
//
// Support:
//
// `call-to-action` exists within alphagov/govspeak, but no signs of anything
// that generates HTML using the `information-block` class in alphagov or
// kramdown.
// No signs of anything that generates HTML using the `information-block` class
// in alphagov or kramdown.
//
// - alphagov/whitehall: ⁉
// - alphagov/govspeak: ⁉

.govuk-govspeak {
.information-block,
.call-to-action {
.information-block {
margin-top: $gutter;
margin-bottom: $gutter;
background-color: $panel-colour;
Expand Down
14 changes: 10 additions & 4 deletions app/views/govuk_component/docs/govspeak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,12 @@ fixtures:
<p>My quote</p>
<p class="last-child">about things</p>
</blockquote>
call_out_blocks:
information_block:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As .information-block was removed in 943d1e1, can the fixture be removed now?

content: |
<div class="information-block">
<p>My important information</p>
<p>Information</p>
</div>
<div class="call-to-action">
<p>Call to action</p>
</div>
tables:
content: |
<table>
Expand Down Expand Up @@ -511,7 +508,16 @@ fixtures:
content: |
<div class="example">
<p>
<strong>Example</strong>
This is an indented example block.<br/>
It may span multiple lines, <a href="#">contain links</a>.
</p>
<p>
It may even span multiple paragraphs.
</p>
</div>
call_to_action:
content: |
<div class="call-to-action">
<p>Call to action</p>
</div>