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.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.nvmrc +1 -1
- data/.travis.yml +2 -0
- data/CHANGELOG.md +24 -0
- data/example/config/tech-docs.yml +1 -0
- data/example/source/single-page-nav.html.md +13 -0
- data/govuk_tech_docs.gemspec +2 -1
- data/lib/assets/javascripts/_modules/collapsible-navigation.js +7 -7
- data/lib/assets/javascripts/_modules/in-page-navigation.js +2 -4
- data/lib/assets/stylesheets/_govuk_tech_docs.scss +9 -10
- data/lib/assets/stylesheets/modules/_search.scss +4 -25
- data/lib/assets/stylesheets/modules/_technical-documentation.scss +1 -1
- data/lib/assets/stylesheets/modules/_toc.scss +11 -11
- data/lib/govuk_tech_docs/table_of_contents/heading.rb +5 -1
- data/lib/govuk_tech_docs/table_of_contents/heading_tree_renderer.rb +2 -2
- data/lib/govuk_tech_docs/table_of_contents/helpers.rb +22 -11
- data/lib/govuk_tech_docs/tech_docs_html_renderer.rb +1 -1
- data/lib/govuk_tech_docs/version.rb +1 -1
- data/lib/source/layouts/_header.erb +1 -2
- data/lib/source/layouts/layout.erb +3 -1
- data/node_modules/govuk-frontend/govuk/_base.scss +3 -0
- data/node_modules/govuk-frontend/govuk/all.js +306 -94
- data/node_modules/govuk-frontend/govuk/all.scss +1 -3
- data/node_modules/govuk-frontend/govuk/components/_all.scss +33 -29
- data/node_modules/govuk-frontend/govuk/components/accordion/_accordion.scss +2 -208
- data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +197 -0
- data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js +1 -1
- data/node_modules/govuk-frontend/govuk/components/back-link/_back-link.scss +2 -65
- data/node_modules/govuk-frontend/govuk/components/back-link/_index.scss +99 -0
- data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_breadcrumbs.scss +2 -118
- data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_index.scss +138 -0
- data/node_modules/govuk-frontend/govuk/components/button/_button.scss +2 -284
- data/node_modules/govuk-frontend/govuk/components/button/_index.scss +288 -0
- data/node_modules/govuk-frontend/govuk/components/character-count/_character-count.scss +2 -31
- data/node_modules/govuk-frontend/govuk/components/character-count/_index.scss +25 -0
- data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +17 -9
- data/node_modules/govuk-frontend/govuk/components/checkboxes/_checkboxes.scss +2 -308
- data/node_modules/govuk-frontend/govuk/components/checkboxes/_index.scss +320 -0
- data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js +129 -24
- data/node_modules/govuk-frontend/govuk/components/cookie-banner/_cookie-banner.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/cookie-banner/_index.scss +51 -0
- data/node_modules/govuk-frontend/govuk/components/date-input/_date-input.scss +2 -30
- data/node_modules/govuk-frontend/govuk/components/date-input/_index.scss +26 -0
- data/node_modules/govuk-frontend/govuk/components/details/_details.scss +2 -88
- data/node_modules/govuk-frontend/govuk/components/details/_index.scss +87 -0
- data/node_modules/govuk-frontend/govuk/components/error-message/_error-message.scss +2 -15
- data/node_modules/govuk-frontend/govuk/components/error-message/_index.scss +11 -0
- data/node_modules/govuk-frontend/govuk/components/error-summary/_error-summary.scss +2 -59
- data/node_modules/govuk-frontend/govuk/components/error-summary/_index.scss +43 -0
- data/node_modules/govuk-frontend/govuk/components/fieldset/_fieldset.scss +2 -68
- data/node_modules/govuk-frontend/govuk/components/fieldset/_index.scss +64 -0
- data/node_modules/govuk-frontend/govuk/components/file-upload/_file-upload.scss +2 -81
- data/node_modules/govuk-frontend/govuk/components/file-upload/_index.scss +49 -0
- data/node_modules/govuk-frontend/govuk/components/footer/_footer.scss +2 -244
- data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +241 -0
- data/node_modules/govuk-frontend/govuk/components/header/_header.scss +2 -318
- data/node_modules/govuk-frontend/govuk/components/header/_index.scss +331 -0
- data/node_modules/govuk-frontend/govuk/components/header/header.js +665 -316
- data/node_modules/govuk-frontend/govuk/components/hint/_hint.scss +2 -50
- data/node_modules/govuk-frontend/govuk/components/hint/_index.scss +44 -0
- data/node_modules/govuk-frontend/govuk/components/input/_index.scss +191 -0
- data/node_modules/govuk-frontend/govuk/components/input/_input.scss +2 -103
- data/node_modules/govuk-frontend/govuk/components/inset-text/_index.scss +24 -0
- data/node_modules/govuk-frontend/govuk/components/inset-text/_inset-text.scss +2 -28
- data/node_modules/govuk-frontend/govuk/components/label/_index.scss +41 -0
- data/node_modules/govuk-frontend/govuk/components/label/_label.scss +2 -45
- data/node_modules/govuk-frontend/govuk/components/notification-banner/_index.scss +89 -0
- data/node_modules/govuk-frontend/govuk/components/notification-banner/_notification-banner.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +61 -0
- data/node_modules/govuk-frontend/govuk/components/panel/_index.scss +44 -0
- data/node_modules/govuk-frontend/govuk/components/panel/_panel.scss +2 -44
- data/node_modules/govuk-frontend/govuk/components/phase-banner/_index.scss +27 -0
- data/node_modules/govuk-frontend/govuk/components/phase-banner/_phase-banner.scss +2 -31
- data/node_modules/govuk-frontend/govuk/components/radios/_index.scss +342 -0
- data/node_modules/govuk-frontend/govuk/components/radios/_radios.scss +2 -346
- data/node_modules/govuk-frontend/govuk/components/radios/radios.js +76 -28
- data/node_modules/govuk-frontend/govuk/components/select/_index.scss +49 -0
- data/node_modules/govuk-frontend/govuk/components/select/_select.scss +2 -57
- data/node_modules/govuk-frontend/govuk/components/skip-link/_index.scss +36 -0
- data/node_modules/govuk-frontend/govuk/components/skip-link/_skip-link.scss +2 -37
- data/node_modules/govuk-frontend/govuk/components/summary-list/_index.scss +145 -0
- data/node_modules/govuk-frontend/govuk/components/summary-list/_summary-list.scss +2 -157
- data/node_modules/govuk-frontend/govuk/components/table/_index.scss +71 -0
- data/node_modules/govuk-frontend/govuk/components/table/_table.scss +2 -54
- data/node_modules/govuk-frontend/govuk/components/tabs/_index.scss +130 -0
- data/node_modules/govuk-frontend/govuk/components/tabs/_tabs.scss +2 -142
- data/node_modules/govuk-frontend/govuk/components/tag/_index.scss +86 -0
- data/node_modules/govuk-frontend/govuk/components/tag/_tag.scss +2 -91
- data/node_modules/govuk-frontend/govuk/components/textarea/_index.scss +47 -0
- data/node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss +2 -55
- data/node_modules/govuk-frontend/govuk/components/warning-text/_index.scss +66 -0
- data/node_modules/govuk-frontend/govuk/components/warning-text/_warning-text.scss +2 -60
- data/node_modules/govuk-frontend/govuk/core/_global-styles.scss +5 -3
- data/node_modules/govuk-frontend/govuk/core/_links.scss +13 -3
- data/node_modules/govuk-frontend/govuk/core/_lists.scss +17 -3
- data/node_modules/govuk-frontend/govuk/core/_section-break.scss +5 -3
- data/node_modules/govuk-frontend/govuk/core/_template.scss +5 -4
- data/node_modules/govuk-frontend/govuk/core/_typography.scss +5 -3
- data/node_modules/govuk-frontend/govuk/helpers/_clearfix.scss +1 -1
- data/node_modules/govuk-frontend/govuk/helpers/_colour.scss +1 -1
- data/node_modules/govuk-frontend/govuk/helpers/_device-pixels.scss +3 -3
- data/node_modules/govuk-frontend/govuk/helpers/_focused.scss +1 -1
- data/node_modules/govuk-frontend/govuk/helpers/_font-faces.scss +9 -11
- data/node_modules/govuk-frontend/govuk/helpers/_grid.scss +2 -1
- data/node_modules/govuk-frontend/govuk/helpers/_links.scss +246 -33
- data/node_modules/govuk-frontend/govuk/helpers/_media-queries.scss +2 -6
- data/node_modules/govuk-frontend/govuk/helpers/_shape-arrow.scss +1 -1
- data/node_modules/govuk-frontend/govuk/helpers/_spacing.scss +3 -2
- data/node_modules/govuk-frontend/govuk/helpers/_typography.scss +8 -7
- data/node_modules/govuk-frontend/govuk/helpers/_visually-hidden.scss +1 -1
- data/node_modules/govuk-frontend/govuk/objects/_all.scss +1 -0
- data/node_modules/govuk-frontend/govuk/objects/_button-group.scss +101 -0
- data/node_modules/govuk-frontend/govuk/objects/_form-group.scss +1 -4
- data/node_modules/govuk-frontend/govuk/objects/_grid.scss +3 -6
- data/node_modules/govuk-frontend/govuk/objects/_main-wrapper.scss +5 -4
- data/node_modules/govuk-frontend/govuk/objects/_width-container.scss +6 -4
- data/node_modules/govuk-frontend/govuk/overrides/_display.scss +6 -4
- data/node_modules/govuk-frontend/govuk/overrides/_spacing.scss +5 -3
- data/node_modules/govuk-frontend/govuk/overrides/_typography.scss +5 -3
- data/node_modules/govuk-frontend/govuk/overrides/_width.scss +6 -3
- data/node_modules/govuk-frontend/govuk/settings/_all.scss +2 -0
- data/node_modules/govuk-frontend/govuk/settings/_colours-applied.scss +11 -5
- data/node_modules/govuk-frontend/govuk/settings/_colours-organisations.scss +3 -0
- data/node_modules/govuk-frontend/govuk/settings/_colours-palette.scss +42 -35
- data/node_modules/govuk-frontend/govuk/settings/_compatibility.scss +0 -1
- data/node_modules/govuk-frontend/govuk/settings/_ie8.scss +1 -1
- data/node_modules/govuk-frontend/govuk/settings/_links.scss +62 -0
- data/node_modules/govuk-frontend/govuk/settings/_measurements.scss +4 -5
- data/node_modules/govuk-frontend/govuk/settings/_typography-font-families.scss +2 -2
- data/node_modules/govuk-frontend/govuk/settings/_typography-font.scss +14 -5
- data/node_modules/govuk-frontend/govuk/settings/_typography-responsive.scss +6 -2
- data/node_modules/govuk-frontend/govuk/tools/_compatibility.scss +1 -1
- data/node_modules/govuk-frontend/govuk/tools/_font-url.scss +1 -4
- data/node_modules/govuk-frontend/govuk/tools/_ie8.scss +1 -1
- data/node_modules/govuk-frontend/govuk/tools/_image-url.scss +1 -4
- data/node_modules/govuk-frontend/govuk/tools/_px-to-em.scss +1 -1
- data/node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss +1 -1
- data/node_modules/govuk-frontend/govuk/utilities/_visually-hidden.scss +0 -1
- data/node_modules/govuk-frontend/govuk/vendor/_sass-mq.scss +0 -4
- data/package-lock.json +358 -288
- data/package.json +2 -2
- metadata +56 -4
@@ -0,0 +1,71 @@
|
|
1
|
+
@include govuk-exports("govuk/component/table") {
|
2
|
+
.govuk-table {
|
3
|
+
@include govuk-font($size: 19);
|
4
|
+
@include govuk-text-colour;
|
5
|
+
width: 100%;
|
6
|
+
@include govuk-responsive-margin(6, "bottom");
|
7
|
+
|
8
|
+
border-spacing: 0;
|
9
|
+
border-collapse: collapse;
|
10
|
+
}
|
11
|
+
|
12
|
+
.govuk-table__header {
|
13
|
+
@include govuk-typography-weight-bold;
|
14
|
+
}
|
15
|
+
|
16
|
+
.govuk-table__header,
|
17
|
+
.govuk-table__cell {
|
18
|
+
padding: govuk-spacing(2) govuk-spacing(4) govuk-spacing(2) 0;
|
19
|
+
border-bottom: 1px solid $govuk-border-colour;
|
20
|
+
text-align: left;
|
21
|
+
vertical-align: top;
|
22
|
+
// GOV.UK Elements sets the font-size and line-height for all headers and cells
|
23
|
+
// in tables.
|
24
|
+
@include govuk-compatibility(govuk_elements) {
|
25
|
+
font-size: inherit;
|
26
|
+
line-height: inherit;
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
.govuk-table__cell--numeric {
|
31
|
+
@include govuk-font($size: false, $tabular: true);
|
32
|
+
}
|
33
|
+
|
34
|
+
.govuk-table__header--numeric,
|
35
|
+
.govuk-table__cell--numeric {
|
36
|
+
text-align: right;
|
37
|
+
}
|
38
|
+
|
39
|
+
.govuk-table__header:last-child,
|
40
|
+
.govuk-table__cell:last-child {
|
41
|
+
padding-right: 0;
|
42
|
+
}
|
43
|
+
|
44
|
+
.govuk-table__caption {
|
45
|
+
@include govuk-typography-weight-bold;
|
46
|
+
|
47
|
+
display: table-caption;
|
48
|
+
text-align: left;
|
49
|
+
}
|
50
|
+
|
51
|
+
// Modifiers that make captions look more like their equivalent headings
|
52
|
+
|
53
|
+
.govuk-table__caption--xl {
|
54
|
+
@include govuk-font($size: 48, $weight: bold);
|
55
|
+
margin-bottom: govuk-spacing(3);
|
56
|
+
}
|
57
|
+
|
58
|
+
.govuk-table__caption--l {
|
59
|
+
@include govuk-font($size: 36, $weight: bold);
|
60
|
+
margin-bottom: govuk-spacing(3);
|
61
|
+
}
|
62
|
+
|
63
|
+
.govuk-table__caption--m {
|
64
|
+
@include govuk-font($size: 24, $weight: bold);
|
65
|
+
margin-bottom: govuk-spacing(3);
|
66
|
+
}
|
67
|
+
|
68
|
+
.govuk-table__caption--s {
|
69
|
+
@include govuk-font($size: 19, $weight: bold);
|
70
|
+
}
|
71
|
+
}
|
@@ -1,54 +1,2 @@
|
|
1
|
-
@import "../../
|
2
|
-
@import "
|
3
|
-
@import "../../helpers/all";
|
4
|
-
|
5
|
-
@include govuk-exports("govuk/component/table") {
|
6
|
-
.govuk-table {
|
7
|
-
@include govuk-font($size: 19);
|
8
|
-
@include govuk-text-colour;
|
9
|
-
width: 100%;
|
10
|
-
@include govuk-responsive-margin(6, "bottom");
|
11
|
-
|
12
|
-
border-spacing: 0;
|
13
|
-
border-collapse: collapse;
|
14
|
-
}
|
15
|
-
|
16
|
-
.govuk-table__header {
|
17
|
-
@include govuk-typography-weight-bold;
|
18
|
-
}
|
19
|
-
|
20
|
-
.govuk-table__header,
|
21
|
-
.govuk-table__cell {
|
22
|
-
padding: govuk-spacing(2) govuk-spacing(4) govuk-spacing(2) 0;
|
23
|
-
border-bottom: 1px solid $govuk-border-colour;
|
24
|
-
text-align: left;
|
25
|
-
vertical-align: top;
|
26
|
-
// GOV.UK Elements sets the font-size and line-height for all headers and cells
|
27
|
-
// in tables.
|
28
|
-
@include govuk-compatibility(govuk_elements) {
|
29
|
-
font-size: inherit;
|
30
|
-
line-height: inherit;
|
31
|
-
}
|
32
|
-
}
|
33
|
-
|
34
|
-
.govuk-table__cell--numeric {
|
35
|
-
@include govuk-font($size: false, $tabular: true);
|
36
|
-
}
|
37
|
-
|
38
|
-
.govuk-table__header--numeric,
|
39
|
-
.govuk-table__cell--numeric {
|
40
|
-
text-align: right;
|
41
|
-
}
|
42
|
-
|
43
|
-
.govuk-table__header:last-child,
|
44
|
-
.govuk-table__cell:last-child {
|
45
|
-
padding-right: 0;
|
46
|
-
}
|
47
|
-
|
48
|
-
.govuk-table__caption {
|
49
|
-
@include govuk-typography-weight-bold;
|
50
|
-
|
51
|
-
display: table-caption;
|
52
|
-
text-align: left;
|
53
|
-
}
|
54
|
-
}
|
1
|
+
@import "../../base";
|
2
|
+
@import "./index";
|
@@ -0,0 +1,130 @@
|
|
1
|
+
@include govuk-exports("govuk/component/tabs") {
|
2
|
+
.govuk-tabs {
|
3
|
+
@include govuk-responsive-margin(1, "top");
|
4
|
+
@include govuk-responsive-margin(6, "bottom");
|
5
|
+
}
|
6
|
+
|
7
|
+
.govuk-tabs__title {
|
8
|
+
@include govuk-font($size: 19);
|
9
|
+
@include govuk-text-colour;
|
10
|
+
margin-bottom: govuk-spacing(2);
|
11
|
+
}
|
12
|
+
|
13
|
+
.govuk-tabs__list {
|
14
|
+
margin: 0;
|
15
|
+
padding: 0;
|
16
|
+
list-style: none;
|
17
|
+
@include govuk-responsive-margin(6, "bottom");
|
18
|
+
}
|
19
|
+
|
20
|
+
.govuk-tabs__list-item {
|
21
|
+
@include govuk-font($size: 19);
|
22
|
+
margin-left: govuk-spacing(5);
|
23
|
+
|
24
|
+
&:before {
|
25
|
+
@include govuk-text-colour;
|
26
|
+
content: "\2014 "; // "— "
|
27
|
+
margin-left: - govuk-spacing(5);
|
28
|
+
padding-right: govuk-spacing(1);
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
32
|
+
.govuk-tabs__tab {
|
33
|
+
@include govuk-link-common;
|
34
|
+
@include govuk-link-style-default;
|
35
|
+
|
36
|
+
display: inline-block;
|
37
|
+
margin-bottom: govuk-spacing(2);
|
38
|
+
}
|
39
|
+
|
40
|
+
.govuk-tabs__panel {
|
41
|
+
@include govuk-responsive-margin(8, "bottom");
|
42
|
+
}
|
43
|
+
|
44
|
+
// JavaScript enabled
|
45
|
+
.js-enabled {
|
46
|
+
|
47
|
+
@include govuk-media-query($from: tablet) {
|
48
|
+
.govuk-tabs__list {
|
49
|
+
@include govuk-clearfix;
|
50
|
+
margin-bottom: 0;
|
51
|
+
border-bottom: 1px solid $govuk-border-colour;
|
52
|
+
}
|
53
|
+
|
54
|
+
.govuk-tabs__title {
|
55
|
+
display: none;
|
56
|
+
}
|
57
|
+
|
58
|
+
.govuk-tabs__list-item {
|
59
|
+
position: relative;
|
60
|
+
|
61
|
+
margin-right: govuk-spacing(1);
|
62
|
+
margin-bottom: 0;
|
63
|
+
margin-left: 0;
|
64
|
+
padding: govuk-spacing(2) govuk-spacing(4);
|
65
|
+
|
66
|
+
float: left;
|
67
|
+
background-color: govuk-colour("light-grey", $legacy: "grey-4");
|
68
|
+
text-align: center;
|
69
|
+
|
70
|
+
&:before {
|
71
|
+
content: none;
|
72
|
+
}
|
73
|
+
}
|
74
|
+
|
75
|
+
.govuk-tabs__list-item--selected {
|
76
|
+
$border-width: 1px;
|
77
|
+
|
78
|
+
position: relative;
|
79
|
+
|
80
|
+
margin-top: - govuk-spacing(1);
|
81
|
+
|
82
|
+
// Compensation for border (otherwise we get a shift)
|
83
|
+
margin-bottom: -$border-width;
|
84
|
+
padding-top: govuk-spacing(3) - $border-width;
|
85
|
+
padding-right: govuk-spacing(4) - $border-width;
|
86
|
+
padding-bottom: govuk-spacing(3) + $border-width;
|
87
|
+
padding-left: govuk-spacing(4) - $border-width;
|
88
|
+
|
89
|
+
border: $border-width solid $govuk-border-colour;
|
90
|
+
border-bottom: 0;
|
91
|
+
|
92
|
+
background-color: $govuk-body-background-colour;
|
93
|
+
|
94
|
+
.govuk-tabs__tab {
|
95
|
+
text-decoration: none;
|
96
|
+
}
|
97
|
+
}
|
98
|
+
|
99
|
+
.govuk-tabs__tab {
|
100
|
+
@include govuk-link-style-text;
|
101
|
+
|
102
|
+
margin-bottom: 0;
|
103
|
+
|
104
|
+
&:after {
|
105
|
+
content: "";
|
106
|
+
position: absolute;
|
107
|
+
top: 0;
|
108
|
+
right: 0;
|
109
|
+
bottom: 0;
|
110
|
+
left: 0;
|
111
|
+
}
|
112
|
+
}
|
113
|
+
|
114
|
+
.govuk-tabs__panel {
|
115
|
+
@include govuk-responsive-margin(0, "bottom");
|
116
|
+
padding: govuk-spacing(6) govuk-spacing(4);
|
117
|
+
border: 1px solid $govuk-border-colour;
|
118
|
+
border-top: 0;
|
119
|
+
|
120
|
+
& > :last-child {
|
121
|
+
margin-bottom: 0;
|
122
|
+
}
|
123
|
+
}
|
124
|
+
|
125
|
+
.govuk-tabs__panel--hidden {
|
126
|
+
display: none;
|
127
|
+
}
|
128
|
+
}
|
129
|
+
}
|
130
|
+
}
|
@@ -1,142 +1,2 @@
|
|
1
|
-
@import "../../
|
2
|
-
@import "
|
3
|
-
@import "../../helpers/all";
|
4
|
-
|
5
|
-
@include govuk-exports("govuk/component/tabs") {
|
6
|
-
|
7
|
-
.govuk-tabs {
|
8
|
-
@include govuk-responsive-margin(1, "top");
|
9
|
-
@include govuk-responsive-margin(6, "bottom");
|
10
|
-
}
|
11
|
-
|
12
|
-
.govuk-tabs__title {
|
13
|
-
@include govuk-font($size: 19);
|
14
|
-
@include govuk-text-colour;
|
15
|
-
margin-bottom: govuk-spacing(2);
|
16
|
-
}
|
17
|
-
|
18
|
-
.govuk-tabs__list {
|
19
|
-
margin: 0;
|
20
|
-
padding: 0;
|
21
|
-
list-style: none;
|
22
|
-
@include govuk-responsive-margin(6, "bottom");
|
23
|
-
}
|
24
|
-
|
25
|
-
.govuk-tabs__list-item {
|
26
|
-
@include govuk-font($size: 19);
|
27
|
-
margin-left: govuk-spacing(5);
|
28
|
-
|
29
|
-
&::before {
|
30
|
-
@include govuk-text-colour;
|
31
|
-
content: "\2014 "; // "— "
|
32
|
-
margin-left: - govuk-spacing(5);
|
33
|
-
padding-right: govuk-spacing(1);
|
34
|
-
}
|
35
|
-
}
|
36
|
-
|
37
|
-
.govuk-tabs__tab {
|
38
|
-
@include govuk-link-style-default;
|
39
|
-
|
40
|
-
display: inline-block;
|
41
|
-
margin-bottom: govuk-spacing(2);
|
42
|
-
|
43
|
-
// Focus state for mobile and when JavaScript is disabled
|
44
|
-
// It is removed for JS-enabled desktop styles
|
45
|
-
&:focus {
|
46
|
-
@include govuk-focused-text;
|
47
|
-
}
|
48
|
-
}
|
49
|
-
|
50
|
-
.govuk-tabs__panel {
|
51
|
-
@include govuk-responsive-margin(8, "bottom");
|
52
|
-
}
|
53
|
-
|
54
|
-
// JavaScript enabled
|
55
|
-
.js-enabled {
|
56
|
-
|
57
|
-
@include govuk-media-query($from: tablet) {
|
58
|
-
|
59
|
-
.govuk-tabs__list {
|
60
|
-
@include govuk-clearfix;
|
61
|
-
margin-bottom: 0;
|
62
|
-
border-bottom: 1px solid $govuk-border-colour;
|
63
|
-
}
|
64
|
-
|
65
|
-
.govuk-tabs__title {
|
66
|
-
display: none;
|
67
|
-
}
|
68
|
-
|
69
|
-
.govuk-tabs__list-item {
|
70
|
-
position: relative;
|
71
|
-
|
72
|
-
margin-right: govuk-spacing(1);
|
73
|
-
margin-bottom: 0;
|
74
|
-
margin-left: 0;
|
75
|
-
padding: govuk-spacing(2) govuk-spacing(4);
|
76
|
-
|
77
|
-
float: left;
|
78
|
-
background-color: govuk-colour("light-grey", $legacy: "grey-4");
|
79
|
-
text-align: center;
|
80
|
-
|
81
|
-
&::before {
|
82
|
-
content: none;
|
83
|
-
}
|
84
|
-
}
|
85
|
-
|
86
|
-
.govuk-tabs__list-item--selected {
|
87
|
-
$border-width: 1px;
|
88
|
-
|
89
|
-
position: relative;
|
90
|
-
|
91
|
-
margin-top: - govuk-spacing(1);
|
92
|
-
|
93
|
-
// Compensation for border (otherwise we get a shift)
|
94
|
-
margin-bottom: -$border-width;
|
95
|
-
padding-top: govuk-spacing(3) - $border-width;
|
96
|
-
padding-right: govuk-spacing(4) - $border-width;
|
97
|
-
padding-bottom: govuk-spacing(3) + $border-width;
|
98
|
-
padding-left: govuk-spacing(4) - $border-width;
|
99
|
-
|
100
|
-
border: $border-width solid $govuk-border-colour;
|
101
|
-
border-bottom: 0;
|
102
|
-
|
103
|
-
background-color: $govuk-body-background-colour;
|
104
|
-
|
105
|
-
.govuk-tabs__tab {
|
106
|
-
text-decoration: none;
|
107
|
-
}
|
108
|
-
}
|
109
|
-
|
110
|
-
.govuk-tabs__tab {
|
111
|
-
@include govuk-link-style-text;
|
112
|
-
|
113
|
-
margin-bottom: 0;
|
114
|
-
|
115
|
-
&::after {
|
116
|
-
content: "";
|
117
|
-
position: absolute;
|
118
|
-
top: 0;
|
119
|
-
right: 0;
|
120
|
-
bottom: 0;
|
121
|
-
left: 0;
|
122
|
-
}
|
123
|
-
}
|
124
|
-
|
125
|
-
.govuk-tabs__panel {
|
126
|
-
@include govuk-responsive-margin(0, "bottom");
|
127
|
-
padding: govuk-spacing(6) govuk-spacing(4);
|
128
|
-
border: 1px solid $govuk-border-colour;
|
129
|
-
border-top: 0;
|
130
|
-
|
131
|
-
& > :last-child {
|
132
|
-
margin-bottom: 0;
|
133
|
-
}
|
134
|
-
}
|
135
|
-
|
136
|
-
.govuk-tabs__panel--hidden {
|
137
|
-
display: none;
|
138
|
-
}
|
139
|
-
}
|
140
|
-
|
141
|
-
}
|
142
|
-
}
|
1
|
+
@import "../../base";
|
2
|
+
@import "./index";
|
@@ -0,0 +1,86 @@
|
|
1
|
+
@include govuk-exports("govuk/component/tag") {
|
2
|
+
.govuk-tag {
|
3
|
+
|
4
|
+
display: inline-block;
|
5
|
+
|
6
|
+
// When a user customises their colours often the background is removed,
|
7
|
+
// by adding a outline we ensure that the tag component still keeps it's meaning.
|
8
|
+
// https://accessibility.blog.gov.uk/2017/03/27/how-users-change-colours-on-websites/
|
9
|
+
outline: 2px solid transparent;
|
10
|
+
outline-offset: -2px;
|
11
|
+
|
12
|
+
color: govuk-colour("white");
|
13
|
+
background-color: govuk-colour("blue");
|
14
|
+
letter-spacing: 1px;
|
15
|
+
|
16
|
+
text-decoration: none;
|
17
|
+
text-transform: uppercase;
|
18
|
+
|
19
|
+
@if $govuk-use-legacy-font {
|
20
|
+
// Since New Transport sits slightly higher than other common fonts.
|
21
|
+
// We use intentionally uneven padding to make it balanced, this can be
|
22
|
+
// removed using the version of the font that has a more common vertical spacing.
|
23
|
+
@include govuk-font($size: 16, $weight: bold, $line-height: 1.25);
|
24
|
+
padding-top: 4px;
|
25
|
+
padding-right: 8px;
|
26
|
+
padding-bottom: 1px;
|
27
|
+
padding-left: 8px;
|
28
|
+
} @else {
|
29
|
+
@include govuk-font($size: 16, $weight: bold, $line-height: 1);
|
30
|
+
padding-top: 5px;
|
31
|
+
padding-right: 8px;
|
32
|
+
padding-bottom: 4px;
|
33
|
+
padding-left: 8px;
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
// Deprecated. We'll remove this class in a future release. Use `.govuk-tag--grey` instead.
|
38
|
+
.govuk-tag--inactive {
|
39
|
+
background-color: govuk-colour("dark-grey", $legacy: "grey-1");
|
40
|
+
}
|
41
|
+
|
42
|
+
.govuk-tag--grey {
|
43
|
+
color: govuk-shade(govuk-colour("dark-grey", $legacy: "grey-1"), 30);
|
44
|
+
background: govuk-tint(govuk-colour("dark-grey", $legacy: "grey-1"), 90);
|
45
|
+
}
|
46
|
+
|
47
|
+
.govuk-tag--purple {
|
48
|
+
color: govuk-shade(govuk-colour("purple"), 20);
|
49
|
+
background: govuk-tint(govuk-colour("purple"), 80);
|
50
|
+
}
|
51
|
+
|
52
|
+
.govuk-tag--turquoise {
|
53
|
+
color: govuk-shade(govuk-colour("turquoise"), 60);
|
54
|
+
background: govuk-tint(govuk-colour("turquoise"), 70);
|
55
|
+
}
|
56
|
+
|
57
|
+
.govuk-tag--blue {
|
58
|
+
color: govuk-shade(govuk-colour("blue"), 30);
|
59
|
+
background: govuk-tint(govuk-colour("blue"), 80);
|
60
|
+
}
|
61
|
+
|
62
|
+
.govuk-tag--yellow {
|
63
|
+
color: govuk-shade(govuk-colour("yellow"), 65);
|
64
|
+
background: govuk-tint(govuk-colour("yellow"), 75);
|
65
|
+
}
|
66
|
+
|
67
|
+
.govuk-tag--orange {
|
68
|
+
color: govuk-shade(govuk-colour("orange"), 55);
|
69
|
+
background: govuk-tint(govuk-colour("orange"), 70);
|
70
|
+
}
|
71
|
+
|
72
|
+
.govuk-tag--red {
|
73
|
+
color: govuk-shade(govuk-colour("red"), 30);
|
74
|
+
background: govuk-tint(govuk-colour("red"), 80);
|
75
|
+
}
|
76
|
+
|
77
|
+
.govuk-tag--pink {
|
78
|
+
color: govuk-shade(govuk-colour("pink"), 40);
|
79
|
+
background: govuk-tint(govuk-colour("pink"), 80);
|
80
|
+
}
|
81
|
+
|
82
|
+
.govuk-tag--green {
|
83
|
+
color: govuk-shade(govuk-colour("green"), 20);
|
84
|
+
background: govuk-tint(govuk-colour("green"), 80);
|
85
|
+
}
|
86
|
+
}
|