@c8y/style 1024.15.1 → 1024.15.13
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/package.json +1 -1
- package/styles/base/_scaffolding.scss +2 -8
- package/styles/components/data-display-and-visualization/lists/_c8y-list-group.scss +11 -4
- package/styles/core/forms/_forms.scss +8 -1
- package/styles/mixins/_index.scss +1 -0
- package/styles/mixins/_visually-hidden.scss +18 -0
- package/variables/dashboard-themes/_branded-dashboard.scss +3 -2
package/package.json
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
@use "../mixins/image";
|
|
4
4
|
@use "../mixins/tab-focus";
|
|
5
5
|
@use "../mixins/vendor-prefixes";
|
|
6
|
+
@use "../mixins/visually-hidden";
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Scaffolding - Base HTML element styles
|
|
@@ -129,14 +130,7 @@ hr {
|
|
|
129
130
|
// See: http://a11yproject.com/posts/how-to-hide-content/
|
|
130
131
|
.sr-only,
|
|
131
132
|
.cdk-visually-hidden {
|
|
132
|
-
|
|
133
|
-
overflow: hidden;
|
|
134
|
-
clip: rect(0, 0, 0, 0);
|
|
135
|
-
margin: -1px;
|
|
136
|
-
padding: 0;
|
|
137
|
-
width: 1px;
|
|
138
|
-
height: 1px;
|
|
139
|
-
border: 0;
|
|
133
|
+
@include visually-hidden.visually-hidden($positionImportant: true);
|
|
140
134
|
}
|
|
141
135
|
|
|
142
136
|
// Use in conjunction with .sr-only to only display content when it's focused.
|
|
@@ -127,14 +127,21 @@
|
|
|
127
127
|
* $Carlos: There are items that are not selectable that
|
|
128
128
|
* don't get that class. E.g. the "No results found" item.
|
|
129
129
|
**/
|
|
130
|
-
&.selectable:hover:not(.active)
|
|
130
|
+
&.selectable:hover:not(.active) {
|
|
131
131
|
background-color: $component-background-hover;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
+
/**
|
|
135
|
+
* Item the user moved to with the keyboard. The hover background alone is
|
|
136
|
+
* not distinguishable enough, so it also gets the focus ring.
|
|
137
|
+
**/
|
|
138
|
+
&.highlighted {
|
|
139
|
+
background-color: $component-background-hover;
|
|
140
|
+
@include tab-focus.c8y-focus-inset();
|
|
141
|
+
}
|
|
142
|
+
|
|
134
143
|
&:focus {
|
|
135
|
-
|
|
136
|
-
outline-offset: -2px;
|
|
137
|
-
border-radius: $component-border-radius-focus !important;
|
|
144
|
+
@include tab-focus.c8y-focus-inset();
|
|
138
145
|
}
|
|
139
146
|
}
|
|
140
147
|
&.empty-actions{
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
@use "../../mixins/forms";
|
|
7
7
|
@use "../../mixins/grid";
|
|
8
8
|
@use "../../mixins/icon-base";
|
|
9
|
+
@use "../../mixins/visually-hidden";
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* Forms - Form controls, inputs, labels, and validation
|
|
@@ -931,7 +932,13 @@ c8y-field-input ~ .help-block:not(:empty),
|
|
|
931
932
|
pointer-events: none;
|
|
932
933
|
}
|
|
933
934
|
|
|
934
|
-
//
|
|
935
|
+
// Hides the labels while keeping them available to screen readers.
|
|
936
|
+
&.hidden-labels {
|
|
937
|
+
.form-group > label {
|
|
938
|
+
@include visually-hidden.visually-hidden;
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
|
|
935
942
|
.form-group {
|
|
936
943
|
margin: 0;
|
|
937
944
|
label {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Hide an element visually while keeping it available to screen readers.
|
|
2
|
+
// Backs the `.sr-only` utility and the `.form-read-only.hidden-labels` modifier.
|
|
3
|
+
//
|
|
4
|
+
// Source: http://a11yproject.com/posts/how-to-hide-content/
|
|
5
|
+
|
|
6
|
+
// $positionImportant - marks `position` as `!important`, needed by the
|
|
7
|
+
// `.sr-only` utility so it wins over the positioning of whatever it is
|
|
8
|
+
// applied to.
|
|
9
|
+
@mixin visually-hidden($positionImportant: false) {
|
|
10
|
+
position: absolute#{if($positionImportant, " !important", "")};
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
clip: rect(0, 0, 0, 0);
|
|
13
|
+
margin: -1px;
|
|
14
|
+
padding: 0;
|
|
15
|
+
width: 1px;
|
|
16
|
+
height: 1px;
|
|
17
|
+
border: 0;
|
|
18
|
+
}
|
|
@@ -94,9 +94,10 @@ body.c8y-dark-theme {
|
|
|
94
94
|
--c8y-btn-primary-color-default: var(--c8y-palette-gray-100);
|
|
95
95
|
--c8y-btn-primary-color-focus: var(--c8y-palette-high);
|
|
96
96
|
--c8y-btn-primary-color-hover: var(--c8y-palette-high);
|
|
97
|
-
|
|
97
|
+
/* Same code styling as the dark dashboard theme */
|
|
98
|
+
--c8y-code-background: var(--c8y-palette-blue-80);
|
|
98
99
|
--c8y-code-border-color: transparent;
|
|
99
|
-
--c8y-code-color: var(--c8y-palette-
|
|
100
|
+
--c8y-code-color: var(--c8y-palette-blue-30);
|
|
100
101
|
--c8y-dropdown-background-default: var(--c8y-brand-20);
|
|
101
102
|
--c8y-elevation-border: none;
|
|
102
103
|
/* For App switchers, Overflow menus, Tooltips */
|