govuk_elements_rails 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/vendor/assets/stylesheets/elements/_forms.scss +24 -18
- data/vendor/assets/stylesheets/elements/_panels.scss +26 -1
- data/vendor/assets/stylesheets/elements/_reset.scss +5 -0
- data/vendor/assets/stylesheets/elements/_shame.scss +2 -0
- data/vendor/assets/stylesheets/elements/forms/_form-block-labels.scss +9 -5
- data/vendor/assets/stylesheets/elements/forms/_form-date.scss +1 -1
- data/vendor/assets/stylesheets/elements/forms/_form-validation.scss +7 -5
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d3d4d1abdb73f18379cee177a2dab2eb1636242
|
4
|
+
data.tar.gz: 4636ae7270b4ad4fce1f0237a0e792c6645cdcd7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a16f7d8a28849e9d028bb0b391965a16a7c7a2f2f44d637b395d1d03312f3853a79cacebaf8f77ceb512c01fda73534a1d8a616f751c04e55baf6af466875cc1
|
7
|
+
data.tar.gz: fc64336b12913c9e2c6c3bb3fae708570af9209363cf08871d21c5d0d2174d29c7f38e9d88e58225ce52fe4b6091739bbeac890b8cc7d89a80491d3fa41ee93e
|
@@ -35,6 +35,21 @@ textarea {
|
|
35
35
|
// 2. Form wrappers
|
36
36
|
// ==========================================================================
|
37
37
|
|
38
|
+
// Form section is used to wrap .form-group and has twice its margin
|
39
|
+
.form-section {
|
40
|
+
@extend %contain-floats;
|
41
|
+
@include box-sizing(border-box);
|
42
|
+
|
43
|
+
float: left;
|
44
|
+
width: 100%;
|
45
|
+
|
46
|
+
margin-bottom: $gutter;
|
47
|
+
|
48
|
+
@include media(tablet) {
|
49
|
+
margin-bottom: $gutter * 2;
|
50
|
+
}
|
51
|
+
}
|
52
|
+
|
38
53
|
// Form group is used to wrap label and input pairs
|
39
54
|
.form-group {
|
40
55
|
@extend %contain-floats;
|
@@ -74,6 +89,7 @@ textarea {
|
|
74
89
|
.form-label-bold {
|
75
90
|
display: block;
|
76
91
|
color: $text-colour;
|
92
|
+
padding-bottom: 2px;
|
77
93
|
}
|
78
94
|
|
79
95
|
.form-label {
|
@@ -84,23 +100,6 @@ textarea {
|
|
84
100
|
@include bold-19;
|
85
101
|
}
|
86
102
|
|
87
|
-
// Add spacing under spans within labels
|
88
|
-
legend {
|
89
|
-
.form-label,
|
90
|
-
.form-label-bold {
|
91
|
-
padding-bottom: 7px;
|
92
|
-
}
|
93
|
-
}
|
94
|
-
|
95
|
-
// Remove spacing when error messages are shown
|
96
|
-
// TODO: Move into /forms/_form-validation.scss
|
97
|
-
.error legend {
|
98
|
-
.form-label,
|
99
|
-
.form-label-bold {
|
100
|
-
padding-bottom: 0;
|
101
|
-
}
|
102
|
-
}
|
103
|
-
|
104
103
|
// Used for the 'or' in between block label options
|
105
104
|
.form-block {
|
106
105
|
@extend %contain-floats;
|
@@ -125,9 +124,16 @@ legend {
|
|
125
124
|
display: block;
|
126
125
|
color: $secondary-text-colour;
|
127
126
|
font-weight: normal;
|
128
|
-
|
127
|
+
|
128
|
+
margin-top: -2px;
|
129
|
+
padding-bottom: 2px;
|
129
130
|
}
|
130
131
|
|
132
|
+
.form-label .form-hint,
|
133
|
+
.form-label-bold .form-hint {
|
134
|
+
margin-top: 0;
|
135
|
+
padding-bottom: 0;
|
136
|
+
}
|
131
137
|
|
132
138
|
// 5. Form controls
|
133
139
|
// ==========================================================================
|
@@ -2,6 +2,7 @@
|
|
2
2
|
// ==========================================================================
|
3
3
|
|
4
4
|
.panel {
|
5
|
+
@include box-sizing(border-box);
|
5
6
|
@extend %contain-floats;
|
6
7
|
clear: both;
|
7
8
|
border-left-style: solid;
|
@@ -30,7 +31,31 @@
|
|
30
31
|
}
|
31
32
|
|
32
33
|
// Panels within form groups
|
33
|
-
//
|
34
|
+
// By default, panels have 15px bottom margin
|
34
35
|
.form-group .panel-border-narrow {
|
36
|
+
float: left;
|
37
|
+
width: 100%;
|
38
|
+
// Remove the bottom padding as .form-group sets a bottom margin
|
35
39
|
padding-bottom: 0;
|
40
|
+
// Don't remove the bottom margin for all panels, assume they are often within stacked groups
|
36
41
|
}
|
42
|
+
|
43
|
+
// Note: This is incredibly fragile, and needs rebuilding.
|
44
|
+
|
45
|
+
// The first panel in a group
|
46
|
+
.form-group .panel-border-narrow:first-child {
|
47
|
+
margin-top: 10px;
|
48
|
+
}
|
49
|
+
|
50
|
+
// The last panel in a group
|
51
|
+
.form-group .panel-border-narrow:last-child {
|
52
|
+
margin-top: 10px;
|
53
|
+
margin-bottom: 0;
|
54
|
+
}
|
55
|
+
|
56
|
+
// For inline panels
|
57
|
+
.inline .form-group .panel-border-narrow {
|
58
|
+
margin-top: 10px;
|
59
|
+
margin-bottom: 0;
|
60
|
+
}
|
61
|
+
|
@@ -8,6 +8,8 @@
|
|
8
8
|
// If Mozilla add display: revert and remove list-item from summary then this will fall through.
|
9
9
|
@-moz-document regexp('.*') {
|
10
10
|
details summary:not([tabindex]) {
|
11
|
+
// Allow duplicate properties, override the summary display property
|
12
|
+
// scss-lint:disable DuplicateProperty
|
11
13
|
display: list-item;
|
12
14
|
display: revert;
|
13
15
|
}
|
@@ -41,16 +41,20 @@
|
|
41
41
|
border-color: $black;
|
42
42
|
}
|
43
43
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
44
|
+
&:last-child,
|
45
|
+
&:last-of-type {
|
46
|
+
margin-bottom: 0;
|
47
|
+
}
|
48
48
|
}
|
49
49
|
|
50
50
|
// To stack horizontally, use .inline on parent, to sit block labels next to each other
|
51
51
|
.inline .block-label {
|
52
52
|
clear: none;
|
53
|
-
|
53
|
+
|
54
|
+
@include media (tablet) {
|
55
|
+
margin-bottom: 0;
|
56
|
+
margin-right: 10px;
|
57
|
+
}
|
54
58
|
}
|
55
59
|
|
56
60
|
// Selected and focused states
|
@@ -19,10 +19,6 @@
|
|
19
19
|
border: 4px solid $error-colour;
|
20
20
|
}
|
21
21
|
|
22
|
-
.form-hint {
|
23
|
-
margin-bottom: 0;
|
24
|
-
}
|
25
|
-
|
26
22
|
}
|
27
23
|
|
28
24
|
.error,
|
@@ -45,7 +41,13 @@
|
|
45
41
|
clear: both;
|
46
42
|
|
47
43
|
margin: 0;
|
48
|
-
padding:
|
44
|
+
padding: 2px 0;
|
45
|
+
}
|
46
|
+
|
47
|
+
.form-label .error-message,
|
48
|
+
.form-label-bold .error-message {
|
49
|
+
padding-top: 4px;
|
50
|
+
padding-bottom: 0;
|
49
51
|
}
|
50
52
|
|
51
53
|
// Summary of multiple error messages
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk_elements_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob McKinnon
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-06-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -54,8 +54,8 @@ dependencies:
|
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: 4.12.0
|
56
56
|
description: |-
|
57
|
-
A gem wrapper around govuk_elements v1.2.
|
58
|
-
that pulls stylesheet and javascript files into a Rails app. Changelog: https://github.com/alphagov/govuk_elements/blob/
|
57
|
+
A gem wrapper around govuk_elements v1.2.1
|
58
|
+
that pulls stylesheet and javascript files into a Rails app. Changelog: https://github.com/alphagov/govuk_elements/blob/e022e58ea6b90fe2acc423bc5a1eb56f02de494e
|
59
59
|
/CHANGELOG.md
|
60
60
|
email: robin.whittleton@digital.cabinet-office.gov.uk
|
61
61
|
executables: []
|