@ons/design-system 44.0.1 → 45.0.0

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.
Files changed (165) hide show
  1. package/components/access-code/uac.scss +5 -5
  2. package/components/address-input/_macro.njk +1 -0
  3. package/components/address-input/autosuggest.address.js +0 -1
  4. package/components/autosuggest/_macro.njk +1 -0
  5. package/components/autosuggest/autosuggest.ui.js +3 -3
  6. package/components/autosuggest/{code.list.searcher.js → fuse-config.js} +1 -3
  7. package/components/checkboxes/_checkbox-macro.njk +1 -1
  8. package/components/checkboxes/_macro.njk +1 -1
  9. package/components/fieldset/_macro.njk +1 -1
  10. package/components/header/_header.scss +3 -4
  11. package/components/header/_macro.njk +2 -2
  12. package/components/highlight/_highlight.scss +5 -0
  13. package/components/input/_input.scss +2 -2
  14. package/components/metadata/_macro.njk +1 -1
  15. package/components/metadata/_metadata.scss +1 -1
  16. package/components/modal/_macro.njk +23 -0
  17. package/components/modal/_modal.scss +32 -0
  18. package/components/modal/modal.dom.js +14 -0
  19. package/components/modal/modal.js +104 -0
  20. package/components/radios/_macro.njk +2 -2
  21. package/components/table-of-contents/_macro.njk +7 -7
  22. package/components/textarea/_macro.njk +2 -2
  23. package/components/timeout-modal/_macro.njk +26 -0
  24. package/components/timeout-modal/timeout.dom.js +16 -0
  25. package/components/timeout-modal/timeout.js +289 -0
  26. package/css/census.css +1 -0
  27. package/css/error.css +1 -0
  28. package/css/main.css +1 -0
  29. package/css/print.css +1 -0
  30. package/favicons/android-chrome-192x192.png +0 -0
  31. package/favicons/android-chrome-512x512.png +0 -0
  32. package/favicons/apple-touch-icon.png +0 -0
  33. package/favicons/browserconfig.xml +12 -0
  34. package/favicons/census/cy/android-chrome-192x192.png +0 -0
  35. package/favicons/census/cy/android-chrome-512x512.png +0 -0
  36. package/favicons/census/cy/apple-touch-icon.png +0 -0
  37. package/favicons/census/cy/browserconfig.xml +12 -0
  38. package/favicons/census/cy/favicon-16x16.png +0 -0
  39. package/favicons/census/cy/favicon-32x32.png +0 -0
  40. package/favicons/census/cy/favicon.ico +0 -0
  41. package/favicons/census/cy/manifest.json +20 -0
  42. package/favicons/census/cy/mstitle-150x150.png +0 -0
  43. package/favicons/census/cy/mstitle-310x150.png +0 -0
  44. package/favicons/census/cy/mstitle-310x310.png +0 -0
  45. package/favicons/census/cy/mstitle-70x70.png +0 -0
  46. package/favicons/census/cy/opengraph.png +0 -0
  47. package/favicons/census/cy/safari-pinned-tab.svg +3 -0
  48. package/favicons/census/cy/site.webmanifest +19 -0
  49. package/favicons/census/cy/twitter.png +0 -0
  50. package/favicons/census/en/android-chrome-192x192.png +0 -0
  51. package/favicons/census/en/android-chrome-512x512.png +0 -0
  52. package/favicons/census/en/apple-touch-icon.png +0 -0
  53. package/favicons/census/en/browserconfig.xml +12 -0
  54. package/favicons/census/en/favicon-16x16.png +0 -0
  55. package/favicons/census/en/favicon-32x32.png +0 -0
  56. package/favicons/census/en/favicon.ico +0 -0
  57. package/favicons/census/en/manifest.json +20 -0
  58. package/favicons/census/en/mstitle-150x150.png +0 -0
  59. package/favicons/census/en/mstitle-310x150.png +0 -0
  60. package/favicons/census/en/mstitle-310x310.png +0 -0
  61. package/favicons/census/en/mstitle-70x70.png +0 -0
  62. package/favicons/census/en/opengraph.png +0 -0
  63. package/favicons/census/en/safari-pinned-tab.svg +3 -0
  64. package/favicons/census/en/site.webmanifest +19 -0
  65. package/favicons/census/en/twitter.png +0 -0
  66. package/favicons/census/ni/favicon.ico +0 -0
  67. package/favicons/favicon-16x16.png +0 -0
  68. package/favicons/favicon-32x32.png +0 -0
  69. package/favicons/favicon.ico +0 -0
  70. package/favicons/manifest.json +27 -0
  71. package/favicons/maskable_icon.png +0 -0
  72. package/favicons/mstitle-150x150.png +0 -0
  73. package/favicons/mstitle-310x150.png +0 -0
  74. package/favicons/mstitle-310x310.png +0 -0
  75. package/favicons/mstitle-70x70.png +0 -0
  76. package/favicons/opengraph.png +0 -0
  77. package/favicons/safari-pinned-tab.svg +25 -0
  78. package/favicons/site.webmanifest +19 -0
  79. package/favicons/twitter.png +0 -0
  80. package/fonts/opensans-bold.woff +0 -0
  81. package/fonts/opensans-bold.woff2 +0 -0
  82. package/fonts/opensans-regular.woff +0 -0
  83. package/fonts/opensans-regular.woff2 +0 -0
  84. package/fonts/robotomono-bold.woff +0 -0
  85. package/fonts/robotomono-bold.woff2 +0 -0
  86. package/fonts/robotomono-regular.woff +0 -0
  87. package/fonts/robotomono-regular.woff2 +0 -0
  88. package/img/UKOpenGovernmentLicence-grey.svg +1 -0
  89. package/img/UKOpenGovernmentLicence.svg +1 -0
  90. package/img/card-placeholder.svg +1 -0
  91. package/img/census-landscape.svg +1 -0
  92. package/img/census-promo-banner.svg +1 -0
  93. package/img/circle-lines.svg +1 -0
  94. package/img/icons--check.svg +1 -0
  95. package/img/icons--chevron-down.svg +1 -0
  96. package/img/its-about-us--dark.svg +1 -0
  97. package/img/its-about-us--light.svg +1 -0
  98. package/img/large/hero-man.png +0 -0
  99. package/img/large/mother-and-daughter-in-ireland.jpg +0 -0
  100. package/img/large/mum-and-child-healthcare-belfast.jpg +0 -0
  101. package/img/large/placeholder-card.png +0 -0
  102. package/img/large/placeholder-news-medium.png +0 -0
  103. package/img/large/placeholder-news.png +0 -0
  104. package/img/large/placeholder-portrait.png +0 -0
  105. package/img/large/students.jpg +0 -0
  106. package/img/large/woman-in-purple-dress-shirt.jpg +0 -0
  107. package/img/logo.svg +1 -0
  108. package/img/ni-syn-cyfrif--dark.svg +1 -0
  109. package/img/ni-syn-cyfrif--light.svg +1 -0
  110. package/img/nisra-logo-black-en.svg +1 -0
  111. package/img/ogl.svg +1 -0
  112. package/img/ons-logo-black-cy.svg +1 -0
  113. package/img/ons-logo-black-en.svg +1 -0
  114. package/img/rehearsal-areas.svg +1 -0
  115. package/img/small/hero-man.png +0 -0
  116. package/img/small/mother-and-daughter-in-ireland.jpg +0 -0
  117. package/img/small/mum-and-child-healthcare-belfast.jpg +0 -0
  118. package/img/small/placeholder-card.png +0 -0
  119. package/img/small/placeholder-news-medium.png +0 -0
  120. package/img/small/placeholder-news.png +0 -0
  121. package/img/small/placeholder-portrait.png +0 -0
  122. package/img/small/students.jpg +0 -0
  123. package/img/small/woman-in-purple-dress-shirt.jpg +0 -0
  124. package/package.json +4 -4
  125. package/scripts/main.es5.js +7 -0
  126. package/scripts/main.js +7 -0
  127. package/scss/base/_fonts.scss +4 -0
  128. package/scss/base/_forms.scss +29 -0
  129. package/scss/base/_global.scss +65 -0
  130. package/scss/base/_index.scss +4 -0
  131. package/scss/base/_typography.scss +46 -0
  132. package/scss/census.scss +2 -0
  133. package/scss/error.scss +27 -0
  134. package/scss/helpers/_functions.scss +44 -0
  135. package/scss/helpers/_index.scss +3 -0
  136. package/scss/helpers/_mixins.scss +94 -0
  137. package/scss/helpers/_mq.scss +93 -0
  138. package/scss/main.scss +71 -0
  139. package/scss/objects/_container.scss +34 -0
  140. package/scss/objects/_index.scss +3 -0
  141. package/scss/objects/_page.scss +49 -0
  142. package/scss/objects/_spacing.scss +23 -0
  143. package/scss/overrides/hcm.scss +81 -0
  144. package/scss/overrides/rtl.scss +131 -0
  145. package/scss/patternlib.scss +216 -0
  146. package/scss/print.scss +66 -0
  147. package/scss/settings/_census.scss +13 -0
  148. package/scss/utilities/_border.scss +12 -0
  149. package/scss/utilities/_colors.scss +17 -0
  150. package/scss/utilities/_display.scss +19 -0
  151. package/scss/utilities/_float.scss +34 -0
  152. package/scss/utilities/_grid.scss +245 -0
  153. package/scss/utilities/_index.scss +10 -0
  154. package/scss/utilities/_margin.scss +24 -0
  155. package/scss/utilities/_pad.scss +25 -0
  156. package/scss/utilities/_typography.scss +88 -0
  157. package/scss/utilities/_utilities.scss +31 -0
  158. package/scss/utilities/_visibility.scss +45 -0
  159. package/scss/vars/_colors.scss +112 -0
  160. package/scss/vars/_forms.scss +50 -0
  161. package/scss/vars/_grid.scss +17 -0
  162. package/scss/vars/_index.scss +5 -0
  163. package/scss/vars/_typography.scss +67 -0
  164. package/scss/vars/_vars.scss +1 -0
  165. package/page-templates/_template.njk +0 -242
@@ -0,0 +1,4 @@
1
+ @include font-face(OpenSans, '#{$static}/fonts/opensans-regular', $weight: $font-weight-regular, $style: null, $exts: woff2 woff);
2
+ @include font-face(OpenSans, '#{$static}/fonts/opensans-bold', $weight: $font-weight-bold, $style: null, $exts: woff2 woff);
3
+ @include font-face(RobotoMono, '#{$static}/fonts/robotomono-regular', $weight: $font-weight-regular, $style: null, $exts: woff2 woff);
4
+ @include font-face(RobotoMono, '#{$static}/fonts/robotomono-bold', $weight: $font-weight-bold, $style: null, $exts: woff2 woff);
@@ -0,0 +1,29 @@
1
+ fieldset,
2
+ legend {
3
+ border: 0;
4
+ margin: 0;
5
+ padding: 0;
6
+ }
7
+
8
+ fieldset {
9
+ width: 100%;
10
+ }
11
+
12
+ input {
13
+ box-sizing: border-box;
14
+ }
15
+
16
+ ::-webkit-inner-spin-button {
17
+ display: none;
18
+ }
19
+
20
+ input[type='text'],
21
+ input[type='number'] {
22
+ appearance: none;
23
+ }
24
+
25
+ select {
26
+ option[disabled][value=''] {
27
+ display: none;
28
+ }
29
+ }
@@ -0,0 +1,65 @@
1
+ *,
2
+ *::before,
3
+ *::after {
4
+ box-sizing: border-box;
5
+ word-wrap: break-word;
6
+ }
7
+
8
+ html {
9
+ box-sizing: border-box;
10
+ height: 100%;
11
+ width: 100%;
12
+ }
13
+
14
+ body {
15
+ height: 100%;
16
+ margin: 0;
17
+ position: relative;
18
+ }
19
+
20
+ img {
21
+ height: auto;
22
+ max-width: 100%;
23
+ vertical-align: middle;
24
+ }
25
+
26
+ hr {
27
+ border: 0;
28
+ border-top: 1px solid $color-borders;
29
+ margin: 2rem 0 0;
30
+ }
31
+
32
+ %a-focus {
33
+ background-color: $color-focus;
34
+ box-shadow: 0 -2px $color-focus, 0 4px $color-text-link-focus;
35
+ color: $color-text-link-focus;
36
+ outline: 3px solid transparent;
37
+ text-decoration: none;
38
+ }
39
+
40
+ a {
41
+ color: $color-text-link;
42
+ text-decoration-thickness: 1px;
43
+ text-underline-position: under;
44
+ &:not(.ons-u-fs-r--b):hover {
45
+ .ons-u-fs-l &,
46
+ h2:not(.ons-u-fs-m) & {
47
+ text-decoration-thickness: 3px;
48
+ }
49
+
50
+ @include mq(m) {
51
+ .ons-u-fs-m &,
52
+ h2 &,
53
+ h3 & {
54
+ text-decoration-thickness: 3px;
55
+ }
56
+ }
57
+ }
58
+ &:hover {
59
+ color: $color-text-link-hover;
60
+ text-decoration: underline solid $color-text-link-hover 2px;
61
+ }
62
+ &:focus:not(.ons-btn--link):not(.ons-btn--ghost):not(.ons-js-clear-btn):not(.ons-download__thumbnail--link):not(.ons-tab--row):not(.ons-skip-link) {
63
+ @extend %a-focus;
64
+ }
65
+ }
@@ -0,0 +1,4 @@
1
+ @import './fonts';
2
+ @import './forms';
3
+ @import './global';
4
+ @import './typography';
@@ -0,0 +1,46 @@
1
+ html {
2
+ font-size: $base;
3
+ -webkit-font-smoothing: antialiased;
4
+ -moz-osx-font-smoothing: grayscale;
5
+ line-height: 1.6;
6
+ }
7
+
8
+ body {
9
+ color: $color-text;
10
+ font-family: $font-sans;
11
+ }
12
+
13
+ p {
14
+ margin: 0 0 1rem;
15
+ }
16
+
17
+ h1,
18
+ h2,
19
+ h3,
20
+ h4,
21
+ h5,
22
+ h6 {
23
+ line-height: 1.2;
24
+ margin: 0 0 1rem;
25
+ em {
26
+ background-color: $color-highlight;
27
+ }
28
+ }
29
+
30
+ code {
31
+ font-size: 0.8rem;
32
+ }
33
+
34
+ ul {
35
+ margin: 0 0 1rem;
36
+ padding-left: 1.5rem;
37
+ }
38
+
39
+ li {
40
+ margin-bottom: 0.5rem;
41
+ }
42
+
43
+ em {
44
+ font-style: normal;
45
+ font-weight: $font-weight-bold;
46
+ }
@@ -0,0 +1,2 @@
1
+ @import './settings/census';
2
+ @import './main';
@@ -0,0 +1,27 @@
1
+ @import 'normalize';
2
+
3
+ body {
4
+ background: #222;
5
+ color: #fff;
6
+ font-family: 'Courier New', Courier, monospace;
7
+ padding: 20px;
8
+ }
9
+
10
+ .ons-print-error-stack {
11
+ list-style: none;
12
+ margin: 0;
13
+ padding: 0;
14
+
15
+ &__heading {
16
+ color: #c00;
17
+
18
+ &--secondary {
19
+ font-size: 1.5rem;
20
+ }
21
+ }
22
+
23
+ &__entry {
24
+ color: #f66;
25
+ margin-bottom: 1em;
26
+ }
27
+ }
@@ -0,0 +1,44 @@
1
+ @use 'sass:math';
2
+
3
+ @function ems($pxval, $base: $base) {
4
+ $em-size: math.div($pxval, $base);
5
+
6
+ @return #{$em-size}em;
7
+ }
8
+
9
+ @function rems($pxval, $base: $base) {
10
+ $rem-size: math.div($pxval, $base);
11
+
12
+ @return #{$rem-size}rem;
13
+ }
14
+
15
+ @function strip-unit($num) {
16
+ @return $num / ($num * 0 + 1);
17
+ }
18
+
19
+ @function tint($color, $percentage) {
20
+ @return mix(white, $color, $percentage);
21
+ }
22
+
23
+ @function shade($color, $percentage) {
24
+ @return mix(black, $color, $percentage);
25
+ }
26
+
27
+ @function map-set($map, $key, $value) {
28
+ $new: (
29
+ $key: $value,
30
+ );
31
+
32
+ @return map-merge($map, $new);
33
+ }
34
+
35
+ @function str-replace($string, $search, $replace: '') {
36
+ $string: to-string($string);
37
+ $index: str-index($string, $search);
38
+
39
+ @if $index {
40
+ @return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
41
+ }
42
+
43
+ @return $string;
44
+ }
@@ -0,0 +1,3 @@
1
+ @import './functions';
2
+ @import './mixins';
3
+ @import './mq';
@@ -0,0 +1,94 @@
1
+ @mixin rem($property, $values...) {
2
+ $max: length($values);
3
+ $px-values: '';
4
+ $rem-values: '';
5
+
6
+ @for $i from 1 through $max {
7
+ $value: strip-unit(nth($values, $i));
8
+ $px-values: #{$px-values + $value * 16}px;
9
+
10
+ @if $i < $max {
11
+ $px-values: #{$px-values + ' '};
12
+ }
13
+ }
14
+
15
+ @for $i from 1 through $max {
16
+ $value: strip-unit(nth($values, $i));
17
+ $rem-values: #{$rem-values + $value}rem;
18
+
19
+ @if $i < $max {
20
+ $rem-values: #{$rem-values + ' '};
21
+ }
22
+ }
23
+
24
+ #{$property}: $px-values;
25
+ #{$property}: $rem-values;
26
+ }
27
+
28
+ @mixin font-size($size-value: 1.6) {
29
+ @include rem(font-size, $size-value);
30
+ }
31
+
32
+ // =============================================================================
33
+ // String Replace
34
+ // =============================================================================
35
+ @function str-replace($string, $search, $replace: '') {
36
+ $index: str-index($string, $search);
37
+
38
+ @if $index {
39
+ @return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
40
+ }
41
+
42
+ @return $string;
43
+ }
44
+ // =============================================================================
45
+ // Font Face
46
+ // =============================================================================
47
+ @mixin font-face($name, $path, $weight: null, $style: null, $exts: eot woff2 woff ttf svg) {
48
+ $src: null;
49
+ $extmods: (
50
+ eot: '?',
51
+ svg: '#' + str-replace($name, ' ', '_'),
52
+ );
53
+ $formats: (
54
+ otf: 'opentype',
55
+ ttf: 'truetype',
56
+ );
57
+
58
+ @each $ext in $exts {
59
+ $extmod: if(map-has-key($extmods, $ext), $ext + map-get($extmods, $ext), $ext);
60
+ $format: if(map-has-key($formats, $ext), map-get($formats, $ext), $ext);
61
+ $src: append($src, url('#{$path}.#{$extmod}') format(quote($format)), comma);
62
+ }
63
+
64
+ @font-face {
65
+ font-family: quote($name);
66
+ font-style: $style;
67
+ font-weight: $weight;
68
+ src: $src;
69
+ }
70
+ }
71
+
72
+ /* stylelint-disable */
73
+ @mixin clearfix() {
74
+ // no-op
75
+ }
76
+ /* stylelint-enable */
77
+
78
+ // =============================================================================
79
+ // Remove nth-Child Padding
80
+ // =============================================================================
81
+
82
+ @mixin nth-element($num, $px) {
83
+ &:nth-child(#{$num}) {
84
+ padding-left: $px;
85
+ }
86
+ }
87
+
88
+ // =============================================================================
89
+ // Sets antialiasing - used for light text on dark background
90
+ // =============================================================================
91
+ @mixin font-smoothing() {
92
+ -moz-osx-font-smoothing: grayscale;
93
+ -webkit-font-smoothing: antialiased;
94
+ }
@@ -0,0 +1,93 @@
1
+ @mixin mq($from: none, $to: none, $from-operator: none, $to-operator: none) {
2
+ @if $from != none and type-of($from) == 'string' {
3
+ $from: get-bp-width($from);
4
+ }
5
+
6
+ @if $to != none and type-of($to) == 'string' {
7
+ $to: get-bp-width($to);
8
+ }
9
+
10
+ @if ($from == none or $from <= nth(nth($grid-bp, 1), 2)) and $to == none {
11
+ @content;
12
+ }
13
+
14
+ @else if $from == none or $from <= nth(nth($grid-bp, 1), 2) {
15
+ @if $to-operator != none and $to-operator == '<' {
16
+ $to: $to - 1;
17
+ }
18
+
19
+ @media (max-width: $to) {
20
+ @content;
21
+ }
22
+ }
23
+
24
+ @else if $to == none {
25
+ @if $from-operator != none and $from-operator == '<' {
26
+ $from: $from + 1;
27
+ }
28
+
29
+ @media (min-width: $from) {
30
+ @content;
31
+ }
32
+ }
33
+
34
+ @else {
35
+ @if $from-operator != none and $from-operator == '<' {
36
+ $from: $from + 1;
37
+ }
38
+
39
+ @if $to-operator != none and $to-operator == '<' {
40
+ $to: $to - 1;
41
+ }
42
+
43
+ @media (min-width: $from) and (max-width: $to) {
44
+ @content;
45
+ }
46
+ }
47
+ }
48
+
49
+ @function get-bp-width($name, $breakpoints: $grid-bp) {
50
+ @if map-has-key($breakpoints, $name) {
51
+ @return map-get($breakpoints, $name);
52
+ }
53
+
54
+ @else {
55
+ @warn 'Breakpoint #{$name} wasn\'t found in $breakpoints.';
56
+ }
57
+ }
58
+
59
+ /// @param {Number} $number - Number to remove unit from
60
+ /// @return {Number} - Unitless number
61
+ @function strip-unit($number) {
62
+ @if type-of($number) == 'number' and not unitless($number) {
63
+ @return $number / ($number * 0 + 1);
64
+ }
65
+
66
+ @return $number;
67
+ }
68
+
69
+ @mixin bp-suffix($class, $original: true, $breakpoints: $grid-bp, $create-between-breakpoints: false) {
70
+ @if $original {
71
+ .#{$class} {
72
+ @content;
73
+ }
74
+ }
75
+
76
+ @each $breakpoint-min, $size in $breakpoints {
77
+ @include mq($breakpoint-min) {
78
+ .#{$class}\@#{$breakpoint-min} {
79
+ @content;
80
+ }
81
+ }
82
+
83
+ @if $create-between-breakpoints {
84
+ @each $breakpoint-max, $size in $grid-bp {
85
+ @include mq($breakpoint-min, $breakpoint-max, $to-operator: '<') {
86
+ .#{$class}\@#{$breakpoint-min}\@#{$breakpoint-max} {
87
+ @content;
88
+ }
89
+ }
90
+ }
91
+ }
92
+ }
93
+ }
package/scss/main.scss ADDED
@@ -0,0 +1,71 @@
1
+ @import 'normalize';
2
+ @import 'vars/index';
3
+ @import 'helpers/index';
4
+ @import 'base/index';
5
+ @import 'objects/index';
6
+ @import '../components/access-code/uac';
7
+ @import '../components/address-output/address-output';
8
+ @import '../components/articles/articles';
9
+ @import '../components/autosuggest/autosuggest';
10
+ @import '../components/breadcrumbs/breadcrumbs';
11
+ @import '../components/button/button';
12
+ @import '../components/call-to-action/call-to-action';
13
+ @import '../components/card/card';
14
+ @import '../components/checkboxes/checkbox';
15
+ @import '../components/checkboxes/checkboxes';
16
+ @import '../components/collapsible/collapsible';
17
+ @import '../components/content-pagination/content-pagination';
18
+ @import '../components/cookies-banner/cookies-banner';
19
+ @import '../components/download-resources/download-resources';
20
+ @import '../components/downloads/downloads';
21
+ @import '../components/external-link/external-link';
22
+ @import '../components/feedback/feedback';
23
+ @import '../components/field/field-group';
24
+ @import '../components/field/field';
25
+ @import '../components/fieldset/fieldset';
26
+ @import '../components/find-a-support-centre/find-a-support-centre';
27
+ @import '../components/footer/footer';
28
+ @import '../components/header/header-nav';
29
+ @import '../components/header/header';
30
+ @import '../components/hero/hero';
31
+ @import '../components/highlight/highlight';
32
+ @import '../components/icons/icons';
33
+ @import '../components/images/images';
34
+ @import '../components/input/input-type';
35
+ @import '../components/input/input';
36
+ @import '../components/label/label';
37
+ @import '../components/language-selector/language';
38
+ @import '../components/lists/list';
39
+ @import '../components/message-list/message-list';
40
+ @import '../components/message/message';
41
+ @import '../components/metadata/metadata';
42
+ @import '../components/modal/modal';
43
+ @import '../components/pagination/pagination';
44
+ @import '../components/panel/panel';
45
+ @import '../components/phase-banner/phase-banner';
46
+ @import '../components/promotional-banner/promo-banner';
47
+ @import '../components/question/question';
48
+ @import '../components/quote/quote';
49
+ @import '../components/radios/radio';
50
+ @import '../components/radios/radios';
51
+ @import '../components/related-content/related-content';
52
+ @import '../components/relationships/relationships';
53
+ @import '../components/search/search';
54
+ @import '../components/section-navigation/section-navigation';
55
+ @import '../components/skip-to-content/skip';
56
+ @import '../components/status/status';
57
+ @import '../components/summary/summary';
58
+ @import '../components/table-of-contents/toc';
59
+ @import '../components/table/table';
60
+ @import '../components/tabs/tabs';
61
+ @import '../components/text-indent/text-indent';
62
+ @import '../components/timeline/timeline';
63
+ @import '../components/upload/upload';
64
+ @import '../components/video/video';
65
+ @import 'utilities/index';
66
+
67
+ // Right to left
68
+ @import 'overrides/rtl';
69
+
70
+ // High Contrast Mode
71
+ @import 'overrides/hcm';
@@ -0,0 +1,34 @@
1
+ .ons-container {
2
+ box-sizing: border-box;
3
+ margin: 0 auto;
4
+ max-width: $grid-max-width;
5
+ padding: 0 $grid-gutters;
6
+ position: relative;
7
+ width: 100%;
8
+
9
+ @include mq(s) {
10
+ padding: 0 $grid-gutters;
11
+ }
12
+
13
+ &--wide {
14
+ max-width: $grid-max-1280;
15
+ }
16
+
17
+ &--full-width {
18
+ max-width: 100%;
19
+ }
20
+ }
21
+
22
+ .ons-grid--align-bottom {
23
+ .ons-grid__col {
24
+ vertical-align: bottom;
25
+ }
26
+ }
27
+
28
+ .ons-grid__col {
29
+ font-size: 1rem;
30
+ }
31
+
32
+ @include bp-suffix('ons-container--gutterless', $create-between-breakpoints: true) {
33
+ padding: 0;
34
+ }
@@ -0,0 +1,3 @@
1
+ @import './container';
2
+ @import './page';
3
+ @import './spacing';
@@ -0,0 +1,49 @@
1
+ .ons-page {
2
+ display: flex;
3
+ flex-direction: column;
4
+ min-height: 100%;
5
+ overflow-x: hidden;
6
+ width: 100%;
7
+ }
8
+
9
+ .ons-page__content {
10
+ flex: 1 0 auto;
11
+ // NOTE: padding-bottom: 1px fixes safari scroll issue
12
+ // Issue number #862
13
+ padding-bottom: 1px;
14
+ position: relative;
15
+ }
16
+
17
+ .ons-page__main {
18
+ margin-bottom: 4.5rem;
19
+ margin-top: 2.5rem;
20
+
21
+ @include mq(xxs, m) {
22
+ margin-top: 1.5rem;
23
+ }
24
+ }
25
+
26
+ .ons-page__body {
27
+ h2 {
28
+ @extend .ons-u-fs-xl;
29
+ }
30
+ h3,
31
+ h4,
32
+ h5,
33
+ h6 {
34
+ margin-top: 2rem;
35
+ }
36
+ .ons-panel__body,
37
+ .ons-collapsible {
38
+ h2,
39
+ h3,
40
+ h4,
41
+ h5,
42
+ h6 {
43
+ margin-top: 0;
44
+ }
45
+ }
46
+ h2:not(:first-child) {
47
+ margin-top: 2.5rem;
48
+ }
49
+ }
@@ -0,0 +1,23 @@
1
+ .ons-field +,
2
+ .ons-field-group +,
3
+ .ons-fieldset +,
4
+ .ons-input-items +,
5
+ .ons-figure +,
6
+ .ons-panel +,
7
+ .ons-summary__group +,
8
+ .ons-collapsible:not(.ons-collapsible--accordion) + {
9
+ .ons-figure,
10
+ .ons-field,
11
+ .ons-field-group,
12
+ .ons-fieldset,
13
+ .ons-input-items,
14
+ .ons-panel:not(.ons-panel--bare),
15
+ .ons-summary__group,
16
+ .ons-collapsible:not(.ons-collapsible--accordion) {
17
+ margin-top: 1.5rem;
18
+ }
19
+ }
20
+
21
+ .ons-breadcrumb + .ons-grid {
22
+ margin-top: -1rem;
23
+ }
@@ -0,0 +1,81 @@
1
+ // High Contrast Mode
2
+ @media screen and (-ms-high-contrast: active), (forced-colors: active) {
3
+ // Brightness makes all images black, except transparent parts, which remain transparent
4
+ // Then, invert(1) makes the black parts white
5
+ .ons-header__logo,
6
+ .ons-footer__ogl-img,
7
+ .ons-quote .ons-svg-icon,
8
+ .ons-collapsible__icon .ons-svg-icon,
9
+ .ons-footer img {
10
+ filter: brightness(0) invert(1);
11
+ }
12
+
13
+ // IE11 fallback
14
+ .ons-collapsible__icon .ons-svg-icon,
15
+ .ons-breadcrumb__item .ons-svg-icon,
16
+ .ons-panel .ons-svg-icon,
17
+ .ons-list--icons .ons-svg-icon {
18
+ fill: currentColor;
19
+ }
20
+
21
+ // Matches icon with the link colour
22
+ .ons-external-link {
23
+ svg {
24
+ fill: currentColor !important;
25
+ }
26
+ }
27
+
28
+ // Adds a border to container error warning panel
29
+ .ons-panel--error {
30
+ border: 1px solid currentColor;
31
+
32
+ .ons-panel__header {
33
+ border-bottom: 1px solid currentColor;
34
+ }
35
+ }
36
+
37
+ // Adds some style adjustments to the focused item to make it obvious something is selected
38
+ .ons-js-autosuggest .ons-autosuggest-input__option--focused {
39
+ padding-left: 1.5rem;
40
+ text-decoration: underline;
41
+ }
42
+
43
+ .ons-radio__input:checked + .ons-radio__label {
44
+ position: relative;
45
+
46
+ // These off pixels are not nice, but due to the way the form controls have been built I have had no choice
47
+ // I would strongly revisit doing the checkboxes and radios again and fix these non-whole pixel values
48
+ &::after {
49
+ border: 6px solid currentColor;
50
+ border-radius: 50%;
51
+ content: '';
52
+ height: 12.5px;
53
+ left: 16px;
54
+ position: absolute;
55
+ top: 18.5px;
56
+ width: 12.5px;
57
+ z-index: 1;
58
+ }
59
+ }
60
+
61
+ // Had to do this without messing with the existing SVG
62
+ .ons-input--select {
63
+ background-image: url('data:image/svg+xml;base64,PHN2ZyBpZD0iY2hldnJvbi1kb3duIiBjbGFzcz0ic3ZnLWljb24iIHZpZXdCb3g9IjAgMCAxMiA4IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogICAgPHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJNMS4yIDBMNiA1LjQgMTAuOCAwIDEyIDEuMyA2IDggMCAxLjN6Ii8+Cjwvc3ZnPgo=');
64
+ background-size: 12px 8px;
65
+ }
66
+
67
+ // I would have approached the mark differently, but without changing the existing approach this fixes it
68
+ .ons-timeline__item::before {
69
+ border: 2px solid currentColor;
70
+ }
71
+
72
+ // Buttons
73
+ .ons-btn__inner .ons-svg-icon {
74
+ fill: currentColor !important;
75
+ }
76
+
77
+ // Hero pre title
78
+ .ons-hero__pre-title {
79
+ filter: brightness(0) invert(1);
80
+ }
81
+ }