govuk_tech_docs 2.2.2 → 2.4.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of govuk_tech_docs might be problematic. Click here for more details.

Files changed (143) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.nvmrc +1 -1
  4. data/.travis.yml +2 -0
  5. data/CHANGELOG.md +24 -0
  6. data/example/config/tech-docs.yml +1 -0
  7. data/example/source/single-page-nav.html.md +13 -0
  8. data/govuk_tech_docs.gemspec +2 -1
  9. data/lib/assets/javascripts/_modules/collapsible-navigation.js +7 -7
  10. data/lib/assets/javascripts/_modules/in-page-navigation.js +2 -4
  11. data/lib/assets/stylesheets/_govuk_tech_docs.scss +9 -10
  12. data/lib/assets/stylesheets/modules/_search.scss +4 -25
  13. data/lib/assets/stylesheets/modules/_technical-documentation.scss +1 -1
  14. data/lib/assets/stylesheets/modules/_toc.scss +11 -11
  15. data/lib/govuk_tech_docs/table_of_contents/heading.rb +5 -1
  16. data/lib/govuk_tech_docs/table_of_contents/heading_tree_renderer.rb +2 -2
  17. data/lib/govuk_tech_docs/table_of_contents/helpers.rb +22 -11
  18. data/lib/govuk_tech_docs/tech_docs_html_renderer.rb +1 -1
  19. data/lib/govuk_tech_docs/version.rb +1 -1
  20. data/lib/source/layouts/_header.erb +1 -2
  21. data/lib/source/layouts/layout.erb +3 -1
  22. data/node_modules/govuk-frontend/govuk/_base.scss +3 -0
  23. data/node_modules/govuk-frontend/govuk/all.js +306 -94
  24. data/node_modules/govuk-frontend/govuk/all.scss +1 -3
  25. data/node_modules/govuk-frontend/govuk/components/_all.scss +33 -29
  26. data/node_modules/govuk-frontend/govuk/components/accordion/_accordion.scss +2 -208
  27. data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +197 -0
  28. data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js +1 -1
  29. data/node_modules/govuk-frontend/govuk/components/back-link/_back-link.scss +2 -65
  30. data/node_modules/govuk-frontend/govuk/components/back-link/_index.scss +99 -0
  31. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_breadcrumbs.scss +2 -118
  32. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_index.scss +138 -0
  33. data/node_modules/govuk-frontend/govuk/components/button/_button.scss +2 -284
  34. data/node_modules/govuk-frontend/govuk/components/button/_index.scss +288 -0
  35. data/node_modules/govuk-frontend/govuk/components/character-count/_character-count.scss +2 -31
  36. data/node_modules/govuk-frontend/govuk/components/character-count/_index.scss +25 -0
  37. data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +17 -9
  38. data/node_modules/govuk-frontend/govuk/components/checkboxes/_checkboxes.scss +2 -308
  39. data/node_modules/govuk-frontend/govuk/components/checkboxes/_index.scss +320 -0
  40. data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js +129 -24
  41. data/node_modules/govuk-frontend/govuk/components/cookie-banner/_cookie-banner.scss +2 -0
  42. data/node_modules/govuk-frontend/govuk/components/cookie-banner/_index.scss +51 -0
  43. data/node_modules/govuk-frontend/govuk/components/date-input/_date-input.scss +2 -30
  44. data/node_modules/govuk-frontend/govuk/components/date-input/_index.scss +26 -0
  45. data/node_modules/govuk-frontend/govuk/components/details/_details.scss +2 -88
  46. data/node_modules/govuk-frontend/govuk/components/details/_index.scss +87 -0
  47. data/node_modules/govuk-frontend/govuk/components/error-message/_error-message.scss +2 -15
  48. data/node_modules/govuk-frontend/govuk/components/error-message/_index.scss +11 -0
  49. data/node_modules/govuk-frontend/govuk/components/error-summary/_error-summary.scss +2 -59
  50. data/node_modules/govuk-frontend/govuk/components/error-summary/_index.scss +43 -0
  51. data/node_modules/govuk-frontend/govuk/components/fieldset/_fieldset.scss +2 -68
  52. data/node_modules/govuk-frontend/govuk/components/fieldset/_index.scss +64 -0
  53. data/node_modules/govuk-frontend/govuk/components/file-upload/_file-upload.scss +2 -81
  54. data/node_modules/govuk-frontend/govuk/components/file-upload/_index.scss +49 -0
  55. data/node_modules/govuk-frontend/govuk/components/footer/_footer.scss +2 -244
  56. data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +241 -0
  57. data/node_modules/govuk-frontend/govuk/components/header/_header.scss +2 -318
  58. data/node_modules/govuk-frontend/govuk/components/header/_index.scss +331 -0
  59. data/node_modules/govuk-frontend/govuk/components/header/header.js +665 -316
  60. data/node_modules/govuk-frontend/govuk/components/hint/_hint.scss +2 -50
  61. data/node_modules/govuk-frontend/govuk/components/hint/_index.scss +44 -0
  62. data/node_modules/govuk-frontend/govuk/components/input/_index.scss +191 -0
  63. data/node_modules/govuk-frontend/govuk/components/input/_input.scss +2 -103
  64. data/node_modules/govuk-frontend/govuk/components/inset-text/_index.scss +24 -0
  65. data/node_modules/govuk-frontend/govuk/components/inset-text/_inset-text.scss +2 -28
  66. data/node_modules/govuk-frontend/govuk/components/label/_index.scss +41 -0
  67. data/node_modules/govuk-frontend/govuk/components/label/_label.scss +2 -45
  68. data/node_modules/govuk-frontend/govuk/components/notification-banner/_index.scss +89 -0
  69. data/node_modules/govuk-frontend/govuk/components/notification-banner/_notification-banner.scss +2 -0
  70. data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +61 -0
  71. data/node_modules/govuk-frontend/govuk/components/panel/_index.scss +44 -0
  72. data/node_modules/govuk-frontend/govuk/components/panel/_panel.scss +2 -44
  73. data/node_modules/govuk-frontend/govuk/components/phase-banner/_index.scss +27 -0
  74. data/node_modules/govuk-frontend/govuk/components/phase-banner/_phase-banner.scss +2 -31
  75. data/node_modules/govuk-frontend/govuk/components/radios/_index.scss +342 -0
  76. data/node_modules/govuk-frontend/govuk/components/radios/_radios.scss +2 -346
  77. data/node_modules/govuk-frontend/govuk/components/radios/radios.js +76 -28
  78. data/node_modules/govuk-frontend/govuk/components/select/_index.scss +49 -0
  79. data/node_modules/govuk-frontend/govuk/components/select/_select.scss +2 -57
  80. data/node_modules/govuk-frontend/govuk/components/skip-link/_index.scss +36 -0
  81. data/node_modules/govuk-frontend/govuk/components/skip-link/_skip-link.scss +2 -37
  82. data/node_modules/govuk-frontend/govuk/components/summary-list/_index.scss +145 -0
  83. data/node_modules/govuk-frontend/govuk/components/summary-list/_summary-list.scss +2 -157
  84. data/node_modules/govuk-frontend/govuk/components/table/_index.scss +71 -0
  85. data/node_modules/govuk-frontend/govuk/components/table/_table.scss +2 -54
  86. data/node_modules/govuk-frontend/govuk/components/tabs/_index.scss +130 -0
  87. data/node_modules/govuk-frontend/govuk/components/tabs/_tabs.scss +2 -142
  88. data/node_modules/govuk-frontend/govuk/components/tag/_index.scss +86 -0
  89. data/node_modules/govuk-frontend/govuk/components/tag/_tag.scss +2 -91
  90. data/node_modules/govuk-frontend/govuk/components/textarea/_index.scss +47 -0
  91. data/node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss +2 -55
  92. data/node_modules/govuk-frontend/govuk/components/warning-text/_index.scss +66 -0
  93. data/node_modules/govuk-frontend/govuk/components/warning-text/_warning-text.scss +2 -60
  94. data/node_modules/govuk-frontend/govuk/core/_global-styles.scss +5 -3
  95. data/node_modules/govuk-frontend/govuk/core/_links.scss +13 -3
  96. data/node_modules/govuk-frontend/govuk/core/_lists.scss +17 -3
  97. data/node_modules/govuk-frontend/govuk/core/_section-break.scss +5 -3
  98. data/node_modules/govuk-frontend/govuk/core/_template.scss +5 -4
  99. data/node_modules/govuk-frontend/govuk/core/_typography.scss +5 -3
  100. data/node_modules/govuk-frontend/govuk/helpers/_clearfix.scss +1 -1
  101. data/node_modules/govuk-frontend/govuk/helpers/_colour.scss +1 -1
  102. data/node_modules/govuk-frontend/govuk/helpers/_device-pixels.scss +3 -3
  103. data/node_modules/govuk-frontend/govuk/helpers/_focused.scss +1 -1
  104. data/node_modules/govuk-frontend/govuk/helpers/_font-faces.scss +9 -11
  105. data/node_modules/govuk-frontend/govuk/helpers/_grid.scss +2 -1
  106. data/node_modules/govuk-frontend/govuk/helpers/_links.scss +246 -33
  107. data/node_modules/govuk-frontend/govuk/helpers/_media-queries.scss +2 -6
  108. data/node_modules/govuk-frontend/govuk/helpers/_shape-arrow.scss +1 -1
  109. data/node_modules/govuk-frontend/govuk/helpers/_spacing.scss +3 -2
  110. data/node_modules/govuk-frontend/govuk/helpers/_typography.scss +8 -7
  111. data/node_modules/govuk-frontend/govuk/helpers/_visually-hidden.scss +1 -1
  112. data/node_modules/govuk-frontend/govuk/objects/_all.scss +1 -0
  113. data/node_modules/govuk-frontend/govuk/objects/_button-group.scss +101 -0
  114. data/node_modules/govuk-frontend/govuk/objects/_form-group.scss +1 -4
  115. data/node_modules/govuk-frontend/govuk/objects/_grid.scss +3 -6
  116. data/node_modules/govuk-frontend/govuk/objects/_main-wrapper.scss +5 -4
  117. data/node_modules/govuk-frontend/govuk/objects/_width-container.scss +6 -4
  118. data/node_modules/govuk-frontend/govuk/overrides/_display.scss +6 -4
  119. data/node_modules/govuk-frontend/govuk/overrides/_spacing.scss +5 -3
  120. data/node_modules/govuk-frontend/govuk/overrides/_typography.scss +5 -3
  121. data/node_modules/govuk-frontend/govuk/overrides/_width.scss +6 -3
  122. data/node_modules/govuk-frontend/govuk/settings/_all.scss +2 -0
  123. data/node_modules/govuk-frontend/govuk/settings/_colours-applied.scss +11 -5
  124. data/node_modules/govuk-frontend/govuk/settings/_colours-organisations.scss +3 -0
  125. data/node_modules/govuk-frontend/govuk/settings/_colours-palette.scss +42 -35
  126. data/node_modules/govuk-frontend/govuk/settings/_compatibility.scss +0 -1
  127. data/node_modules/govuk-frontend/govuk/settings/_ie8.scss +1 -1
  128. data/node_modules/govuk-frontend/govuk/settings/_links.scss +62 -0
  129. data/node_modules/govuk-frontend/govuk/settings/_measurements.scss +4 -5
  130. data/node_modules/govuk-frontend/govuk/settings/_typography-font-families.scss +2 -2
  131. data/node_modules/govuk-frontend/govuk/settings/_typography-font.scss +14 -5
  132. data/node_modules/govuk-frontend/govuk/settings/_typography-responsive.scss +6 -2
  133. data/node_modules/govuk-frontend/govuk/tools/_compatibility.scss +1 -1
  134. data/node_modules/govuk-frontend/govuk/tools/_font-url.scss +1 -4
  135. data/node_modules/govuk-frontend/govuk/tools/_ie8.scss +1 -1
  136. data/node_modules/govuk-frontend/govuk/tools/_image-url.scss +1 -4
  137. data/node_modules/govuk-frontend/govuk/tools/_px-to-em.scss +1 -1
  138. data/node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss +1 -1
  139. data/node_modules/govuk-frontend/govuk/utilities/_visually-hidden.scss +0 -1
  140. data/node_modules/govuk-frontend/govuk/vendor/_sass-mq.scss +0 -4
  141. data/package-lock.json +358 -288
  142. data/package.json +2 -2
  143. metadata +56 -4
@@ -1,50 +1,2 @@
1
- @import "../../settings/all";
2
- @import "../../tools/all";
3
- @import "../../helpers/all";
4
-
5
- @include govuk-exports("govuk/component/hint") {
6
- .govuk-hint {
7
- @include govuk-font($size: 19);
8
-
9
- display: block;
10
-
11
- margin-bottom: govuk-spacing(3);
12
-
13
- color: $govuk-secondary-text-colour;
14
- }
15
-
16
- // Reduces margin-bottom of hint when used after the default label (no class)
17
- // or govuk-label--s for better vertical alignment.
18
-
19
- // This adjustment will not work when the label is inside the <h1>, however it
20
- // is unlikely that the default or govuk-label--s class would be used in this
21
- // case.
22
-
23
- // This adjustment will not work in browsers that do not support :not().
24
- // Users with these browsers will see the default size margin (5px larger).
25
-
26
- .govuk-label:not(.govuk-label--m):not(.govuk-label--l):not(.govuk-label--xl) + .govuk-hint {
27
- margin-bottom: govuk-spacing(2);
28
- }
29
-
30
- // Reduces margin-bottom of hint when used after the default legend (no class)
31
- // or govuk-fieldset__legend--s for better vertical alignment.
32
-
33
- // This adjustment will not work when the legend is outside the <h1>, however
34
- // it is unlikely that the default or govuk-fieldset__legend--s class would be
35
- // used in this case.
36
-
37
- // This adjustment will not work in browsers that do not support :not().
38
- // Users with these browsers will see the default size margin (5px larger).
39
-
40
- .govuk-fieldset__legend:not(.govuk-fieldset__legend--m):not(.govuk-fieldset__legend--l):not(.govuk-fieldset__legend--xl) + .govuk-hint {
41
- margin-bottom: govuk-spacing(2);
42
- }
43
-
44
- // Reduces visual spacing of legend when there is a hint
45
-
46
- .govuk-fieldset__legend + .govuk-hint,
47
- .govuk-fieldset__legend + .govuk-hint {
48
- margin-top: -(govuk-spacing(1));
49
- }
50
- }
1
+ @import "../../base";
2
+ @import "./index";
@@ -0,0 +1,44 @@
1
+ @include govuk-exports("govuk/component/hint") {
2
+ .govuk-hint {
3
+ @include govuk-font($size: 19);
4
+
5
+ display: block;
6
+
7
+ margin-bottom: govuk-spacing(3);
8
+
9
+ color: $govuk-secondary-text-colour;
10
+ }
11
+
12
+ // Reduces margin-bottom of hint when used after the default label (no class)
13
+ // or govuk-label--s for better vertical alignment.
14
+
15
+ // This adjustment will not work when the label is inside the <h1>, however it
16
+ // is unlikely that the default or govuk-label--s class would be used in this
17
+ // case.
18
+
19
+ // This adjustment will not work in browsers that do not support :not().
20
+ // Users with these browsers will see the default size margin (5px larger).
21
+
22
+ .govuk-label:not(.govuk-label--m):not(.govuk-label--l):not(.govuk-label--xl) + .govuk-hint {
23
+ margin-bottom: govuk-spacing(2);
24
+ }
25
+
26
+ // Reduces margin-bottom of hint when used after the default legend (no class)
27
+ // or govuk-fieldset__legend--s for better vertical alignment.
28
+
29
+ // This adjustment will not work when the legend is outside the <h1>, however
30
+ // it is unlikely that the default or govuk-fieldset__legend--s class would be
31
+ // used in this case.
32
+
33
+ // This adjustment will not work in browsers that do not support :not().
34
+ // Users with these browsers will see the default size margin (5px larger).
35
+
36
+ .govuk-fieldset__legend:not(.govuk-fieldset__legend--m):not(.govuk-fieldset__legend--l):not(.govuk-fieldset__legend--xl) + .govuk-hint {
37
+ margin-bottom: govuk-spacing(2);
38
+ }
39
+
40
+ // Reduces visual spacing of legend when there is a hint
41
+ .govuk-fieldset__legend + .govuk-hint {
42
+ margin-top: -(govuk-spacing(1));
43
+ }
44
+ }
@@ -0,0 +1,191 @@
1
+ @import "../error-message/index";
2
+ @import "../hint/index";
3
+ @import "../label/index";
4
+
5
+ @include govuk-exports("govuk/component/input") {
6
+ .govuk-input {
7
+ @include govuk-font($size: 19);
8
+
9
+ box-sizing: border-box;
10
+ width: 100%;
11
+ height: 40px;
12
+ @if $govuk-typography-use-rem {
13
+ height: govuk-px-to-rem(40px);
14
+ }
15
+ margin-top: 0;
16
+
17
+ padding: govuk-spacing(1);
18
+ // setting any background-color makes text invisible when changing colours to dark backgrounds in Firefox (https://bugzilla.mozilla.org/show_bug.cgi?id=1335476)
19
+ // as background-color and color need to always be set together, color should not be set either
20
+ border: $govuk-border-width-form-element solid $govuk-input-border-colour;
21
+ border-radius: 0;
22
+
23
+ // Disable inner shadow and remove rounded corners
24
+ -webkit-appearance: none;
25
+ -moz-appearance: none;
26
+ appearance: none;
27
+
28
+ &:focus {
29
+ outline: $govuk-focus-width solid $govuk-focus-colour;
30
+ // Ensure outline appears outside of the element
31
+ outline-offset: 0;
32
+ // Double the border by adding its width again. Use `box-shadow` for this // instead of changing `border-width` - this is for consistency with
33
+ // components such as textarea where we avoid changing `border-width` as
34
+ // it will change the element size. Also, `outline` cannot be utilised
35
+ // here as it is already used for the yellow focus state.
36
+ box-shadow: inset 0 0 0 $govuk-border-width-form-element;
37
+
38
+ @include govuk-if-ie8 {
39
+ // IE8 doesn't support `box-shadow` so double the border with
40
+ // `border-width`.
41
+ border-width: $govuk-border-width-form-element * 2;
42
+ }
43
+ }
44
+ }
45
+
46
+ .govuk-input::-webkit-outer-spin-button,
47
+ .govuk-input::-webkit-inner-spin-button {
48
+ margin: 0;
49
+ -webkit-appearance: none;
50
+ }
51
+
52
+ .govuk-input[type="number"] {
53
+ -moz-appearance: textfield;
54
+ }
55
+
56
+ .govuk-input--error {
57
+ border: $govuk-border-width-form-element-error solid $govuk-error-colour;
58
+
59
+ &:focus {
60
+ border-color: $govuk-input-border-colour;
61
+ }
62
+ }
63
+
64
+ // The ex measurements are based on the number of W's that can fit inside the input
65
+ // Extra space is left on the right hand side to allow for the Safari prefill icon
66
+ // Linear regression estimation based on visual tests: y = 1.76 + 1.81x
67
+
68
+ .govuk-input--width-30 {
69
+ max-width: 56ex + 3ex;
70
+ }
71
+
72
+ .govuk-input--width-20 {
73
+ max-width: 38ex + 3ex;
74
+ }
75
+
76
+ .govuk-input--width-10 {
77
+ max-width: 20ex + 3ex;
78
+ }
79
+
80
+ .govuk-input--width-5 {
81
+ max-width: 10.8ex;
82
+ }
83
+
84
+ .govuk-input--width-4 {
85
+ max-width: 9ex;
86
+ }
87
+
88
+ .govuk-input--width-3 {
89
+ max-width: 7.2ex;
90
+ }
91
+
92
+ .govuk-input--width-2 {
93
+ max-width: 5.4ex;
94
+ }
95
+
96
+ .govuk-input__wrapper {
97
+ display: -webkit-box;
98
+ display: -webkit-flex;
99
+ display: -ms-flexbox;
100
+ display: flex;
101
+
102
+ .govuk-input {
103
+ -webkit-box-flex: 0;
104
+ -webkit-flex: 0 1 auto;
105
+ -ms-flex: 0 1 auto;
106
+ flex: 0 1 auto;
107
+ }
108
+
109
+ .govuk-input:focus {
110
+ // Hack to stop focus style being overlapped by the suffix
111
+ z-index: 1;
112
+ }
113
+
114
+ // Split prefix/suffix onto separate lines on narrow screens
115
+ @include govuk-media-query($until: mobile) {
116
+ display: block;
117
+
118
+ .govuk-input {
119
+ // Set max-width to override potential width override class on the input
120
+ max-width: 100%;
121
+ }
122
+ }
123
+ }
124
+
125
+ .govuk-input__prefix,
126
+ .govuk-input__suffix {
127
+ @include govuk-font($size: 19);
128
+
129
+ box-sizing: border-box;
130
+ display: inline-block;
131
+ min-width: 40px;
132
+ @if $govuk-typography-use-rem {
133
+ min-width: govuk-px-to-rem(40px);
134
+ }
135
+ height: 40px;
136
+ @if $govuk-typography-use-rem {
137
+ height: govuk-px-to-rem(40px);
138
+ }
139
+
140
+ padding: govuk-spacing(1);
141
+ border: $govuk-border-width-form-element solid $govuk-input-border-colour;
142
+ background-color: govuk-colour("light-grey", $legacy: "grey-3");
143
+
144
+ text-align: center;
145
+ @include govuk-media-query($until: tablet) {
146
+ line-height: 1.6;
147
+ }
148
+ white-space: nowrap;
149
+
150
+ // Emphasise non-editable status of prefixes and suffixes
151
+ cursor: default;
152
+
153
+ -webkit-box-flex: 0;
154
+
155
+ -webkit-flex: 0 0 auto;
156
+
157
+ -ms-flex: 0 0 auto;
158
+
159
+ flex: 0 0 auto;
160
+
161
+ // Split prefix/suffix onto separate lines on narrow screens
162
+ @include govuk-media-query($until: mobile) {
163
+ display: block;
164
+ height: 100%;
165
+ white-space: normal;
166
+ }
167
+ }
168
+
169
+ .govuk-input__prefix {
170
+ @include govuk-media-query($until: mobile) {
171
+ border-bottom: 0;
172
+ }
173
+ @include govuk-media-query($from: mobile) {
174
+ @include govuk-not-ie8 {
175
+ border-right: 0;
176
+ }
177
+ }
178
+ }
179
+
180
+ // Split prefix/suffix onto separate lines on narrow screens
181
+ .govuk-input__suffix {
182
+ @include govuk-media-query($until: mobile) {
183
+ border-top: 0;
184
+ }
185
+ @include govuk-media-query($from: mobile) {
186
+ @include govuk-not-ie8 {
187
+ border-left: 0;
188
+ }
189
+ }
190
+ }
191
+ }
@@ -1,103 +1,2 @@
1
- @import "../../settings/all";
2
- @import "../../tools/all";
3
- @import "../../helpers/all";
4
-
5
- @import "../error-message/error-message";
6
- @import "../hint/hint";
7
- @import "../label/label";
8
-
9
- @include govuk-exports("govuk/component/input") {
10
- .govuk-input {
11
- @include govuk-font($size: 19);
12
-
13
- box-sizing: border-box;
14
- width: 100%;
15
- height: 40px;
16
- @if $govuk-typography-use-rem {
17
- height: govuk-px-to-rem(40px);
18
- }
19
- margin-top: 0;
20
-
21
- padding: govuk-spacing(1);
22
- // setting any background-color makes text invisible when changing colours to dark backgrounds in Firefox (https://bugzilla.mozilla.org/show_bug.cgi?id=1335476)
23
- // as background-color and color need to always be set together, color should not be set either
24
- border: $govuk-border-width-form-element solid $govuk-input-border-colour;
25
- border-radius: 0;
26
-
27
- // Disable inner shadow and remove rounded corners
28
- -webkit-appearance: none;
29
- -moz-appearance: none;
30
- appearance: none;
31
-
32
- &:focus {
33
- outline: $govuk-focus-width solid $govuk-focus-colour;
34
- // Ensure outline appears outside of the element
35
- outline-offset: 0;
36
- // Double the border by adding its width again. Use `box-shadow` for this // instead of changing `border-width` - this is for consistency with
37
- // components such as textarea where we avoid changing `border-width` as
38
- // it will change the element size. Also, `outline` cannot be utilised
39
- // here as it is already used for the yellow focus state.
40
- box-shadow: inset 0 0 0 $govuk-border-width-form-element;
41
-
42
- @include govuk-if-ie8 {
43
- // IE8 doesn't support `box-shadow` so double the border with
44
- // `border-width`.
45
- border-width: $govuk-border-width-form-element * 2;
46
- }
47
- }
48
- }
49
-
50
- .govuk-input::-webkit-outer-spin-button,
51
- .govuk-input::-webkit-inner-spin-button {
52
- margin: 0;
53
- -webkit-appearance: none;
54
- }
55
-
56
- .govuk-input[type="number"] {
57
- -moz-appearance: textfield;
58
- }
59
-
60
- .govuk-input--error {
61
- border: $govuk-border-width-form-element-error solid $govuk-error-colour;
62
-
63
- &:focus {
64
- border-color: $govuk-input-border-colour;
65
- // Remove `box-shadow` inherited from `:focus` as `input--error`
66
- // already has the thicker border.
67
- box-shadow: none;
68
- }
69
- }
70
-
71
- // The ex measurements are based on the number of W's that can fit inside the input
72
- // Extra space is left on the right hand side to allow for the Safari prefill icon
73
- // Linear regression estimation based on visual tests: y = 1.76 + 1.81x
74
-
75
- .govuk-input--width-30 {
76
- max-width: 56ex + 3ex;
77
- }
78
-
79
- .govuk-input--width-20 {
80
- max-width: 38ex + 3ex;
81
- }
82
-
83
- .govuk-input--width-10 {
84
- max-width: 20ex + 3ex;
85
- }
86
-
87
- .govuk-input--width-5 {
88
- max-width: 10.8ex;
89
- }
90
-
91
- .govuk-input--width-4 {
92
- max-width: 9ex;
93
- }
94
-
95
- .govuk-input--width-3 {
96
- max-width: 7.2ex;
97
- }
98
-
99
- .govuk-input--width-2 {
100
- max-width: 5.4ex;
101
- }
102
-
103
- }
1
+ @import "../../base";
2
+ @import "./index";
@@ -0,0 +1,24 @@
1
+ @include govuk-exports("govuk/component/inset-text") {
2
+ .govuk-inset-text {
3
+ @include govuk-font($size: 19);
4
+ @include govuk-text-colour;
5
+ padding: govuk-spacing(3);
6
+ // Margin top intended to collapse
7
+ // This adds an additional 10px to the paragraph above
8
+ @include govuk-responsive-margin(6, "top");
9
+ @include govuk-responsive-margin(6, "bottom");
10
+
11
+ clear: both;
12
+
13
+ border-left: $govuk-border-width-wide solid $govuk-border-colour;
14
+
15
+ > :first-child {
16
+ margin-top: 0;
17
+ }
18
+
19
+ > :only-child,
20
+ > :last-child {
21
+ margin-bottom: 0;
22
+ }
23
+ }
24
+ }
@@ -1,28 +1,2 @@
1
- @import "../../settings/all";
2
- @import "../../tools/all";
3
- @import "../../helpers/all";
4
-
5
- @include govuk-exports("govuk/component/inset-text") {
6
- .govuk-inset-text {
7
- @include govuk-font($size: 19);
8
- @include govuk-text-colour;
9
- padding: govuk-spacing(3);
10
- // Margin top intended to collapse
11
- // This adds an additional 10px to the paragraph above
12
- @include govuk-responsive-margin(6, "top");
13
- @include govuk-responsive-margin(6, "bottom");
14
-
15
- clear: both;
16
-
17
- border-left: $govuk-border-width-wide solid $govuk-border-colour;
18
-
19
- > :first-child {
20
- margin-top: 0;
21
- }
22
-
23
- > :only-child,
24
- > :last-child {
25
- margin-bottom: 0;
26
- }
27
- }
28
- }
1
+ @import "../../base";
2
+ @import "./index";