govuk_publishing_components 17.8.0 → 17.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/govuk_publishing_components/components/_heading.scss +0 -15
- data/app/views/govuk_publishing_components/components/_heading.html.erb +7 -1
- data/app/views/govuk_publishing_components/components/docs/heading.yml +2 -5
- data/lib/govuk_publishing_components/presenters/heading_helper.rb +0 -1
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/accessible-autocomplete/package.json +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea7b2d1946b7528b7f7c9e95b2001eb64f3b7cf19dda18a336a5450b4390836c
|
4
|
+
data.tar.gz: 2e36cfdc9c0d786526d9aef75bdeed3689dd9a4be20176df8ca445abb58b0137
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd981981f232e22972e10451789952e249f528493f3fd9748605502f7084820930b456e11c960490421f8cebfcdaed556a553cb70ee33beb07ac0cd7c4f1fc12
|
7
|
+
data.tar.gz: de90761a6c2d9490b848178d2bb8c4397c15a902b5934dd635d623a53afe20d39f296e90176c0bfa1bc71ec1d5e37d56b6343f693a1f92b8a54945c10d849d8f
|
@@ -28,21 +28,6 @@
|
|
28
28
|
padding: govuk-spacing(3) 0;
|
29
29
|
}
|
30
30
|
|
31
|
-
// margins would ideally be handled by a general model for all components
|
32
|
-
// but we don't have one yet, so this is in anticipation of that
|
33
|
-
// suggested scale is as follows, not fully implemented
|
34
|
-
// govuk-spacing(6)= 4
|
35
|
-
// govuk-spacing(4) = 3
|
36
|
-
// govuk-spacing(3) = 2
|
37
|
-
// govuk-spacing(2) = 1
|
38
|
-
.gem-c-heading--margin-bottom-4 {
|
39
|
-
margin-bottom: govuk-spacing(6);
|
40
|
-
}
|
41
|
-
|
42
|
-
.gem-c-heading--margin-bottom-2 {
|
43
|
-
margin-bottom: govuk-spacing(3);
|
44
|
-
}
|
45
|
-
|
46
31
|
// border color will default to black
|
47
32
|
// can be changed using the branding functionality
|
48
33
|
.gem-c-heading--border-top-1 {
|
@@ -3,8 +3,14 @@
|
|
3
3
|
brand_helper = GovukPublishingComponents::AppHelpers::BrandHelper.new(brand)
|
4
4
|
heading_helper = GovukPublishingComponents::Presenters::HeadingHelper.new(local_assigns)
|
5
5
|
shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
|
6
|
+
|
7
|
+
classes = %w(gem-c-heading)
|
8
|
+
classes << heading_helper.classes
|
9
|
+
classes << brand_helper.brand_class
|
10
|
+
classes << brand_helper.border_color_class
|
11
|
+
classes << (shared_helper.get_margin_bottom) if [*0..9].include?(local_assigns[:margin_bottom])
|
6
12
|
%>
|
7
13
|
<%= content_tag(shared_helper.get_heading_level, text,
|
8
|
-
class:
|
14
|
+
class: classes,
|
9
15
|
id: heading_helper.id
|
10
16
|
) %>
|
@@ -43,13 +43,10 @@ examples:
|
|
43
43
|
text: 'Padded'
|
44
44
|
padding: true
|
45
45
|
with_margin:
|
46
|
-
description:
|
47
|
-
Configurable bottom margin for the component. This has been built in anticipation of being compatible with a theoretical future model for component margins.
|
48
|
-
|
49
|
-
Accepted parameters for this option are 2 (gives a margin of gutter-half) and 4 (gutter). See the Sass file for more detail.
|
46
|
+
description: The component accepts a number for margin bottom from 0 to 9 (0px to 60px) using the [GOV.UK Frontend spacing scale](http://govuk-frontend-review.herokuapp.com/docs/#settings/spacing-variable-govuk-spacing-points). It defaults to having no margin bottom.
|
50
47
|
data:
|
51
48
|
text: 'Really big bottom margin'
|
52
|
-
margin_bottom:
|
49
|
+
margin_bottom: 9
|
53
50
|
with_mobile_top_margin:
|
54
51
|
description: |
|
55
52
|
On publications and consultations the layout of the page requires that the heading component have spacing above it on mobile. Since this is a specific use case, this is now an option on the component rather than the default behaviour.
|
@@ -10,7 +10,6 @@ module GovukPublishingComponents
|
|
10
10
|
@classes << " gem-c-heading--font-size-#{options[:font_size]}" if [24, 19].include? options[:font_size]
|
11
11
|
@classes << " gem-c-heading--mobile-top-margin" if options[:mobile_top_margin]
|
12
12
|
@classes << " gem-c-heading--padding" if options[:padding]
|
13
|
-
@classes << " gem-c-heading--margin-bottom-#{options[:margin_bottom]}" if [2, 4].include? options[:margin_bottom]
|
14
13
|
@classes << " gem-c-heading--border-top-#{options[:border_top]}" if [1, 2, 5].include? options[:border_top]
|
15
14
|
end
|
16
15
|
end
|
@@ -49,7 +49,7 @@
|
|
49
49
|
"/"
|
50
50
|
],
|
51
51
|
"_resolved": "git://github.com/alphagov/accessible-autocomplete.git#3523dd9fffc70cbd9f6f555f75863c33a709f49e",
|
52
|
-
"_shasum": "
|
52
|
+
"_shasum": "a652ab3d559b5d720bda723efc7bc4a435e05934",
|
53
53
|
"_shrinkwrap": null,
|
54
54
|
"_spec": "accessible-autocomplete@git://github.com/alphagov/accessible-autocomplete.git#add-multiselect-support",
|
55
55
|
"_where": "/var/lib/jenkins/workspace/ublishing_components_master-N4FWJIUY4CIFHKGZOAAEVVXODRY3YBORQOPIBBXWX72VUPSGJRRQ",
|