@iamproperty/components 2.6.3 → 2.7.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.
- package/assets/css/core.min.css +1 -1
- package/assets/css/core.min.css.map +1 -1
- package/assets/css/error.min.css +1 -0
- package/assets/css/error.min.css.map +1 -0
- package/assets/css/style.min.css +1 -1
- package/assets/css/style.min.css.map +1 -1
- package/assets/favicons/android-chrome-512x512-maskable.png +0 -0
- package/assets/js/scripts.bundle.js +1 -1
- package/assets/js/scripts.bundle.min.js +1 -1
- package/assets/sass/_components.scss +14 -37
- package/assets/sass/_corefiles.scss +25 -43
- package/assets/sass/_forms.scss +10 -0
- package/assets/sass/_func.scss +6 -4
- package/assets/sass/_functions/functions.scss +54 -8
- package/assets/sass/_functions/mixins.scss +70 -18
- package/assets/sass/_functions/utilities.scss +4 -0
- package/assets/sass/_functions/variables.scss +47 -39
- package/assets/sass/_print.scss +2 -0
- package/assets/sass/components/accordion.scss +4 -2
- package/assets/sass/components/alert.scss +2 -0
- package/assets/sass/components/cardDeck.scss +1 -0
- package/assets/sass/components/carousel.scss +10 -40
- package/assets/sass/components/charts.scss +13 -2
- package/assets/sass/components/drawer.scss +2 -0
- package/assets/sass/components/header.scss +6 -0
- package/assets/sass/components/modal.scss +5 -2
- package/assets/sass/components/nav.scss +5 -6
- package/assets/sass/components/property-searchbar.scss +5 -0
- package/assets/sass/components/snapshot.scss +2 -0
- package/assets/sass/components/stepper.scss +6 -4
- package/assets/sass/components/tabs.scss +2 -0
- package/assets/sass/components/testimonial.scss +2 -0
- package/assets/sass/components/timeline.scss +5 -2
- package/assets/sass/core.scss +4 -4
- package/assets/sass/elements/buttons.scss +41 -88
- package/assets/sass/{components → elements}/card.scss +9 -0
- package/assets/sass/elements/container.scss +17 -14
- package/assets/sass/elements/links.scss +2 -0
- package/assets/sass/elements/lists.scss +3 -2
- package/assets/sass/elements/tables.scss +3 -0
- package/assets/sass/elements/tooltips.scss +4 -1
- package/assets/sass/elements/type.scss +44 -21
- package/assets/sass/email.scss +66 -0
- package/assets/sass/error.scss +5 -0
- package/assets/sass/foundations/brand.scss +6 -8
- package/assets/sass/foundations/circles.scss +2 -0
- package/assets/sass/foundations/icons.scss +3 -2
- package/assets/sass/foundations/media.scss +4 -0
- package/assets/sass/foundations/reboot.scss +12 -6
- package/assets/sass/foundations/root.scss +67 -18
- package/assets/sass/main.scss +5 -5
- package/dist/components.common.js +106 -123
- package/dist/components.common.js.map +1 -1
- package/dist/components.css +1 -1
- package/dist/components.css.map +1 -1
- package/dist/components.umd.js +106 -123
- package/dist/components.umd.js.map +1 -1
- package/dist/components.umd.min.js +1 -1
- package/dist/components.umd.min.js.map +1 -1
- package/package.json +6 -1
- package/src/components/Accordion/Accordion.vue +0 -2
- package/src/components/Alert/Alert.vue +1 -2
- package/src/components/CardDeck/CardDeck.vue +1 -2
- package/src/components/Carousel/Carousel.vue +1 -2
- package/src/components/Chart/Chart.vue +0 -1
- package/src/components/Drawer/Drawer.vue +0 -1
- package/src/components/Header/Header.vue +0 -1
- package/src/components/Modal/Modal.vue +0 -1
- package/src/components/Nav/Nav.vue +0 -2
- package/src/components/PropertySearchbar/PropertySearchbar.vue +0 -2
- package/src/components/Snapshot/Snapshot.vue +0 -1
- package/src/components/Stepper/Stepper.vue +0 -1
- package/src/components/Tabs/Tabs.vue +0 -1
- package/src/components/Testimonial/Testimonial.vue +0 -1
- package/src/components/Timeline/Timeline.vue +0 -1
- package/src/{components → elements}/Card/Card.vue +1 -3
- package/src/{components → elements}/Card/README.md +0 -0
- package/src/index.js +1 -1
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
@use "../_func.scss" as *;
|
|
2
|
+
|
|
3
|
+
@import "../../../node_modules/bootstrap/scss/_card.scss";
|
|
4
|
+
|
|
1
5
|
// #region Defaul Card
|
|
2
6
|
// Reset the link
|
|
3
7
|
a.card {
|
|
@@ -9,7 +13,12 @@ a.card {
|
|
|
9
13
|
}
|
|
10
14
|
}
|
|
11
15
|
|
|
16
|
+
.card:not(.card--simple) {
|
|
17
|
+
|
|
18
|
+
@include reset-colours();
|
|
19
|
+
}
|
|
12
20
|
.card {
|
|
21
|
+
|
|
13
22
|
--spread: #{rem(12)};
|
|
14
23
|
box-shadow: 0 2px var(--spread) 0 rgba(154,154,154,0.25);
|
|
15
24
|
min-height: 100%;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
@use "sass:math";
|
|
2
|
+
@use "../_func.scss" as *;
|
|
3
|
+
|
|
4
|
+
@import "../../../node_modules/bootstrap/scss/_grid.scss";
|
|
5
|
+
|
|
1
6
|
// #region container
|
|
2
7
|
.container {
|
|
3
8
|
|
|
@@ -48,11 +53,6 @@
|
|
|
48
53
|
position: relative;
|
|
49
54
|
z-index: 1;
|
|
50
55
|
|
|
51
|
-
|
|
52
|
-
&[class*="circle-pattern"] {
|
|
53
|
-
//overflow: hidden;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
56
|
> .circle {
|
|
57
57
|
|
|
58
58
|
position: absolute;
|
|
@@ -130,6 +130,7 @@
|
|
|
130
130
|
|
|
131
131
|
|
|
132
132
|
// #region Curve
|
|
133
|
+
$default-curve-width: 576!default;
|
|
133
134
|
@mixin curve($start: 10, $point-1: 20, $point-2: 95, $end: 70, $padding-top:16)
|
|
134
135
|
{
|
|
135
136
|
// Constant rules
|
|
@@ -137,8 +138,8 @@
|
|
|
137
138
|
|
|
138
139
|
// Let vars
|
|
139
140
|
$height: 100;
|
|
140
|
-
$width:
|
|
141
|
-
$middle-x: $width
|
|
141
|
+
$width: $default-curve-width;
|
|
142
|
+
$middle-x: math.div($width,2);
|
|
142
143
|
$edge: 2;
|
|
143
144
|
$modify: 1;
|
|
144
145
|
|
|
@@ -146,21 +147,23 @@
|
|
|
146
147
|
width: #{$width}px;
|
|
147
148
|
padding-top: calc(#{($height*$modify)}px + #{$padding-top}px)!important;
|
|
148
149
|
margin-top: -#{($height*$modify)}px;
|
|
149
|
-
margin-left: calc(-#{($width
|
|
150
|
+
margin-left: calc(-#{math.div($width,2)}px + 50vw);
|
|
150
151
|
clip-path: path('#{'M0,'+($start*$modify)+' L'+($edge)+','+($start*$modify)+' C'+$middle-x+','+($point-1*$modify)+' '+$middle-x+','+($point-2*$modify)+' '+($width - $edge)+','+($end*$modify)+' L'+($width + $edge)+','+($end * $modify)+' L'+$width+',5000 L0,5000 Z'}');
|
|
151
152
|
|
|
153
|
+
padding-inline: calc((#{math.div($width,2)}px - 50vw) + var(--container-padding-x));
|
|
154
|
+
|
|
152
155
|
@include media-breakpoint-up(sm) {
|
|
153
156
|
|
|
154
157
|
// Tablet vars
|
|
155
158
|
$width: 992;
|
|
156
|
-
$middle-x: $width
|
|
159
|
+
$middle-x: math.div($width,2);
|
|
157
160
|
$modify: 1.5;
|
|
158
161
|
|
|
159
162
|
// Tablet CSS rules
|
|
160
163
|
width: #{$width}px;
|
|
161
164
|
padding-top: calc(#{($height*$modify)}px + #{$padding-top}px)!important;
|
|
162
165
|
margin-top: -#{($height*$modify)}px;
|
|
163
|
-
margin-left: calc(-#{($width
|
|
166
|
+
margin-left: calc(-#{math.div($width,2)}px + 50vw);
|
|
164
167
|
clip-path: path('#{'M0,'+($start*$modify)+' L'+($edge)+','+($start*$modify)+' C'+$middle-x+','+($point-1*$modify)+' '+$middle-x+','+($point-2*$modify)+' '+($width - $edge)+','+($end*$modify)+' L'+($width + $edge)+','+($end*$modify)+' L'+$width+',5000 L0,5000 Z'}');
|
|
165
168
|
}
|
|
166
169
|
|
|
@@ -168,7 +171,7 @@
|
|
|
168
171
|
|
|
169
172
|
// Desktop vars
|
|
170
173
|
$width: 1440;
|
|
171
|
-
$middle-x: $width
|
|
174
|
+
$middle-x: math.div($width,2);
|
|
172
175
|
$modify: 2;
|
|
173
176
|
|
|
174
177
|
// Desktop CSS rules
|
|
@@ -176,7 +179,7 @@
|
|
|
176
179
|
max-width: #{$width}px!important;
|
|
177
180
|
padding-top: calc(#{($height*$modify)}px + #{$padding-top}px)!important;
|
|
178
181
|
margin-top: -#{($height*$modify)}px;
|
|
179
|
-
margin-left: calc(-#{($width
|
|
182
|
+
margin-left: calc(-#{math.div($width,2)}px + 50vw);
|
|
180
183
|
clip-path: path('#{'M0,'+($start*$modify)+' L'+($edge)+','+($start*$modify)+' C'+$middle-x+','+($point-1*$modify)+' '+$middle-x+','+($point-2*$modify)+' '+($width - $edge)+','+($end*$modify)+' L'+($width + $edge)+','+($end*$modify)+' L'+$width+',5000 L0,5000 Z'}');
|
|
181
184
|
}
|
|
182
185
|
}
|
|
@@ -193,7 +196,6 @@
|
|
|
193
196
|
}
|
|
194
197
|
}
|
|
195
198
|
|
|
196
|
-
|
|
197
199
|
.container--curve {
|
|
198
200
|
|
|
199
201
|
@include curve();
|
|
@@ -215,8 +217,9 @@
|
|
|
215
217
|
|
|
216
218
|
position: relative;
|
|
217
219
|
|
|
218
|
-
@media (min-width: #{em(
|
|
220
|
+
@media (min-width: #{em($device-md-width)}) {
|
|
219
221
|
margin-left: auto;
|
|
222
|
+
padding-inline: var(--container-padding-x);
|
|
220
223
|
}
|
|
221
224
|
}
|
|
222
225
|
// #endregion
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@use "../_func.scss" as *;
|
|
2
|
+
|
|
1
3
|
// #region Default table
|
|
2
4
|
table {
|
|
3
5
|
--border-width: 2px;
|
|
@@ -17,6 +19,7 @@ td,th {
|
|
|
17
19
|
border: none;
|
|
18
20
|
font-size: rem(16);
|
|
19
21
|
line-height: rem(24);
|
|
22
|
+
color: var(--colour-body);
|
|
20
23
|
|
|
21
24
|
&:first-child {
|
|
22
25
|
padding-left: rem(8);
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@use "../_func.scss" as *;
|
|
2
|
+
|
|
1
3
|
abbr[title],
|
|
2
4
|
.tooltip {
|
|
3
5
|
|
|
@@ -26,7 +28,8 @@ abbr[title],
|
|
|
26
28
|
left: 50%;
|
|
27
29
|
min-width: max(120%, #{rem(100)});
|
|
28
30
|
transform: translate(-50%,0);
|
|
29
|
-
background:
|
|
31
|
+
background: var(--bs-body-bg);
|
|
32
|
+
color: inherit;
|
|
30
33
|
padding: 0.5em;
|
|
31
34
|
border-radius: 3px;
|
|
32
35
|
box-shadow: 1px 1px 3px 1px rgba(0,0,0,0.3);
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
@use "../_func.scss" as *;
|
|
2
|
+
|
|
3
|
+
/* Duplicated from bootstrap reboot so that the type file will compile */
|
|
4
|
+
mark {
|
|
5
|
+
padding: $mark-padding;
|
|
6
|
+
background-color: $mark-bg;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
small {
|
|
10
|
+
@include font-size($small-font-size);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@import "../../../node_modules/bootstrap/scss/_type.scss";
|
|
15
|
+
|
|
1
16
|
// #region headings
|
|
2
17
|
%heading {
|
|
3
18
|
clear: both;
|
|
@@ -6,38 +21,46 @@
|
|
|
6
21
|
@include var(color,--colour-heading);
|
|
7
22
|
color: var(--colour-heading,var(--colour-primary));
|
|
8
23
|
display: block;
|
|
9
|
-
//margin-bottom: clamp(1rem,0.5em,0.5em);
|
|
10
|
-
//line-height: clamp(2.5rem,1em,1.2em);
|
|
11
24
|
text-indent: -0.04em;
|
|
12
25
|
letter-spacing: -0.01em;
|
|
26
|
+
|
|
27
|
+
margin-top: 0; // 1
|
|
28
|
+
margin-bottom: $headings-margin-bottom;
|
|
29
|
+
font-style: $headings-font-style;
|
|
30
|
+
line-height: $headings-line-height;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.h1 {
|
|
34
|
+
@include font-size($h1-font-size);
|
|
13
35
|
}
|
|
14
36
|
|
|
15
|
-
h1,
|
|
16
|
-
.h1,
|
|
17
|
-
h2,
|
|
18
37
|
.h2 {
|
|
19
|
-
@
|
|
38
|
+
@include font-size($h2-font-size);
|
|
20
39
|
}
|
|
21
|
-
|
|
40
|
+
|
|
22
41
|
.h3 {
|
|
23
|
-
@
|
|
42
|
+
@include font-size($h3-font-size);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.h4 {
|
|
46
|
+
@include font-size($h4-font-size);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.h5 {
|
|
50
|
+
@include font-size($h5-font-size);
|
|
24
51
|
}
|
|
25
|
-
|
|
26
|
-
.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
.h6
|
|
52
|
+
|
|
53
|
+
.h6 {
|
|
54
|
+
@include font-size($h6-font-size);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@include is('h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6,.display-1,.display-2, .display-3, .display-4'){
|
|
31
58
|
|
|
32
59
|
@extend %heading;
|
|
33
60
|
}
|
|
34
61
|
|
|
35
|
-
.display-1,
|
|
36
|
-
.display-2,
|
|
37
|
-
.display-3,
|
|
38
|
-
.display-4 {
|
|
62
|
+
@include is('.display-1,.display-2, .display-3, .display-4') {
|
|
39
63
|
|
|
40
|
-
@extend %heading;
|
|
41
64
|
font-size: var(--fs-display);
|
|
42
65
|
}
|
|
43
66
|
|
|
@@ -73,7 +96,7 @@ p + p {
|
|
|
73
96
|
font-weight: 700;
|
|
74
97
|
line-height: 1.2;
|
|
75
98
|
margin-bottom: 3rem;
|
|
76
|
-
@include var(color,--colour-
|
|
99
|
+
@include var(color,--colour-heading);
|
|
77
100
|
}
|
|
78
101
|
|
|
79
102
|
blockquote {
|
|
@@ -108,7 +131,7 @@ blockquote {
|
|
|
108
131
|
@extend %heading;
|
|
109
132
|
text-decoration: underline;
|
|
110
133
|
text-underline-offset: 1rem;
|
|
111
|
-
text-decoration-color: var(--colour-secondary
|
|
134
|
+
text-decoration-color: var(--colour-secondary);
|
|
112
135
|
text-decoration-thickness: 0.4rem;
|
|
113
136
|
margin-bottom: 2rem;
|
|
114
137
|
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
|
|
3
|
+
// Set mobile only variable so that the media query mixin doesn't print out non mobile rules
|
|
4
|
+
|
|
5
|
+
@use "_func" as *;
|
|
6
|
+
|
|
7
|
+
$mobileOnly: "true";
|
|
8
|
+
$compatible: "true";
|
|
9
|
+
|
|
10
|
+
// Update the breakpoints to just one to remove some utility classes
|
|
11
|
+
$grid-breakpoints: (
|
|
12
|
+
xs: 0
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
// Simplify the grid
|
|
16
|
+
$grid-columns: 4;
|
|
17
|
+
|
|
18
|
+
$device-xs-width: 600;
|
|
19
|
+
$device-md-width: 600;
|
|
20
|
+
$container-padding-x: 32;
|
|
21
|
+
$default-curve-width: 600;
|
|
22
|
+
|
|
23
|
+
@import "_corefiles";
|
|
24
|
+
|
|
25
|
+
:root {
|
|
26
|
+
|
|
27
|
+
--container-padding-x: #{rem(66)};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
html {
|
|
31
|
+
|
|
32
|
+
@media (min-width: #{em(600)}) {
|
|
33
|
+
font-size: 100%;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.content-wrapper > * {
|
|
38
|
+
max-width: 600px;
|
|
39
|
+
margin-inline: auto;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.container:not(.container-fluid) {
|
|
43
|
+
max-width: 600px;
|
|
44
|
+
padding-left: #{rem(48)};
|
|
45
|
+
padding-right: #{rem(48)};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.table--email,
|
|
49
|
+
.table--email tr,
|
|
50
|
+
.table--email td {
|
|
51
|
+
border: none;
|
|
52
|
+
margin: 0;
|
|
53
|
+
padding: 0;
|
|
54
|
+
}
|
|
55
|
+
.table--email td + td {
|
|
56
|
+
padding-left: 1rem;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* card */
|
|
60
|
+
.card {
|
|
61
|
+
min-height: auto;
|
|
62
|
+
}
|
|
63
|
+
/* utilities */
|
|
64
|
+
.text-white {
|
|
65
|
+
color: white;;
|
|
66
|
+
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@use "../_func" as *;
|
|
2
|
+
|
|
1
3
|
.brand {
|
|
2
4
|
|
|
3
5
|
--svg-width: #{em(380,130)};
|
|
@@ -28,17 +30,13 @@
|
|
|
28
30
|
min-width: 100%;
|
|
29
31
|
min-width: Min(100%, var(--svg-width));
|
|
30
32
|
font-size: rem(64);
|
|
31
|
-
@include var(color,--colour-
|
|
33
|
+
@include var(color,--colour-brand);
|
|
32
34
|
|
|
33
35
|
/* Restrict the logo colours so that only text-secondary can be defined */
|
|
34
36
|
&[class*="text-"]:not(.text-secondary){
|
|
35
37
|
color: inherit!important;
|
|
36
38
|
}
|
|
37
39
|
|
|
38
|
-
&[class*="text-"].text-secondary{
|
|
39
|
-
color: var(--colour-secondary-theme)!important;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
40
|
svg {
|
|
43
41
|
fill: currentColor;
|
|
44
42
|
height: 1em;
|
|
@@ -57,10 +55,10 @@
|
|
|
57
55
|
}
|
|
58
56
|
}
|
|
59
57
|
|
|
60
|
-
a.brand,
|
|
61
|
-
a .brand {
|
|
58
|
+
a.brand:not(:hover):not(:focus):not(:active),
|
|
59
|
+
a:not(:hover):not(:focus):not(:active) .brand {
|
|
62
60
|
|
|
63
|
-
@include var(color,--colour-
|
|
61
|
+
@include var(color,--colour-brand);
|
|
64
62
|
}
|
|
65
63
|
|
|
66
64
|
a.brand:hover,
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
@use "../_func" as *;
|
|
2
|
+
|
|
1
3
|
.icon {
|
|
2
4
|
fill: currentColor;
|
|
3
5
|
stroke: transparent;
|
|
4
|
-
@include var(color,--colour-
|
|
6
|
+
@include var(color,--colour-brand);
|
|
5
7
|
width: rem(64);
|
|
6
8
|
height: rem(64);
|
|
7
9
|
display: inline-block;
|
|
@@ -40,7 +42,6 @@
|
|
|
40
42
|
font-size: rem(64 - 16);
|
|
41
43
|
height: rem(64);
|
|
42
44
|
padding: 0.5rem;
|
|
43
|
-
@include var(color,--colour-primary-theme);
|
|
44
45
|
-moz-osx-font-smoothing: grayscale;
|
|
45
46
|
-webkit-font-smoothing: antialiased;
|
|
46
47
|
display: inline-block;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
@use "../_func" as *;
|
|
2
|
+
|
|
3
|
+
@import "../../../node_modules/bootstrap/scss/_reboot.scss";
|
|
4
|
+
|
|
1
5
|
/* Reset & Defaults - Most of the resets/normailization stuff is done by Bootstrap */
|
|
2
6
|
html {
|
|
3
7
|
|
|
@@ -15,14 +19,16 @@ html {
|
|
|
15
19
|
@include media-breakpoint-up(md) {
|
|
16
20
|
font-size: vw($device-md-width);
|
|
17
21
|
}
|
|
18
|
-
@media (min-width: #{em(1440)}) {
|
|
19
|
-
font-size: 100%;
|
|
20
|
-
}
|
|
21
22
|
|
|
22
|
-
@
|
|
23
|
-
|
|
23
|
+
@if $mobileOnly != "true" {
|
|
24
|
+
@media (min-width: #{em(1440)}) {
|
|
25
|
+
font-size: 100%;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@media print {
|
|
29
|
+
font-size: 16px;
|
|
30
|
+
}
|
|
24
31
|
}
|
|
25
|
-
|
|
26
32
|
/*
|
|
27
33
|
@media (min-width: #{em(1440)}) {
|
|
28
34
|
font-size: vw(1440);
|
|
@@ -1,47 +1,96 @@
|
|
|
1
|
+
@use "../func" as *;
|
|
2
|
+
|
|
1
3
|
:root {
|
|
4
|
+
// Print out the $vars array setup in the variables file so they can be used as CSS vars
|
|
2
5
|
// Custom variable values only support SassScript inside `#{}`.
|
|
3
6
|
@each $var, $value in $vars {
|
|
4
7
|
#{$var}: #{$value};
|
|
5
8
|
}
|
|
6
9
|
|
|
10
|
+
// Add in media query based updates to the global vars like updating the heading 1 font size
|
|
7
11
|
@include media-breakpoint-up(md) {
|
|
8
12
|
|
|
9
13
|
@each $var, $value in $varsMD {
|
|
10
14
|
#{$var}: #{$value};
|
|
11
15
|
}
|
|
12
16
|
}
|
|
17
|
+
|
|
18
|
+
// Extra vars needed
|
|
19
|
+
--bs-body-bg: white;
|
|
13
20
|
--colour-underline: var(--colour-secondary);
|
|
14
21
|
--colour-heading: var(--colour-primary);
|
|
15
|
-
--alpha: var(--bs-bg-opacity);
|
|
22
|
+
--alpha: var(--bs-bg-opacity,1);
|
|
16
23
|
--#{$variable-prefix}gradient: #{$gradient};
|
|
17
24
|
--content-max-width: #{$content-max-width};
|
|
25
|
+
--colour-brand: var(--colour-primary);
|
|
26
|
+
|
|
27
|
+
/* Button colours */
|
|
28
|
+
--btn-bg: var(--colour-warning);
|
|
29
|
+
--btn-text: var(--colour-primary);
|
|
30
|
+
--btn-hover-text: var(--colour-primary);
|
|
31
|
+
--btn-tertiary-bg: var(--colour-primary);
|
|
32
|
+
--btn-tertiary-hover-text: white;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Dark mode; functional colours get updated
|
|
36
|
+
@media screen and (prefers-color-scheme: dark) {
|
|
37
|
+
:root {
|
|
38
|
+
--bs-body-bg: var(--colour-primary);
|
|
39
|
+
@include invert-colours();
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
body .text-primary {
|
|
43
|
+
color: white!important;
|
|
44
|
+
}
|
|
18
45
|
}
|
|
19
46
|
|
|
20
47
|
@media screen {
|
|
21
|
-
|
|
48
|
+
|
|
49
|
+
// Reset the colours of lighter backgrounds to make sure they aren't over written by dark mode. Some other tweaks to colours are applied
|
|
50
|
+
[class*="bg-"]:not(.bg-primary):not(.bg-dark):not(.bg-danger):not(.bg-black):not(.invert-colours) {
|
|
51
|
+
|
|
52
|
+
@include reset-colours();
|
|
53
|
+
|
|
54
|
+
--colour-body: var(--colour-primary);
|
|
55
|
+
--colour-heading: var(--colour-primary);
|
|
56
|
+
color: var(--colour-body);
|
|
57
|
+
|
|
58
|
+
--btn-bg: var(--colour-primary);
|
|
59
|
+
--btn-text: white;
|
|
60
|
+
|
|
61
|
+
.btn-secondary {
|
|
62
|
+
|
|
63
|
+
--btn-text: var(--colour-primary);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Slight colour adjustments on the light background to match brand guidelines
|
|
68
|
+
.bg-light[class*="bg-"]:not(.bg-primary):not(.bg-dark):not(.bg-danger):not(.prevent-invert) {
|
|
69
|
+
--bs-body-bg: var(--colour-light);
|
|
70
|
+
--colour-heading: var(--colour-dark);
|
|
71
|
+
color: var(--colour-dark);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Override the colours when on a dark background, similiar to dark mode but on a module level
|
|
22
75
|
.bg-primary:not(.prevent-invert),
|
|
23
76
|
.bg-dark:not(.prevent-invert),
|
|
24
77
|
.bg-danger:not(.prevent-invert),
|
|
78
|
+
.bg-black:not(.prevent-invert),
|
|
25
79
|
.invert-colours {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
--colour-secondary: white;
|
|
31
|
-
--colour-primary: white;
|
|
80
|
+
|
|
81
|
+
@if $compatible != "true" {
|
|
82
|
+
|
|
83
|
+
@include invert-colours();
|
|
32
84
|
}
|
|
33
|
-
--colour-body: white;
|
|
34
|
-
--colour-link: white;
|
|
35
|
-
--colour-hover: white;
|
|
36
|
-
--colour-active: white;
|
|
37
|
-
--colour-heading: white;
|
|
38
|
-
--colour-underline: white;
|
|
39
|
-
--colour-border: white;
|
|
40
85
|
color: white;
|
|
41
86
|
}
|
|
42
87
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
88
|
+
// Only update the the colour of the underline on dark backgrounds except the primary as the secondary colour looks good on it
|
|
89
|
+
.bg-dark:not(.prevent-invert),
|
|
90
|
+
.bg-danger:not(.prevent-invert),
|
|
91
|
+
.bg-black:not(.prevent-invert),
|
|
92
|
+
.invert-colours {
|
|
93
|
+
|
|
94
|
+
--colour-underline: white;
|
|
46
95
|
}
|
|
47
96
|
}
|
package/assets/sass/main.scss
CHANGED