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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 643bf55d0d7667377783630c390da855b1db813e
4
- data.tar.gz: 86d561fa47545f9ff7f65b3855ba8245d6665e7d
3
+ metadata.gz: 3d3d4d1abdb73f18379cee177a2dab2eb1636242
4
+ data.tar.gz: 4636ae7270b4ad4fce1f0237a0e792c6645cdcd7
5
5
  SHA512:
6
- metadata.gz: 78c454d450a4f5790b8bb196ff06a404464d78371f5beb50e6a425f2ef29483adc7c0ecec9031e836ad238b7170c1e9e15afaa6694166de7fdd8f2f1811b96b9
7
- data.tar.gz: aa2ae2205822da078bf3c65ad87440297b0fab899d98e0865d773422cb478d0cdf1f9c6b68d37499314afc0cd19869e3ab551f8b61585a3fbf7d76f7d23be65f
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
- margin-bottom: 5px;
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
- // Remove the bottom padding as .form-group sets a bottom margin
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
+
@@ -117,3 +117,8 @@ td {
117
117
  line-height: inherit;
118
118
  font-weight: normal;
119
119
  }
120
+
121
+ abbr[title],
122
+ acronym[title] {
123
+ text-decoration: none;
124
+ }
@@ -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
- .block-label:last-child {
47
- margin-bottom: 0;
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
- margin-right: 10px;
53
+
54
+ @include media (tablet) {
55
+ margin-bottom: 0;
56
+ margin-right: 10px;
57
+ }
54
58
  }
55
59
 
56
60
  // Selected and focused states
@@ -24,7 +24,7 @@ input[type=number] {
24
24
 
25
25
  label {
26
26
  display: block;
27
- margin-bottom: 5px;
27
+ padding-bottom: 2px;
28
28
  }
29
29
 
30
30
  input {
@@ -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: 5px 0 7px;
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.0
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-05-26 00:00:00.000000000 Z
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.0
58
- that pulls stylesheet and javascript files into a Rails app. Changelog: https://github.com/alphagov/govuk_elements/blob/f0297b538ffb5bbf8147ec79bca62f8fc3eb595d
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: []