katalyst-govuk-formbuilder 1.3.2 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/katalyst/govuk/formbuilder.scss +1 -1
  3. data/lib/katalyst/govuk/formbuilder/engine.rb +1 -0
  4. data/lib/katalyst/govuk/formbuilder/version.rb +1 -1
  5. data/vendor/assets/stylesheets/govuk-frontend/govuk/_base.scss +3 -0
  6. data/vendor/assets/stylesheets/govuk-frontend/govuk/all-ie8.scss +6 -0
  7. data/vendor/assets/stylesheets/govuk-frontend/govuk/all.scss +9 -0
  8. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/_all.scss +34 -0
  9. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/accordion/_accordion.scss +2 -0
  10. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/accordion/_index.scss +392 -0
  11. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/back-link/_back-link.scss +2 -0
  12. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/back-link/_index.scss +99 -0
  13. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/breadcrumbs/_breadcrumbs.scss +2 -0
  14. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/breadcrumbs/_index.scss +147 -0
  15. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/button/_button.scss +2 -0
  16. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/button/_index.scss +295 -0
  17. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/character-count/_character-count.scss +2 -0
  18. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/character-count/_index.scss +34 -0
  19. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/checkboxes/_checkboxes.scss +2 -0
  20. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/checkboxes/_index.scss +335 -0
  21. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/cookie-banner/_cookie-banner.scss +2 -0
  22. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/cookie-banner/_index.scss +49 -0
  23. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/date-input/_date-input.scss +2 -0
  24. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/date-input/_index.scss +26 -0
  25. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/details/_details.scss +2 -0
  26. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/details/_index.scss +88 -0
  27. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/error-message/_error-message.scss +2 -0
  28. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/error-message/_index.scss +12 -0
  29. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/error-summary/_error-summary.scss +2 -0
  30. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/error-summary/_index.scss +43 -0
  31. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/fieldset/_fieldset.scss +2 -0
  32. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/fieldset/_index.scss +64 -0
  33. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/file-upload/_file-upload.scss +2 -0
  34. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/file-upload/_index.scss +50 -0
  35. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/footer/_footer.scss +2 -0
  36. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/footer/_index.scss +200 -0
  37. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/header/_header.scss +2 -0
  38. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/header/_index.scss +349 -0
  39. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/hint/_hint.scss +2 -0
  40. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/hint/_index.scss +42 -0
  41. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/input/_index.scss +181 -0
  42. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/input/_input.scss +2 -0
  43. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/inset-text/_index.scss +24 -0
  44. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/inset-text/_inset-text.scss +2 -0
  45. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/label/_index.scss +41 -0
  46. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/label/_label.scss +2 -0
  47. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/notification-banner/_index.scss +89 -0
  48. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/notification-banner/_notification-banner.scss +2 -0
  49. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/pagination/_index.scss +247 -0
  50. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/pagination/_pagination.scss +2 -0
  51. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/panel/_index.scss +56 -0
  52. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/panel/_panel.scss +2 -0
  53. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/phase-banner/_index.scss +27 -0
  54. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/phase-banner/_phase-banner.scss +2 -0
  55. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/radios/_index.scss +349 -0
  56. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/radios/_radios.scss +2 -0
  57. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/select/_index.scss +60 -0
  58. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/select/_select.scss +2 -0
  59. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/skip-link/_index.scss +47 -0
  60. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/skip-link/_skip-link.scss +2 -0
  61. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/summary-list/_index.scss +276 -0
  62. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/summary-list/_summary-list.scss +2 -0
  63. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/table/_index.scss +71 -0
  64. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/table/_table.scss +2 -0
  65. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/tabs/_index.scss +130 -0
  66. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/tabs/_tabs.scss +2 -0
  67. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/tag/_index.scss +81 -0
  68. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/tag/_tag.scss +2 -0
  69. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/textarea/_index.scss +47 -0
  70. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/textarea/_textarea.scss +2 -0
  71. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/warning-text/_index.scss +66 -0
  72. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/warning-text/_warning-text.scss +2 -0
  73. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_all.scss +5 -0
  74. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_global-styles.scss +19 -0
  75. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_links.scss +35 -0
  76. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_lists.scss +66 -0
  77. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_section-break.scss +56 -0
  78. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_typography.scss +186 -0
  79. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_all.scss +12 -0
  80. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_clearfix.scss +15 -0
  81. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_colour.scss +95 -0
  82. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_device-pixels.scss +37 -0
  83. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_focused.scss +33 -0
  84. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_font-faces.scss +41 -0
  85. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_grid.scss +61 -0
  86. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_links.scss +429 -0
  87. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_media-queries.scss +91 -0
  88. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_shape-arrow.scss +80 -0
  89. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_spacing.scss +171 -0
  90. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_typography.scss +214 -0
  91. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_visually-hidden.scss +84 -0
  92. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_all.scss +6 -0
  93. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_button-group.scss +85 -0
  94. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_form-group.scss +23 -0
  95. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_grid.scss +24 -0
  96. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_main-wrapper.scss +53 -0
  97. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_template.scss +32 -0
  98. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_width-container.scss +84 -0
  99. data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_all.scss +5 -0
  100. data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_display.scss +24 -0
  101. data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_spacing.scss +102 -0
  102. data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_text-align.scss +14 -0
  103. data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_typography.scss +21 -0
  104. data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_width.scss +46 -0
  105. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_all.scss +24 -0
  106. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_assets.scss +82 -0
  107. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_colours-applied.scss +155 -0
  108. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_colours-organisations.scss +142 -0
  109. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_colours-palette.scss +120 -0
  110. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_compatibility.scss +100 -0
  111. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_global-styles.scss +13 -0
  112. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_ie8.scss +18 -0
  113. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_links.scss +62 -0
  114. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_measurements.scss +95 -0
  115. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_media-queries.scss +23 -0
  116. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_spacing.scss +76 -0
  117. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_typography-font-families.scss +32 -0
  118. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_typography-font.scss +112 -0
  119. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_typography-responsive.scss +195 -0
  120. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_warnings.scss +53 -0
  121. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_all.scss +7 -0
  122. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_compatibility.scss +50 -0
  123. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_exports.scss +33 -0
  124. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_font-url.scss +25 -0
  125. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_ie8.scss +51 -0
  126. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_image-url.scss +25 -0
  127. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_px-to-em.scss +20 -0
  128. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_px-to-rem.scss +20 -0
  129. data/vendor/assets/stylesheets/govuk-frontend/govuk/utilities/_all.scss +2 -0
  130. data/vendor/assets/stylesheets/govuk-frontend/govuk/utilities/_clearfix.scss +5 -0
  131. data/vendor/assets/stylesheets/govuk-frontend/govuk/utilities/_visually-hidden.scss +9 -0
  132. data/vendor/assets/stylesheets/govuk-frontend/govuk/vendor/_sass-mq.scss +347 -0
  133. metadata +130 -3
  134. data/app/assets/builds/katalyst/govuk/formbuilder.min.css +0 -1
@@ -0,0 +1,147 @@
1
+ @include govuk-exports("govuk/component/breadcrumbs") {
2
+ // Component font-size on the Frontend (used for calculations)
3
+ $font-size: 16;
4
+
5
+ // Size of chevron (excluding border)
6
+ $chevron-size: govuk-em(7px, $font-size);
7
+
8
+ // Size of chevron border
9
+ $chevron-border-min-width: 1px;
10
+ $chevron-border-width: govuk-em($chevron-border-min-width, $font-size);
11
+
12
+ // Colour of chevron
13
+ $chevron-border-colour: $govuk-secondary-text-colour;
14
+
15
+ // Calculated altitude (△↕) of the right-angled isosceles chevron with sides
16
+ // of length 8 (7px + 1px border):
17
+ //
18
+ // √(8² + 8²) * 0.5 ≅ 5.655
19
+ $chevron-altitude-calculated: govuk-em(5.655px, $font-size);
20
+
21
+ .govuk-breadcrumbs {
22
+ @include govuk-font($size: $font-size);
23
+ @include govuk-text-colour;
24
+
25
+ margin-top: govuk-spacing(3);
26
+ margin-bottom: govuk-spacing(2);
27
+ }
28
+
29
+ .govuk-breadcrumbs__list {
30
+ @include govuk-clearfix;
31
+
32
+ margin: 0;
33
+ padding: 0;
34
+ list-style-type: none;
35
+ }
36
+
37
+ .govuk-breadcrumbs__list-item {
38
+
39
+ display: inline-block;
40
+ position: relative;
41
+
42
+ margin-bottom: govuk-spacing(1);
43
+
44
+ // Add both margin and padding such that the chevron appears centrally
45
+ // between each breadcrumb item
46
+ margin-left: govuk-em(govuk-spacing(2), $font-size);
47
+ padding-left: govuk-em(govuk-spacing(2), $font-size) + $chevron-altitude-calculated;
48
+
49
+ float: left;
50
+
51
+ // Create a chevron using a box with borders on two sides, rotated 45deg.
52
+ &:before {
53
+ content: "";
54
+ display: block;
55
+
56
+ position: absolute;
57
+
58
+ @if $govuk-use-legacy-font {
59
+ // Begin adjustments for font baseline offset
60
+ // These should be removed when legacy font support is dropped
61
+ $offset: govuk-em(1px, $font-size);
62
+ top: $offset * -1;
63
+ bottom: $offset;
64
+ } @else {
65
+ top: 0;
66
+ bottom: 0;
67
+ }
68
+
69
+ // Offset by the difference between the width of the non-rotated square
70
+ // and its width when rotated
71
+ left: (($chevron-altitude-calculated * -2) + $chevron-size + $chevron-border-width);
72
+
73
+ width: $chevron-size;
74
+ height: $chevron-size;
75
+
76
+ margin: auto 0;
77
+
78
+ -webkit-transform: rotate(45deg);
79
+
80
+ -ms-transform: rotate(45deg);
81
+
82
+ transform: rotate(45deg);
83
+
84
+ border: solid;
85
+ border-width: $chevron-border-min-width $chevron-border-min-width 0 0;
86
+ border-color: $chevron-border-colour;
87
+
88
+ @supports (border-width: unquote("max(0px)")) {
89
+ border-width: unquote("max(#{$chevron-border-min-width}, #{$chevron-border-width}) max(#{$chevron-border-min-width}, #{$chevron-border-width})") 0 0;
90
+
91
+ // Ensure that the chevron never gets smaller than 16px
92
+ font-size: unquote("max(#{$font-size * 1px}, 1em)");
93
+ }
94
+
95
+ // Fall back to a greater than sign for IE8
96
+ @include govuk-if-ie8 {
97
+ content: "\003e"; // Greater than sign (>)
98
+ width: auto;
99
+ height: auto;
100
+ border: 0;
101
+ color: $chevron-border-colour;
102
+
103
+ // IE8 doesn't seem to like rendering pseudo-elements using @font-faces,
104
+ // so fall back to using another sans-serif font to render the chevron.
105
+ font-family: Arial, sans-serif;
106
+ }
107
+ }
108
+
109
+ &:first-child {
110
+ margin-left: 0;
111
+ padding-left: 0;
112
+
113
+ &:before {
114
+ content: none;
115
+ display: none;
116
+ }
117
+ }
118
+ }
119
+
120
+ .govuk-breadcrumbs__link {
121
+ @include govuk-link-common;
122
+ @include govuk-link-style-text;
123
+ }
124
+
125
+ .govuk-breadcrumbs--collapse-on-mobile {
126
+ @include govuk-media-query($until: tablet) {
127
+ .govuk-breadcrumbs__list-item {
128
+ display: none;
129
+
130
+ &:first-child,
131
+ &:last-child {
132
+ display: inline-block;
133
+ }
134
+
135
+ &:before {
136
+ top: govuk-em(6px, $font-size);
137
+ margin: 0;
138
+ }
139
+ }
140
+
141
+ .govuk-breadcrumbs__list {
142
+ display: -ms-flexbox;
143
+ display: flex;
144
+ }
145
+ }
146
+ }
147
+ }
@@ -0,0 +1,2 @@
1
+ @import "../../base";
2
+ @import "./index";
@@ -0,0 +1,295 @@
1
+ ////
2
+ /// @group components/button
3
+ ////
4
+
5
+ /// Button component background colour
6
+ ///
7
+ /// @type Colour
8
+ /// @access public
9
+
10
+ $govuk-button-background-colour: govuk-colour("green", $legacy: #00823b) !default;
11
+
12
+ /// Button component text colour
13
+ ///
14
+ /// @type Colour
15
+ /// @access public
16
+
17
+ $govuk-button-text-colour: govuk-colour("white") !default;
18
+
19
+ @include govuk-exports("govuk/component/button") {
20
+ $govuk-button-colour: $govuk-button-background-colour;
21
+ $govuk-button-hover-colour: govuk-shade($govuk-button-colour, 20%);
22
+ $govuk-button-shadow-colour: govuk-shade($govuk-button-colour, 60%);
23
+ $govuk-button-text-colour: $govuk-button-text-colour;
24
+
25
+ // Secondary button variables
26
+ $govuk-secondary-button-colour: govuk-colour("light-grey", $legacy: "grey-3");
27
+ $govuk-secondary-button-hover-colour: govuk-shade($govuk-secondary-button-colour, 10%);
28
+ $govuk-secondary-button-shadow-colour: govuk-shade($govuk-secondary-button-colour, 40%);
29
+ $govuk-secondary-button-text-colour: govuk-colour("black");
30
+
31
+ // Warning button variables
32
+ $govuk-warning-button-colour: govuk-colour("red");
33
+ $govuk-warning-button-hover-colour: govuk-shade($govuk-warning-button-colour, 20%);
34
+ $govuk-warning-button-shadow-colour: govuk-shade($govuk-warning-button-colour, 60%);
35
+ $govuk-warning-button-text-colour: govuk-colour("white");
36
+
37
+ // Because the shadow (s0) is visually 'part of' the button, we need to reduce
38
+ // the height of the button to compensate by adjusting its padding (s1) and
39
+ // increase the bottom margin to include it (s2).
40
+ $button-shadow-size: $govuk-border-width-form-element;
41
+
42
+ .govuk-button {
43
+ @include govuk-font($size: 19, $line-height: 19px);
44
+
45
+ box-sizing: border-box;
46
+ display: inline-block;
47
+ position: relative;
48
+ width: 100%;
49
+ margin-top: 0;
50
+ margin-right: 0;
51
+ margin-left: 0;
52
+ @include govuk-responsive-margin(6, "bottom", $adjustment: $button-shadow-size); // s2
53
+ padding: (govuk-spacing(2) - $govuk-border-width-form-element) govuk-spacing(2) (govuk-spacing(2) - $govuk-border-width-form-element - ($button-shadow-size / 2)); // s1
54
+ border: $govuk-border-width-form-element solid transparent;
55
+ border-radius: 0;
56
+ color: $govuk-button-text-colour;
57
+ background-color: $govuk-button-colour;
58
+ box-shadow: 0 $button-shadow-size 0 $govuk-button-shadow-colour; // s0
59
+ text-align: center;
60
+ vertical-align: top;
61
+ cursor: pointer;
62
+ -webkit-appearance: none;
63
+
64
+ @include govuk-if-ie8 {
65
+ border-bottom: $button-shadow-size solid $govuk-button-shadow-colour;
66
+ }
67
+
68
+ @include govuk-media-query($from: tablet) {
69
+ width: auto;
70
+ }
71
+
72
+ // Ensure that any global link styles are overridden
73
+ &:link,
74
+ &:visited,
75
+ &:active,
76
+ &:hover {
77
+ color: $govuk-button-text-colour;
78
+ text-decoration: none;
79
+ }
80
+
81
+ // Fix unwanted button padding in Firefox
82
+ &::-moz-focus-inner {
83
+ padding: 0;
84
+ border: 0;
85
+ }
86
+
87
+ &:hover {
88
+ background-color: $govuk-button-hover-colour;
89
+ }
90
+
91
+ &:active {
92
+ // Bump the button down so it looks like its being pressed in
93
+ top: $button-shadow-size;
94
+
95
+ @include govuk-if-ie8 {
96
+ border-bottom-width: 0;
97
+ }
98
+ }
99
+
100
+ &:focus {
101
+ border-color: $govuk-focus-colour;
102
+ // When colours are overridden, for example when users have a dark mode,
103
+ // backgrounds and box-shadows disappear, so we need to ensure there's a
104
+ // transparent outline which will be set to a visible colour.
105
+ // Since Internet Explorer 8 does not support box-shadow, we want to force the user-agent outlines
106
+ @include govuk-not-ie8 {
107
+ outline: $govuk-focus-width solid transparent;
108
+ }
109
+ // Since Internet Explorer does not support `:not()` we set a clearer focus style to match user-agent outlines.
110
+ @include govuk-if-ie8 {
111
+ color: $govuk-focus-text-colour;
112
+ background-color: $govuk-focus-colour;
113
+ }
114
+ box-shadow: inset 0 0 0 1px $govuk-focus-colour;
115
+ }
116
+
117
+ // alphagov/govuk_template includes a specific a:link:focus selector
118
+ // designed to make unvisited links a slightly darker blue when focussed, so
119
+ // we need to override the text colour for that combination of selectors so
120
+ // so that unvisited links styled as buttons do not end up with dark blue
121
+ // text when focussed.
122
+ @include _govuk-compatibility(govuk_template) {
123
+ &:link:focus {
124
+ color: $govuk-button-text-colour;
125
+ }
126
+ }
127
+
128
+ &:focus:not(:active):not(:hover) {
129
+ border-color: $govuk-focus-colour;
130
+ color: $govuk-focus-text-colour;
131
+ background-color: $govuk-focus-colour;
132
+ box-shadow: 0 2px 0 $govuk-focus-text-colour;
133
+ }
134
+
135
+ // The following adjustments do not work for <input type="button"> as
136
+ // non-container elements cannot include pseudo elements (i.e. ::before).
137
+
138
+ // Use a pseudo element to expand the click target area to include the
139
+ // button's shadow as well, in case users try to click it.
140
+ &:before {
141
+ content: "";
142
+ display: block;
143
+
144
+ position: absolute;
145
+
146
+ top: -$govuk-border-width-form-element;
147
+ right: -$govuk-border-width-form-element;
148
+ bottom: -($govuk-border-width-form-element + $button-shadow-size);
149
+ left: -$govuk-border-width-form-element;
150
+
151
+ background: transparent;
152
+ }
153
+
154
+ // When the button is active it is shifted down by $button-shadow-size to
155
+ // denote a 'pressed' state. If the user happened to click at the very top
156
+ // of the button, their mouse is no longer over the button (because it has
157
+ // 'moved beneath them') and so the click event is not fired.
158
+ //
159
+ // This corrects that by shifting the top of the pseudo element so that it
160
+ // continues to cover the area that the user originally clicked, which means
161
+ // the click event is still fired.
162
+ //
163
+ // 🎉
164
+ &:active:before {
165
+ top: -($govuk-border-width-form-element + $button-shadow-size);
166
+ }
167
+ }
168
+
169
+ .govuk-button--disabled,
170
+ .govuk-button[disabled="disabled"],
171
+ .govuk-button[disabled] {
172
+ opacity: (.5);
173
+
174
+ &:hover {
175
+ background-color: $govuk-button-colour;
176
+ cursor: default;
177
+ }
178
+
179
+ &:active {
180
+ top: 0;
181
+ box-shadow: 0 $button-shadow-size 0 $govuk-button-shadow-colour; // s0
182
+ @include govuk-if-ie8 {
183
+ border-bottom: $button-shadow-size solid $govuk-button-shadow-colour; // s0
184
+ }
185
+ }
186
+ }
187
+
188
+ .govuk-button--secondary {
189
+ background-color: $govuk-secondary-button-colour;
190
+ box-shadow: 0 $button-shadow-size 0 $govuk-secondary-button-shadow-colour;
191
+
192
+ &,
193
+ &:link,
194
+ &:visited,
195
+ &:active,
196
+ &:hover {
197
+ color: $govuk-secondary-button-text-colour;
198
+ }
199
+
200
+ // alphagov/govuk_template includes a specific a:link:focus selector
201
+ // designed to make unvisited links a slightly darker blue when focussed, so
202
+ // we need to override the text colour for that combination of selectors so
203
+ // so that unvisited links styled as buttons do not end up with dark blue
204
+ // text when focussed.
205
+ @include _govuk-compatibility(govuk_template) {
206
+ &:link:focus {
207
+ color: $govuk-secondary-button-text-colour;
208
+ }
209
+ }
210
+
211
+ &:hover {
212
+ background-color: $govuk-secondary-button-hover-colour;
213
+
214
+ &[disabled] {
215
+ background-color: $govuk-secondary-button-colour;
216
+ }
217
+ }
218
+ }
219
+
220
+ .govuk-button--warning {
221
+ background-color: $govuk-warning-button-colour;
222
+ box-shadow: 0 $button-shadow-size 0 $govuk-warning-button-shadow-colour;
223
+
224
+ &,
225
+ &:link,
226
+ &:visited,
227
+ &:active,
228
+ &:hover {
229
+ color: $govuk-warning-button-text-colour;
230
+ }
231
+
232
+ // alphagov/govuk_template includes a specific a:link:focus selector
233
+ // designed to make unvisited links a slightly darker blue when focussed, so
234
+ // we need to override the text colour for that combination of selectors so
235
+ // so that unvisited links styled as buttons do not end up with dark blue
236
+ // text when focussed.
237
+ @include _govuk-compatibility(govuk_template) {
238
+ &:link:focus {
239
+ color: $govuk-warning-button-text-colour;
240
+ }
241
+ }
242
+
243
+ &:hover {
244
+ background-color: $govuk-warning-button-hover-colour;
245
+
246
+ &[disabled] {
247
+ background-color: $govuk-warning-button-colour;
248
+ }
249
+ }
250
+ }
251
+
252
+ .govuk-button--start {
253
+ @include govuk-typography-weight-bold;
254
+ @include govuk-typography-responsive($size: 24, $override-line-height: 1);
255
+
256
+ display: -ms-inline-flexbox;
257
+
258
+ display: inline-flex;
259
+ min-height: auto;
260
+
261
+ -ms-flex-pack: center;
262
+
263
+ justify-content: center;
264
+ }
265
+
266
+ .govuk-button__start-icon {
267
+ margin-left: govuk-spacing(1);
268
+
269
+ @include govuk-media-query($from: desktop) {
270
+ margin-left: govuk-spacing(2);
271
+ }
272
+ vertical-align: middle;
273
+ -ms-flex-negative: 0;
274
+ flex-shrink: 0;
275
+ -ms-flex-item-align: center;
276
+ align-self: center;
277
+ // Work around SVGs not inheriting color from parent in forced color mode
278
+ // (https://github.com/w3c/csswg-drafts/issues/6310)
279
+ forced-color-adjust: auto;
280
+ }
281
+
282
+ @if $govuk-use-legacy-font {
283
+ // Begin adjustments for font baseline offset when using v1 of nta
284
+ $offset: 2;
285
+
286
+ .govuk-button {
287
+ padding-top: (govuk-spacing(2) - $govuk-border-width-form-element - ($button-shadow-size / 2) + $offset); // s1
288
+ padding-bottom: (govuk-spacing(2) - $govuk-border-width-form-element - ($button-shadow-size / 2) - $offset + 1); // s1
289
+ }
290
+
291
+ .govuk-button__start-icon {
292
+ margin-top: -3px;
293
+ }
294
+ }
295
+ }
@@ -0,0 +1,2 @@
1
+ @import "../../base";
2
+ @import "./index";
@@ -0,0 +1,34 @@
1
+ @import "../error-message/index";
2
+ @import "../hint/index";
3
+ @import "../label/index";
4
+ @import "../textarea/index";
5
+
6
+ @include govuk-exports("govuk/component/character-count") {
7
+ .govuk-character-count {
8
+ @include govuk-responsive-margin(6, "bottom");
9
+
10
+ .govuk-form-group,
11
+ .govuk-textarea {
12
+ margin-bottom: govuk-spacing(1);
13
+ }
14
+ }
15
+
16
+ .govuk-character-count__message {
17
+ @include govuk-font($size: false, $tabular: true);
18
+ margin-top: 0;
19
+ margin-bottom: 0;
20
+
21
+ &:after {
22
+ // Zero-width space that will reserve vertical space when no hint is provided
23
+ // as:
24
+ // - setting a min-height is not possible without a magic number
25
+ // because the line-height is set by the `govuk-font` call above
26
+ // - using `:empty` is not possible as the hint macro outputs line breaks
27
+ content: "\200B";
28
+ }
29
+ }
30
+
31
+ .govuk-character-count__message--disabled {
32
+ visibility: hidden;
33
+ }
34
+ }
@@ -0,0 +1,2 @@
1
+ @import "../../base";
2
+ @import "./index";