govuk_publishing_components 1.3.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 977c19c9c3c98f7113ee56e38465aa8563cb3869
4
- data.tar.gz: c355c901404936ef826f59dcaa2f4077427e4487
3
+ metadata.gz: 3bf7c83ba871dac918b4575c950fe9e3cf5a7c18
4
+ data.tar.gz: 294464f79312ccfaedb8020d2cd8d907114b893a
5
5
  SHA512:
6
- metadata.gz: 31845d620a5314bb240ebf110653c8acbdb0e8ab4e97f00d8254fd52af8f55d7dc579cb4dec3f51c80ddfef7db1c2e79aca839733f3aaad4c8cfccfd382d7ee6
7
- data.tar.gz: ea7d156f8ed7899d5a11bbbd745382a8721996ec5ed3c9fb08419e808f8e4a6b953956e44526fba55117ab9a66d3d3b358258538ca2bd2a6bbaf7b3a46f39e93
6
+ metadata.gz: 13834fb4b5486b727623fbe6fb30cd26439582c686f435525bbfe37703c3cde73f345660df1456ed1f6d408c8c8be3ffe27a3cdf95cbae36c238c042dec0da1b
7
+ data.tar.gz: 36e1e45b459dc88dfafedd4ca0dddb6f4bd5881d2ccb7d035f4a052f9083ab8b3c8ce31a76490f65c71a8f578ee4bd611244a9cd0cdc1668f03deb7cff02563d
@@ -110,6 +110,10 @@ $border-color: #ccc;
110
110
  text-align: start;
111
111
  }
112
112
 
113
+ &.dark-background {
114
+ background-color: $govuk-blue;
115
+ }
116
+
113
117
  padding: ($gutter * 1.5) $gutter $gutter;
114
118
  border: 1px solid $border-colour;
115
119
  position: relative;
@@ -51,6 +51,10 @@ module GovukPublishingComponents
51
51
  !!context['right_to_left']
52
52
  end
53
53
 
54
+ def dark_background?
55
+ !!context['dark_background']
56
+ end
57
+
54
58
  def html_description
55
59
  govspeak_to_html(description) if description.present?
56
60
  end
@@ -1,5 +1,6 @@
1
1
  <div class="component-guide-preview
2
2
  <% if example.right_to_left? %>direction-rtl<% end %>
3
+ <% if example.dark_background? %>dark-background<% end %>
3
4
  <% if preview_page %>component-guide-preview--simple<% end %>" data-content="EXAMPLE">
4
5
  <%= render component_doc.partial_path, example.html_safe_data %>
5
6
  </div>
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = '1.3.0'.freeze
2
+ VERSION = '1.4.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_publishing_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-05 00:00:00.000000000 Z
11
+ date: 2017-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails