vanilla-framework 2.37.0 → 3.0.0-beta.2
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/README.md +1 -1
- package/_index.scss +1 -0
- package/package.json +11 -9
- package/scss/_base_blockquotes.scss +2 -2
- package/scss/_base_button.scss +9 -27
- package/scss/_base_code.scss +8 -9
- package/scss/_base_details.scss +3 -3
- package/scss/_base_forms-range.scss +1 -45
- package/scss/_base_forms.scss +12 -23
- package/scss/_base_grid-definitions.scss +2 -23
- package/scss/_base_hr.scss +1 -1
- package/scss/_base_icon-definitions.scss +0 -24
- package/scss/_base_lists.scss +5 -5
- package/scss/_base_media.scss +1 -6
- package/scss/_base_placeholders.scss +27 -30
- package/scss/_base_tables.scss +7 -7
- package/scss/_base_typography-definitions.scss +50 -58
- package/scss/_base_typography.scss +8 -18
- package/scss/_global_functions.scss +3 -11
- package/scss/_layouts_application-panels.scss +1 -1
- package/scss/_layouts_application.scss +1 -1
- package/scss/_layouts_fluid-breakout.scss +40 -150
- package/scss/_patterns_accordion.scss +16 -71
- package/scss/_patterns_article-pagination.scss +3 -6
- package/scss/_patterns_breadcrumbs.scss +1 -1
- package/scss/_patterns_buttons.scss +1 -35
- package/scss/_patterns_card.scss +8 -8
- package/scss/_patterns_chip.scss +89 -47
- package/scss/_patterns_code-snippet.scss +7 -7
- package/scss/_patterns_contextual-menu.scss +1 -1
- package/scss/_patterns_divider.scss +4 -4
- package/scss/_patterns_form-help-text.scss +2 -2
- package/scss/_patterns_form-password-toggle.scss +0 -6
- package/scss/_patterns_form-tick-elements.scss +217 -27
- package/scss/_patterns_form-validation.scss +2 -2
- package/scss/_patterns_forms.scss +7 -7
- package/scss/_patterns_grid.scss +6 -20
- package/scss/_patterns_heading-icon.scss +7 -7
- package/scss/_patterns_headings.scss +0 -26
- package/scss/_patterns_icons.scss +0 -58
- package/scss/_patterns_label.scss +1 -1
- package/scss/_patterns_links.scss +4 -33
- package/scss/_patterns_list-tree.scss +0 -1
- package/scss/_patterns_lists.scss +17 -32
- package/scss/_patterns_logo-section.scss +7 -5
- package/scss/_patterns_matrix.scss +19 -21
- package/scss/_patterns_media-object.scss +4 -4
- package/scss/_patterns_modal.scss +9 -9
- package/scss/_patterns_navigation.scss +317 -312
- package/scss/_patterns_notifications.scss +15 -57
- package/scss/_patterns_pagination.scss +6 -6
- package/scss/_patterns_pull-quotes.scss +4 -4
- package/scss/_patterns_search-and-filter.scss +8 -8
- package/scss/_patterns_search-box.scss +2 -3
- package/scss/_patterns_separator.scss +4 -4
- package/scss/_patterns_side-navigation.scss +12 -15
- package/scss/_patterns_strip.scss +1 -1
- package/scss/_patterns_switch.scss +11 -11
- package/scss/_patterns_table-expanding.scss +0 -13
- package/scss/_patterns_table-icons.scss +2 -2
- package/scss/_patterns_table-mobile-card.scss +4 -11
- package/scss/_patterns_table-of-contents.scss +1 -1
- package/scss/_patterns_tabs.scss +2 -2
- package/scss/_patterns_tooltips.scss +5 -5
- package/scss/_settings_breakpoints.scss +2 -3
- package/scss/_settings_colors.scss +18 -0
- package/scss/_settings_grid.scss +1 -4
- package/scss/_settings_spacing.scss +76 -98
- package/scss/_settings_system.scss +1 -7
- package/scss/_utilities_baseline-grid.scss +1 -1
- package/scss/_utilities_content-align.scss +2 -2
- package/scss/_utilities_embedded-media.scss +2 -2
- package/scss/_utilities_equal-height.scss +1 -1
- package/scss/_utilities_floats.scss +4 -4
- package/scss/_utilities_hide.scss +8 -8
- package/scss/_utilities_image-position.scss +1 -1
- package/scss/_utilities_show.scss +2 -6
- package/scss/_utilities_vertical-spacing.scss +6 -12
- package/scss/_vanilla.scss +0 -11
- package/scss/_base_forms-tick-elements.scss +0 -607
- package/scss/_base_typography-max-widths.scss +0 -36
- package/scss/_patterns_code-copyable.scss +0 -43
- package/scss/_patterns_code-numbered.scss +0 -13
- package/scss/_patterns_inline-images.scss +0 -37
- package/scss/_patterns_subnav.scss +0 -210
- package/scss/standalone/base.scss +0 -2
- package/scss/standalone/custom.scss +0 -7
- package/scss/standalone/dark.scss +0 -11
- package/scss/standalone/example.scss +0 -15
- package/scss/standalone/import.scss +0 -2
- package/scss/standalone/layouts_fluid-breakout-full.scss +0 -8
- package/scss/standalone/layouts_fluid-breakout.scss +0 -8
- package/scss/standalone/patterns_accordion.scss +0 -6
- package/scss/standalone/patterns_article-pagination.scss +0 -4
- package/scss/standalone/patterns_breadcrumbs.scss +0 -4
- package/scss/standalone/patterns_buttons.scss +0 -9
- package/scss/standalone/patterns_card.scss +0 -9
- package/scss/standalone/patterns_chip.scss +0 -6
- package/scss/standalone/patterns_code-copyable.scss +0 -4
- package/scss/standalone/patterns_code-numbered.scss +0 -4
- package/scss/standalone/patterns_code-snippet.scss +0 -6
- package/scss/standalone/patterns_contextual-menu.scss +0 -9
- package/scss/standalone/patterns_divider.scss +0 -7
- package/scss/standalone/patterns_form-password-toggle.scss +0 -19
- package/scss/standalone/patterns_form-tick-elements.scss +0 -13
- package/scss/standalone/patterns_forms.scss +0 -17
- package/scss/standalone/patterns_grid.scss +0 -4
- package/scss/standalone/patterns_heading-icon.scss +0 -4
- package/scss/standalone/patterns_headings.scss +0 -4
- package/scss/standalone/patterns_icons-additional.scss +0 -104
- package/scss/standalone/patterns_icons.scss +0 -7
- package/scss/standalone/patterns_image.scss +0 -4
- package/scss/standalone/patterns_inline-images.scss +0 -4
- package/scss/standalone/patterns_label.scss +0 -4
- package/scss/standalone/patterns_links.scss +0 -4
- package/scss/standalone/patterns_list-tree.scss +0 -4
- package/scss/standalone/patterns_lists.scss +0 -4
- package/scss/standalone/patterns_logo-section.scss +0 -4
- package/scss/standalone/patterns_matrix.scss +0 -4
- package/scss/standalone/patterns_media-object.scss +0 -4
- package/scss/standalone/patterns_modal.scss +0 -9
- package/scss/standalone/patterns_muted-heading.scss +0 -4
- package/scss/standalone/patterns_navigation.scss +0 -4
- package/scss/standalone/patterns_notifications.scss +0 -11
- package/scss/standalone/patterns_pagination.scss +0 -7
- package/scss/standalone/patterns_pull-quotes.scss +0 -4
- package/scss/standalone/patterns_search-and-filter.scss +0 -8
- package/scss/standalone/patterns_search-box.scss +0 -15
- package/scss/standalone/patterns_separator.scss +0 -4
- package/scss/standalone/patterns_side-navigation.scss +0 -11
- package/scss/standalone/patterns_skip-link.scss +0 -8
- package/scss/standalone/patterns_slider.scss +0 -4
- package/scss/standalone/patterns_strip.scss +0 -10
- package/scss/standalone/patterns_subnav.scss +0 -9
- package/scss/standalone/patterns_switch.scss +0 -4
- package/scss/standalone/patterns_tab-buttons.scss +0 -7
- package/scss/standalone/patterns_table-expanding.scss +0 -10
- package/scss/standalone/patterns_table-mobile-card.scss +0 -10
- package/scss/standalone/patterns_table-of-contents.scss +0 -7
- package/scss/standalone/patterns_table-overflow.scss +0 -10
- package/scss/standalone/patterns_table-sortable.scss +0 -10
- package/scss/standalone/patterns_tabs.scss +0 -4
- package/scss/standalone/patterns_tooltips.scss +0 -6
package/scss/_patterns_chip.scss
CHANGED
|
@@ -1,66 +1,48 @@
|
|
|
1
1
|
@import 'settings';
|
|
2
2
|
|
|
3
3
|
@mixin vf-p-chip {
|
|
4
|
-
|
|
5
|
-
$base-background-opacity-amount: 0.05;
|
|
6
|
-
$color-background-base: adjust-color($color-x-dark, $lightness: 100% * (1 - $base-background-opacity-amount));
|
|
7
|
-
$color-background-hover: adjust-color($color-x-dark, $lightness: 100% * (1 - ($base-background-opacity-amount + $hover-background-opacity-amount)));
|
|
8
|
-
|
|
9
|
-
.p-chip {
|
|
4
|
+
%vf-chip {
|
|
10
5
|
@extend %small-text;
|
|
6
|
+
@include vf-animation(#{background-color, border-color}, snap, out);
|
|
7
|
+
@include vf-focus;
|
|
11
8
|
|
|
12
|
-
|
|
13
|
-
border-radius:
|
|
9
|
+
align-items: baseline;
|
|
10
|
+
border-radius: 1rem;
|
|
14
11
|
display: inline-flex;
|
|
15
|
-
|
|
16
|
-
margin: map-get($nudges, nudge--p) $sph-inner--small 0 0;
|
|
12
|
+
margin: 0 $sph--small $input-margin-bottom 0;
|
|
17
13
|
max-width: 100%;
|
|
18
|
-
padding
|
|
19
|
-
|
|
20
|
-
padding-right: $sph-inner;
|
|
21
|
-
padding-top: 0.25rem;
|
|
14
|
+
padding: calc(#{$spv--x-small} - 1px) $sph--small; // account for border thickness using calc
|
|
15
|
+
position: relative;
|
|
22
16
|
user-select: none;
|
|
17
|
+
vertical-align: calc(1px - #{map-get($nudges, p)});
|
|
23
18
|
white-space: nowrap;
|
|
24
19
|
|
|
25
|
-
&:hover {
|
|
26
|
-
background-color: $color-background-hover;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&.is-selected,
|
|
30
|
-
&:active {
|
|
31
|
-
background-color: $colors--light-theme--background-active;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
20
|
.p-chip__lead,
|
|
35
21
|
.p-chip__value {
|
|
22
|
+
display: inline;
|
|
36
23
|
margin-bottom: 0;
|
|
37
24
|
overflow: hidden;
|
|
25
|
+
padding: 0;
|
|
38
26
|
text-overflow: ellipsis;
|
|
27
|
+
vertical-align: baseline;
|
|
39
28
|
}
|
|
40
29
|
|
|
41
30
|
.p-chip__lead {
|
|
42
|
-
$space-between-lead-and-value: 0.25rem;
|
|
43
31
|
@extend %muted-text;
|
|
44
32
|
@extend %x-small-text;
|
|
45
33
|
|
|
46
|
-
line-height: $chip-line-height;
|
|
47
|
-
padding-right: $space-between-lead-and-value * 2;
|
|
48
|
-
padding-top: 0.1rem;
|
|
49
|
-
position: relative;
|
|
50
34
|
text-transform: uppercase;
|
|
35
|
+
}
|
|
51
36
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
37
|
+
.p-chip__lead + .p-chip__value::before {
|
|
38
|
+
@extend %muted-text;
|
|
39
|
+
@extend %x-small-text;
|
|
40
|
+
|
|
41
|
+
content: ': ';
|
|
57
42
|
}
|
|
58
43
|
|
|
59
44
|
.p-chip__value {
|
|
60
45
|
@extend %small-text;
|
|
61
|
-
|
|
62
|
-
line-height: $chip-line-height;
|
|
63
|
-
padding-top: 0.05rem;
|
|
64
46
|
}
|
|
65
47
|
|
|
66
48
|
.p-chip__dismiss {
|
|
@@ -71,24 +53,84 @@
|
|
|
71
53
|
$button-hover-border-color: transparent
|
|
72
54
|
);
|
|
73
55
|
|
|
56
|
+
align-self: center;
|
|
74
57
|
border: none;
|
|
75
|
-
display: block;
|
|
76
58
|
flex: 0 0 auto;
|
|
77
|
-
|
|
78
|
-
line-height:
|
|
59
|
+
height: $default-icon-size;
|
|
60
|
+
line-height: $default-icon-size;
|
|
79
61
|
margin-bottom: 0;
|
|
80
|
-
margin-
|
|
62
|
+
margin-left: $sph--x-small;
|
|
63
|
+
margin-top: 0; // override top margin that button gets in some contexts (in paragraphs)
|
|
81
64
|
padding: 0;
|
|
82
65
|
position: relative;
|
|
83
|
-
|
|
66
|
+
width: $default-icon-size;
|
|
67
|
+
}
|
|
84
68
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
69
|
+
&.is-dense {
|
|
70
|
+
padding: 0 $sph--small;
|
|
71
|
+
}
|
|
88
72
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
73
|
+
&.is-inline {
|
|
74
|
+
margin-bottom: 0;
|
|
75
|
+
margin-top: 0;
|
|
76
|
+
vertical-align: baseline;
|
|
92
77
|
}
|
|
93
78
|
}
|
|
79
|
+
|
|
80
|
+
@include vf-chip-default;
|
|
81
|
+
@include vf-chip-positive;
|
|
82
|
+
@include vf-chip-caution;
|
|
83
|
+
@include vf-chip-negative;
|
|
84
|
+
@include vf-chip-information;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
@mixin vf-chip-default {
|
|
88
|
+
.p-chip {
|
|
89
|
+
@extend %vf-chip;
|
|
90
|
+
@include vf-chip-type(default);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@mixin vf-chip-positive {
|
|
95
|
+
.p-chip--positive {
|
|
96
|
+
@extend %vf-chip;
|
|
97
|
+
@include vf-chip-type(positive);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@mixin vf-chip-caution {
|
|
102
|
+
.p-chip--caution {
|
|
103
|
+
@extend %vf-chip;
|
|
104
|
+
@include vf-chip-type(caution);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@mixin vf-chip-negative {
|
|
109
|
+
.p-chip--negative {
|
|
110
|
+
@extend %vf-chip;
|
|
111
|
+
@include vf-chip-type(negative);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@mixin vf-chip-information {
|
|
116
|
+
.p-chip--information {
|
|
117
|
+
@extend %vf-chip;
|
|
118
|
+
@include vf-chip-type(information);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
@mixin vf-chip-type($type: neutral) {
|
|
123
|
+
$color-background: null;
|
|
124
|
+
$color-border: null;
|
|
125
|
+
|
|
126
|
+
@if (map-has-key($colors-light-theme--tinted-backgrounds, $type)) {
|
|
127
|
+
$color-background: map-get($colors-light-theme--tinted-backgrounds, $type);
|
|
128
|
+
$color-border: map-get($colors-light-theme--tinted-borders, $type);
|
|
129
|
+
} @else {
|
|
130
|
+
$color-background: map-get($colors-light-theme--tinted-backgrounds, neutral);
|
|
131
|
+
$color-border: map-get($colors-light-theme--tinted-borders, neutral);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
background-color: $color-background;
|
|
135
|
+
border: 1px solid $color-border;
|
|
94
136
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
@import 'settings';
|
|
2
2
|
|
|
3
3
|
$color-snippet-heading-bg: rgba($color-x-dark, 0.08);
|
|
4
|
-
$code-snippet-header-v-spacing: $spv
|
|
4
|
+
$code-snippet-header-v-spacing: $spv--small;
|
|
5
5
|
|
|
6
6
|
@mixin vf-p-code-snippet {
|
|
7
7
|
.p-code-snippet {
|
|
8
|
-
margin-bottom: $spv-
|
|
8
|
+
margin-bottom: $spv--x-large;
|
|
9
9
|
|
|
10
10
|
&.is-bordered {
|
|
11
11
|
border: 1px solid $colors--light-theme--border-low-contrast;
|
|
@@ -24,7 +24,7 @@ $code-snippet-header-v-spacing: $spv-inner--small;
|
|
|
24
24
|
.p-code-snippet__block--icon {
|
|
25
25
|
@extend %leading-linux-prompt-icon;
|
|
26
26
|
|
|
27
|
-
padding-left: #{$sph
|
|
27
|
+
padding-left: #{$sph--large + map-get($icon-sizes, default) + $sph--small};
|
|
28
28
|
position: relative;
|
|
29
29
|
|
|
30
30
|
&.is-windows-prompt::before {
|
|
@@ -51,8 +51,8 @@ $code-snippet-header-v-spacing: $spv-inner--small;
|
|
|
51
51
|
background-color: $color-code-heading-background;
|
|
52
52
|
display: flex;
|
|
53
53
|
justify-content: space-between;
|
|
54
|
-
padding-left: $sph
|
|
55
|
-
padding-right: $sph
|
|
54
|
+
padding-left: $sph--large;
|
|
55
|
+
padding-right: $sph--large;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
.p-code-snippet__title {
|
|
@@ -71,10 +71,10 @@ $code-snippet-header-v-spacing: $spv-inner--small;
|
|
|
71
71
|
border: 0;
|
|
72
72
|
color: $color-dark;
|
|
73
73
|
margin-bottom: 0;
|
|
74
|
-
margin-left: $sph
|
|
74
|
+
margin-left: $sph--small;
|
|
75
75
|
min-width: min-content;
|
|
76
76
|
padding-bottom: $code-snippet-header-v-spacing;
|
|
77
|
-
padding-left: $sph
|
|
77
|
+
padding-left: $sph--large;
|
|
78
78
|
padding-top: $code-snippet-header-v-spacing;
|
|
79
79
|
width: min-content;
|
|
80
80
|
}
|
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
.p-divider {
|
|
5
5
|
@extend %vf-row;
|
|
6
6
|
|
|
7
|
-
margin-bottom: $spv-
|
|
7
|
+
margin-bottom: $spv--x-large;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
.p-divider__block {
|
|
11
11
|
position: relative;
|
|
12
12
|
|
|
13
|
-
@media (max-width: $threshold-6-12-col) {
|
|
14
|
-
padding-bottom: $spv
|
|
15
|
-
padding-top: $spv
|
|
13
|
+
@media (max-width: $threshold-6-12-col - 1) {
|
|
14
|
+
padding-bottom: $spv--large;
|
|
15
|
+
padding-top: $spv--large;
|
|
16
16
|
|
|
17
17
|
&:not(:first-child)::before {
|
|
18
18
|
content: '';
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
@extend %small-text;
|
|
6
6
|
|
|
7
7
|
color: $color-mid-dark;
|
|
8
|
-
margin-top:
|
|
8
|
+
margin-top: -$sp-unit;
|
|
9
9
|
|
|
10
10
|
&.is-tick-element {
|
|
11
|
-
margin-left: $sph
|
|
11
|
+
margin-left: $sph--large + $form-tick-box-size;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -1,6 +1,126 @@
|
|
|
1
1
|
@import 'settings';
|
|
2
2
|
|
|
3
3
|
@mixin vf-p-form-tick-elements {
|
|
4
|
+
%vf-hidden-tick-input {
|
|
5
|
+
float: none;
|
|
6
|
+
height: $form-tick-box-size;
|
|
7
|
+
margin: 0;
|
|
8
|
+
opacity: 0;
|
|
9
|
+
position: absolute;
|
|
10
|
+
width: $form-tick-box-size;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
%vf-pseudo-tick-box {
|
|
14
|
+
padding-left: $sph--large + $form-tick-box-size;
|
|
15
|
+
position: relative;
|
|
16
|
+
|
|
17
|
+
&::before,
|
|
18
|
+
&::after {
|
|
19
|
+
$properties: #{background-color, border-color};
|
|
20
|
+
@include vf-animation($properties);
|
|
21
|
+
|
|
22
|
+
position: absolute;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// container
|
|
26
|
+
&::before {
|
|
27
|
+
content: '';
|
|
28
|
+
height: $form-tick-box-size;
|
|
29
|
+
left: 0;
|
|
30
|
+
outline-offset: 1px;
|
|
31
|
+
top: calc(#{$baseline-position} - #{$form-tick-box-size} + #{$form-tick-box-nudge});
|
|
32
|
+
width: $form-tick-box-size;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// tick/circle
|
|
36
|
+
&::after {
|
|
37
|
+
content: '';
|
|
38
|
+
opacity: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.p-muted-heading & {
|
|
42
|
+
color: $colors--light-theme--text-muted;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
%vf-pseudo-tick-box-checked {
|
|
47
|
+
&::before {
|
|
48
|
+
background-color: $color-link;
|
|
49
|
+
border-color: $color-link;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&::after {
|
|
53
|
+
opacity: 1;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
%vf-pseudo-tick-box-focused {
|
|
58
|
+
&::before {
|
|
59
|
+
outline: $bar-thickness solid $color-focus;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
%vf-pseudo-checkbox {
|
|
64
|
+
// container
|
|
65
|
+
&::before {
|
|
66
|
+
border-radius: $border-radius;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
//tick
|
|
70
|
+
&::after {
|
|
71
|
+
border-bottom: 2px solid;
|
|
72
|
+
border-left: 2px solid;
|
|
73
|
+
height: $form-tick-height;
|
|
74
|
+
left: $form-tick-height * 0.5;
|
|
75
|
+
top: calc(#{$baseline-position} - #{$form-tick-box-size} + #{$form-tick-offset-top} + #{$form-tick-box-nudge});
|
|
76
|
+
transform: rotate(-45deg);
|
|
77
|
+
width: 0.625rem;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
[aria-checked='mixed'] + &,
|
|
81
|
+
:indeterminate + & {
|
|
82
|
+
@extend %vf-pseudo-tick-box-checked;
|
|
83
|
+
|
|
84
|
+
&::after {
|
|
85
|
+
border-left: none;
|
|
86
|
+
transform: none;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
%vf-pseudo-radio {
|
|
92
|
+
&::before {
|
|
93
|
+
border-radius: 50%;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&::after {
|
|
97
|
+
border-radius: 50%;
|
|
98
|
+
height: $form-radio-inner-circle-diameter;
|
|
99
|
+
left: #{($form-tick-box-size - $form-radio-inner-circle-diameter) * 0.5};
|
|
100
|
+
top: calc(#{$baseline-position} - #{$form-tick-box-size} + #{$form-radio-circle-offset} + #{$form-tick-box-nudge});
|
|
101
|
+
width: $form-radio-inner-circle-diameter;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.p-radio__label {
|
|
106
|
+
@extend %vf-pseudo-tick-box;
|
|
107
|
+
@extend %vf-pseudo-radio;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.p-checkbox__label {
|
|
111
|
+
@extend %vf-pseudo-tick-box;
|
|
112
|
+
@extend %vf-pseudo-checkbox;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// nudge ticks in headings back to the baseline
|
|
116
|
+
.p-checkbox--heading .p-checkbox__label,
|
|
117
|
+
.p-radio--heading .p-radio__label {
|
|
118
|
+
&::before,
|
|
119
|
+
&::after {
|
|
120
|
+
margin-top: -$form-tick-box-nudge;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
4
124
|
// contain the absolutely positioned input
|
|
5
125
|
.p-checkbox,
|
|
6
126
|
.p-checkbox--heading,
|
|
@@ -15,13 +135,13 @@
|
|
|
15
135
|
&.is-required {
|
|
16
136
|
&::before {
|
|
17
137
|
display: block;
|
|
18
|
-
left: $sph
|
|
138
|
+
left: $sph--large + $form-tick-box-size;
|
|
19
139
|
position: absolute;
|
|
20
140
|
width: $asterisk-width;
|
|
21
141
|
}
|
|
22
142
|
.p-radio__label,
|
|
23
143
|
.p-checkbox__label {
|
|
24
|
-
padding-left: calc(#{$sph
|
|
144
|
+
padding-left: calc(#{$sph--large + $form-tick-box-size} + #{$asterisk-width});
|
|
25
145
|
}
|
|
26
146
|
}
|
|
27
147
|
}
|
|
@@ -29,35 +149,25 @@
|
|
|
29
149
|
// Fix label alignment when text drops to new line
|
|
30
150
|
.p-checkbox,
|
|
31
151
|
.p-radio {
|
|
32
|
-
|
|
33
|
-
|
|
152
|
+
display: block;
|
|
153
|
+
padding-left: $sph--large + $form-tick-box-size;
|
|
154
|
+
text-indent: -1 * ($sph--large + $form-tick-box-size);
|
|
34
155
|
|
|
35
156
|
&.is-required {
|
|
36
157
|
&::before {
|
|
37
|
-
left: $sph
|
|
158
|
+
left: $sph--large + $form-tick-box-size + $sph--large + $form-tick-box-size;
|
|
38
159
|
}
|
|
39
160
|
}
|
|
40
161
|
}
|
|
41
162
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
[type='radio'].p-radio__input {
|
|
163
|
+
.p-checkbox__input,
|
|
164
|
+
.p-radio__input {
|
|
45
165
|
@extend %vf-hidden-tick-input;
|
|
46
166
|
|
|
47
167
|
// adjust position of hidden inputs to place them approximately on the baseline
|
|
48
168
|
bottom: 0.2em;
|
|
49
169
|
}
|
|
50
170
|
|
|
51
|
-
.p-checkbox__label {
|
|
52
|
-
@extend %vf-pseudo-tick-box;
|
|
53
|
-
@extend %vf-pseudo-checkbox;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.p-radio__label {
|
|
57
|
-
@extend %vf-pseudo-tick-box;
|
|
58
|
-
@extend %vf-pseudo-radio;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
171
|
// inline variants
|
|
62
172
|
.p-checkbox--heading,
|
|
63
173
|
.p-checkbox--inline,
|
|
@@ -66,15 +176,6 @@
|
|
|
66
176
|
display: inline;
|
|
67
177
|
}
|
|
68
178
|
|
|
69
|
-
// nudge ticks in headings back to the baseline
|
|
70
|
-
.p-checkbox--heading .p-checkbox__label,
|
|
71
|
-
.p-radio--heading .p-radio__label {
|
|
72
|
-
&::before,
|
|
73
|
-
&::after {
|
|
74
|
-
margin-top: -$form-tick-box-nudge;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
179
|
// fake tick checked state
|
|
79
180
|
.p-checkbox__input:checked + .p-checkbox__label,
|
|
80
181
|
.p-radio__input:checked + .p-radio__label {
|
|
@@ -137,3 +238,92 @@
|
|
|
137
238
|
}
|
|
138
239
|
}
|
|
139
240
|
}
|
|
241
|
+
|
|
242
|
+
// theme for common properties on radios and checkboxes
|
|
243
|
+
@mixin vf-tick-elements-theme(
|
|
244
|
+
// color of the tick element label text
|
|
245
|
+
$color-tick-text,
|
|
246
|
+
// color of the tick element background
|
|
247
|
+
$color-tick-background,
|
|
248
|
+
// color of the tick element border
|
|
249
|
+
$color-tick-border: $colors--light-theme--border-high-contrast
|
|
250
|
+
) {
|
|
251
|
+
color: $color-tick-text;
|
|
252
|
+
|
|
253
|
+
&::before {
|
|
254
|
+
background: $color-tick-background;
|
|
255
|
+
border: 1px solid $color-tick-border;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
// theme for checkbox (including common properties)
|
|
260
|
+
@mixin vf-checkbox-theme(
|
|
261
|
+
// color of the tick element label text
|
|
262
|
+
$color-tick-text,
|
|
263
|
+
// color of the tick element background
|
|
264
|
+
$color-tick-background,
|
|
265
|
+
// color of the tick element border
|
|
266
|
+
$color-tick-border,
|
|
267
|
+
// color of the checkbox tick
|
|
268
|
+
$color-checkbox-tick
|
|
269
|
+
) {
|
|
270
|
+
@include vf-tick-elements-theme($color-tick-text, $color-tick-background, $color-tick-border);
|
|
271
|
+
|
|
272
|
+
&::after {
|
|
273
|
+
color: $color-checkbox-tick;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
@mixin vf-checkbox-light-theme {
|
|
278
|
+
@include vf-checkbox-theme(
|
|
279
|
+
$color-tick-text: $colors--light-theme--text-default,
|
|
280
|
+
$color-tick-background: $colors--light-theme--background-default,
|
|
281
|
+
$color-tick-border: $colors--light-theme--border-high-contrast,
|
|
282
|
+
$color-checkbox-tick: $colors--light-theme--background-default
|
|
283
|
+
);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
@mixin vf-checkbox-dark-theme {
|
|
287
|
+
@include vf-checkbox-theme(
|
|
288
|
+
$color-tick-text: $colors--dark-theme--text-default,
|
|
289
|
+
$color-tick-background: $colors--dark-theme--background-default,
|
|
290
|
+
$color-tick-border: $colors--dark-theme--border-high-contrast,
|
|
291
|
+
$color-checkbox-tick: $colors--dark-theme--text-default
|
|
292
|
+
);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
// theme for radio (including common properties)
|
|
296
|
+
@mixin vf-radio-theme(
|
|
297
|
+
// color of the tick element label text
|
|
298
|
+
$color-tick-text,
|
|
299
|
+
// color of the tick element background
|
|
300
|
+
$color-tick-background,
|
|
301
|
+
// color of the tick element border
|
|
302
|
+
$color-tick-border,
|
|
303
|
+
// color of the radio dot
|
|
304
|
+
$color-radio-dot
|
|
305
|
+
) {
|
|
306
|
+
@include vf-tick-elements-theme($color-tick-text, $color-tick-background, $color-tick-border);
|
|
307
|
+
|
|
308
|
+
&::after {
|
|
309
|
+
background-color: $color-radio-dot;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
@mixin vf-radio-light-theme {
|
|
314
|
+
@include vf-radio-theme(
|
|
315
|
+
$color-tick-text: $colors--light-theme--text-default,
|
|
316
|
+
$color-tick-background: $colors--light-theme--background-default,
|
|
317
|
+
$color-tick-border: $colors--light-theme--border-high-contrast,
|
|
318
|
+
$color-radio-dot: $colors--light-theme--background-default
|
|
319
|
+
);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
@mixin vf-radio-dark-theme {
|
|
323
|
+
@include vf-radio-theme(
|
|
324
|
+
$color-tick-text: $colors--dark-theme--text-default,
|
|
325
|
+
$color-tick-background: $colors--dark-theme--background-default,
|
|
326
|
+
$color-tick-border: $colors--dark-theme--border-high-contrast,
|
|
327
|
+
$color-radio-dot: $colors--dark-theme--text-default
|
|
328
|
+
);
|
|
329
|
+
}
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
%vf-validation-wrapper {
|
|
8
8
|
background-position: left, center;
|
|
9
9
|
background-repeat: no-repeat;
|
|
10
|
-
padding-left: calc(#{$icon-size} + #{$sph
|
|
10
|
+
padding-left: calc(#{$icon-size} + #{$sph--small});
|
|
11
11
|
padding-top: 0;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
.p-form-validation__message {
|
|
15
15
|
@extend %small-text;
|
|
16
16
|
|
|
17
|
-
margin-top:
|
|
17
|
+
margin-top: -$sp-unit;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.is-success {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// We should avoid targetting form element types
|
|
9
9
|
// stylelint-disable-next-line selector-max-type
|
|
10
10
|
form + [class*='p-button'] {
|
|
11
|
-
margin-top: $spv-
|
|
11
|
+
margin-top: $spv--x-large;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
width: 100%;
|
|
18
18
|
|
|
19
19
|
.p-form__group {
|
|
20
|
-
@media (min-width: $
|
|
20
|
+
@media (min-width: $threshold-6-12-col) {
|
|
21
21
|
align-items: baseline;
|
|
22
22
|
|
|
23
23
|
+ .p-form__group {
|
|
24
|
-
margin-top: $spv
|
|
24
|
+
margin-top: $spv--small;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -30,19 +30,19 @@
|
|
|
30
30
|
|
|
31
31
|
@mixin vf-p-forms-inline {
|
|
32
32
|
.p-form--inline {
|
|
33
|
-
@media (min-width: $
|
|
33
|
+
@media (min-width: $threshold-6-12-col) {
|
|
34
34
|
align-items: baseline;
|
|
35
35
|
display: inline-flex;
|
|
36
36
|
flex-direction: row;
|
|
37
37
|
flex-wrap: wrap;
|
|
38
38
|
|
|
39
39
|
> * {
|
|
40
|
-
margin-right: $sph-
|
|
40
|
+
margin-right: $sph--x-large;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
.p-form__group {
|
|
45
|
-
@media (min-width: $
|
|
45
|
+
@media (min-width: $threshold-6-12-col) {
|
|
46
46
|
display: flex;
|
|
47
47
|
flex-shrink: 1;
|
|
48
48
|
width: auto;
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
|
|
61
61
|
.p-form__label {
|
|
62
62
|
flex-shrink: 0;
|
|
63
|
-
padding-right: $sph
|
|
63
|
+
padding-right: $sph--large;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
.p-form__control {
|