govuk_frontend_toolkit 4.12.0 → 4.13.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/.gitignore +1 -1
- data/app/assets/CHANGELOG.md +4 -0
- data/app/assets/VERSION.txt +1 -1
- data/app/assets/docs/javascript.md +6 -6
- data/app/assets/docs/mixins.md +21 -5
- data/app/assets/jenkins.sh +3 -0
- data/app/assets/stylesheets/_font_stack.scss +0 -9
- data/app/assets/stylesheets/_typography.scss +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fdab1cc5481c808d894dabec2ec8377f3f07e21b
|
4
|
+
data.tar.gz: ad538d6e392ef3ae4408d8df873580f938234488
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1fd18797d04ab572d43c1cde7fdae57ff2bc3cf4ed5aa0834ee881bfe15744d1d92222d2e08718ae3325dd9c8d987ca280b8edab770bf0debb6034b912bbf8f
|
7
|
+
data.tar.gz: d3bc7e3a5dbf7a5e92a42ac7b80a9c5d571c80dd3f71e215f7b429e3af509fc90982a4712aa7b206243fbcc944af7e4b928213c81cb38f002630f3920035dfab
|
data/app/assets/.gitignore
CHANGED
data/app/assets/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
# 4.13.0
|
2
|
+
|
3
|
+
- Make headings block-level by default (PR #200). If you are styling elements you want to be inline with heading includes, you’ll need to explicitly make them inline in your CSS.
|
4
|
+
|
1
5
|
# 4.12.0
|
2
6
|
|
3
7
|
- Increase button padding to match padding from GOV.UK elements (PR #275).
|
data/app/assets/VERSION.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.
|
1
|
+
4.13.0
|
@@ -39,8 +39,8 @@ module.start(element);
|
|
39
39
|
Running `GOVUK.modules.start()` multiple times will have no additional affect. When a module is started a flag is set on the element using the data attribute `module-started`. `data-module-started` is a reserved attribute. It can however be called with an element as the first argument, to allow modules to be started in dynamically loaded content:
|
40
40
|
|
41
41
|
```javascript
|
42
|
-
var container = $('.dynamic-content');
|
43
|
-
GOVUK.modules.start(container);
|
42
|
+
var $container = $('.dynamic-content');
|
43
|
+
GOVUK.modules.start($container);
|
44
44
|
```
|
45
45
|
|
46
46
|
### Module structure
|
@@ -52,7 +52,7 @@ The simplest module looks like:
|
|
52
52
|
(function(Modules) {
|
53
53
|
"use strict";
|
54
54
|
Modules.SomeModule = function() {
|
55
|
-
this.start = function(element) {
|
55
|
+
this.start = function($element) {
|
56
56
|
// module code
|
57
57
|
}
|
58
58
|
};
|
@@ -79,9 +79,9 @@ Make it clear where a javascript module will be applying behaviour:
|
|
79
79
|
Beginning with a set of event listeners clearly indicates the module’s intentions.
|
80
80
|
|
81
81
|
```js
|
82
|
-
this.start = function(element) {
|
83
|
-
element.on('click', '.js-toggle', toggle);
|
84
|
-
element.on('click', '.js-cancel', cancel);
|
82
|
+
this.start = function($element) {
|
83
|
+
$element.on('click', '.js-toggle', toggle);
|
84
|
+
$element.on('click', '.js-cancel', cancel);
|
85
85
|
}
|
86
86
|
```
|
87
87
|
|
data/app/assets/docs/mixins.md
CHANGED
@@ -67,16 +67,32 @@ edge of smaller screens.
|
|
67
67
|
Media query and IE helpers. These make producing responsive layouts and
|
68
68
|
attaching IE specific styles to elements really easy.
|
69
69
|
|
70
|
-
To use the IE conditionals you will need to add extra stylesheets for each IE
|
70
|
+
To use the IE conditionals you will need to add extra stylesheets for each IE,
|
71
|
+
there's an example of how to do this in the [GOV.UK template](https://github.com/alphagov/govuk_template/blob/master/source/views/layouts/govuk_template.html.erb#L9-L12).
|
71
72
|
|
72
|
-
|
73
|
+
<!--[if gt IE 8]><!--><link href="<%= asset_path "govuk-template.css" %>" media="screen" rel="stylesheet" type="text/css" /><!--<![endif]-->
|
74
|
+
<!--[if IE 6]><link href="<%= asset_path "govuk-template-ie6.css" %>" media="screen" rel="stylesheet" type="text/css" /><![endif]-->
|
75
|
+
<!--[if IE 7]><link href="<%= asset_path "govuk-template-ie7.css" %>" media="screen" rel="stylesheet" type="text/css" /><![endif]-->
|
76
|
+
<!--[if IE 8]><link href="<%= asset_path "govuk-template-ie8.css" %>" media="screen" rel="stylesheet" type="text/css" /><![endif]-->
|
77
|
+
|
78
|
+
The conditional logic ensures that only one stylesheet is downloaded.
|
79
|
+
|
80
|
+
<!--[if gt IE 8]><!--> // [1]
|
81
|
+
<link href="<%= asset_path "govuk-template.css" %>" media="screen" rel="stylesheet" type="text/css" />
|
82
|
+
<!--<![endif]--> // [1]
|
83
|
+
|
84
|
+
[1] Note the comment syntax to hide this stylesheet from IE 6-8.
|
85
|
+
|
86
|
+
At the top of each stylesheet, you will need:
|
73
87
|
|
74
88
|
$is-ie: true;
|
75
|
-
$ie-version: 6;
|
89
|
+
$ie-version: 6; // [1]
|
90
|
+
@import "application.scss"; // [2]
|
76
91
|
|
77
|
-
|
92
|
+
[1] This example is for ie6.css, use 6, 7 or 8 as required here
|
93
|
+
[2] Here `application.scss` is the name of your main stylesheet
|
78
94
|
|
79
|
-
|
95
|
+
There are examples for [an IE 6 stylesheet](https://github.com/alphagov/govuk_elements/blob/master/public/sass/main-ie6.scss), [an IE 7 stylesheet](https://github.com/alphagov/govuk_elements/blob/master/public/sass/main-ie7.scss) and [an IE 8 stylesheet](https://github.com/alphagov/govuk_elements/blob/master/public/sass/main-ie8.scss).
|
80
96
|
|
81
97
|
#### media
|
82
98
|
|
data/app/assets/jenkins.sh
CHANGED
@@ -20,5 +20,8 @@ if [ "$MASTER_SHA" == "$HEAD_SHA" ]; then
|
|
20
20
|
echo "Creating new tag: $VERSION_TAG"
|
21
21
|
git tag $VERSION_TAG
|
22
22
|
git push origin $VERSION_TAG
|
23
|
+
|
24
|
+
# Alias branch for the most recently released tag, for easier diffing
|
25
|
+
git push origin master:latest-release
|
23
26
|
fi
|
24
27
|
fi
|
@@ -1,14 +1,5 @@
|
|
1
1
|
// GOV.UK font stacks, referred to in typography.scss
|
2
2
|
|
3
|
-
// Font stack weirdness
|
4
|
-
//
|
5
|
-
// To ensure embedded fonts fall back to appropriate
|
6
|
-
// system fonts (eg, bold embedded font falls back to
|
7
|
-
// bold system font, without anyone getting horrible
|
8
|
-
// artificially emboldened weights) we're setting
|
9
|
-
// the font-stack in a font-face declaration rather
|
10
|
-
// than with the usual font-family.
|
11
|
-
|
12
3
|
// Allow uppercase letters in font stack variable names
|
13
4
|
// scss-lint:disable NameFormat
|
14
5
|
|
@@ -143,6 +143,8 @@ $is-print: false !default;
|
|
143
143
|
@mixin heading-80($tabular-numbers: false) {
|
144
144
|
@include core-80($tabular-numbers: $tabular-numbers);
|
145
145
|
|
146
|
+
display: block;
|
147
|
+
|
146
148
|
padding-top: 8px;
|
147
149
|
padding-bottom: 7px;
|
148
150
|
|
@@ -155,6 +157,8 @@ $is-print: false !default;
|
|
155
157
|
@mixin heading-48($tabular-numbers: false) {
|
156
158
|
@include core-48($tabular-numbers: $tabular-numbers);
|
157
159
|
|
160
|
+
display: block;
|
161
|
+
|
158
162
|
padding-top: 10px;
|
159
163
|
padding-bottom: 10px;
|
160
164
|
|
@@ -167,6 +171,8 @@ $is-print: false !default;
|
|
167
171
|
@mixin heading-36($tabular-numbers: false) {
|
168
172
|
@include core-36($tabular-numbers: $tabular-numbers);
|
169
173
|
|
174
|
+
display: block;
|
175
|
+
|
170
176
|
padding-top: 8px;
|
171
177
|
padding-bottom: 7px;
|
172
178
|
|
@@ -179,6 +185,8 @@ $is-print: false !default;
|
|
179
185
|
@mixin heading-27($tabular-numbers: false) {
|
180
186
|
@include core-27($tabular-numbers: $tabular-numbers);
|
181
187
|
|
188
|
+
display: block;
|
189
|
+
|
182
190
|
padding-top: 8px;
|
183
191
|
padding-bottom: 7px;
|
184
192
|
|
@@ -191,6 +199,8 @@ $is-print: false !default;
|
|
191
199
|
@mixin heading-24($tabular-numbers: false) {
|
192
200
|
@include core-24($tabular-numbers: $tabular-numbers);
|
193
201
|
|
202
|
+
display: block;
|
203
|
+
|
194
204
|
padding-top: 9px;
|
195
205
|
padding-bottom: 6px;
|
196
206
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk_frontend_toolkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bradley Wright
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|