@geoffcox/sterling-svelte-themes 2.0.14 → 2.0.15

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 CHANGED
@@ -22,6 +22,11 @@ https://github.com/GeoffCox/sterling-svelte-themes
22
22
 
23
23
  ## Change Log
24
24
 
25
+ ### 2.0.15
26
+
27
+ - Fixed issue with checkbox and radio button styles to ensure hidden input
28
+ fills button area and can be clicked.
29
+
25
30
  ### 2.0.13/2.0.14
26
31
 
27
32
  - Removed spurious min-width on slider
@@ -1,21 +1,45 @@
1
1
  .sterling-checkbox.button {
2
- display: grid;
3
- grid-template-columns: 1fr;
4
- grid-template-rows: 1fr;
2
+ align-content: center;
3
+ align-items: center;
4
+ appearance: none;
5
+ background-color: transparent;
6
+ border-color: transparent;
7
+ border-style: solid;
8
+ border-width: var(--stsv-button__border-width);
9
+ box-sizing: border-box;
10
+ color: var(--stsv-button__color);
11
+ cursor: pointer;
12
+ display: inline-flex;
13
+ flex-direction: row;
14
+ font: inherit;
5
15
  justify-content: center;
6
16
  justify-items: center;
7
- border: 1px solid transparent;
17
+ column-gap: 0.25em;
18
+ overflow: hidden;
19
+ padding: 0.5em 1em;
20
+ /* position:relative contains the input since container is removed from layout */
21
+ position: relative;
22
+ text-decoration: none;
23
+ text-overflow: ellipsis;
24
+ transition:
25
+ background-color 250ms,
26
+ color 250ms,
27
+ border-color 250ms;
28
+ white-space: nowrap;
29
+ user-select: none;
8
30
  }
9
31
 
10
32
  .sterling-checkbox.button:not(.disabled):hover {
11
33
  background-color: var(--stsv-button__background-color--hover);
34
+ border-color: transparent;
12
35
  }
13
36
 
14
- .sterling-checkbox.button:not(.disabled):not(.checked):active {
37
+ .sterling-checkbox.button:not(.checked):not(.disabled):active {
15
38
  background-color: var(--stsv-button__background-color--active);
39
+ border-color: transparent;
16
40
  }
17
41
 
18
- .sterling-checkbox.button:not(.disabled).checked {
42
+ .sterling-checkbox.button.checked:not(.disabled) {
19
43
  background-color: var(--stsv-input__background-color--selected);
20
44
  }
21
45
 
@@ -26,17 +50,9 @@
26
50
  outline-width: 2px;
27
51
  }
28
52
 
29
- .sterling-checkbox.button .container,
30
- .sterling-radio.button label {
31
- grid-row: 1 / span 1;
32
- grid-column: 1 / span 1;
33
- }
34
-
53
+ /* Remove the container from layout */
35
54
  .sterling-checkbox.button .container {
36
- display: block;
37
- justify-self: stretch;
38
- align-self: stretch;
39
- margin-right: unset;
55
+ display: contents;
40
56
  }
41
57
 
42
58
  .sterling-checkbox.button input {
@@ -56,8 +72,21 @@
56
72
  display: none;
57
73
  }
58
74
 
59
- .sterling-checkbox.button.disabled {
60
- background-color: var(--stsv-input__background-color--disabled);
75
+ .sterling-checkbox.button.disabled,
76
+ .sterling-checkbox.button.disabled:hover,
77
+ .sterling-checkbox.button.disabled:active,
78
+ .sterling-checkbox.button.disabled:focus-visible {
79
+ cursor: not-allowed;
80
+ background-color: var(--stsv-button__background-color--disabled);
81
+ border-color: var(--stsv-button__border-color--disabled);
82
+ color: var(--stsv-button__color--disabled);
83
+ }
84
+
85
+ .sterling-checkbox.button.checked.disabled,
86
+ .sterling-checkbox.button.checked.disabled:hover,
87
+ .sterling-checkbox.button.checked.disabled:active,
88
+ .sterling-checkbox.button.checked.disabled:focus-visible {
89
+ background-color: var(--stsv-input__background-color--selected);
61
90
  }
62
91
 
63
92
  .sterling-checkbox.button.disabled label {
@@ -5,6 +5,8 @@
5
5
  justify-content: center;
6
6
  justify-items: center;
7
7
  border: 1px solid transparent;
8
+ /* position:relative contains the input since container is removed from layout */
9
+ position: relative;
8
10
  }
9
11
 
10
12
  .sterling-radio.button:not(.disabled):hover {
@@ -12,35 +14,23 @@
12
14
  }
13
15
 
14
16
  .sterling-radio.button:not(.disabled):not(.checked):active {
15
- background-color: var(--stsv-button__background-color--active);
16
- }
17
-
18
- .sterling-radio.button:not(.disabled).checked {
19
- background-color: var(--stsv-input__background-color--selected);
20
- }
21
-
22
- .sterling-radio.button.using-keyboard:focus-within {
23
- outline-color: var(--stsv-common__outline-color);
24
- outline-offset: 0;
25
- outline-style: solid;
26
- outline-width: 2px;
27
- }
17
+ background-color: var(--stsv-button__background-color--active);
18
+ }
28
19
 
29
- .sterling-radio.button .container,
30
- .sterling-radio.button label {
31
- grid-row: 1 / span 1;
32
- grid-column: 1 / span 1;
20
+ .sterling-radio.button:not(.disabled).checked {
21
+ background-color: var(--stsv-input__background-color--selected);
33
22
  }
34
23
 
35
- .sterling-radio.button .container {
36
- display: block;
37
- justify-self: stretch;
38
- align-self: stretch;
39
- margin-right: unset;
24
+ .sterling-radio.button.using-keyboard:focus-within {
25
+ outline-color: var(--stsv-common__outline-color);
26
+ outline-offset: 0;
27
+ outline-style: solid;
28
+ outline-width: 2px;
40
29
  }
41
30
 
42
- .sterling-radio.button label {
43
- display: block;
31
+ /* Remove the container from layout */
32
+ .sterling-radio.button .container {
33
+ display: contents;
44
34
  }
45
35
 
46
36
  .sterling-radio.button input {
@@ -52,11 +42,14 @@
52
42
  height: unset;
53
43
  }
54
44
 
45
+ .sterling-radio.button label {
46
+ display: block;
47
+ }
48
+
55
49
  .sterling-radio.button .indicator {
56
50
  display: none;
57
51
  }
58
52
 
59
-
60
53
  .sterling-radio.button.disabled {
61
54
  background-color: var(--stsv-input__background-color--disabled);
62
55
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geoffcox/sterling-svelte-themes",
3
- "version": "2.0.14",
3
+ "version": "2.0.15",
4
4
  "author": "Geoff Cox",
5
5
  "description": "A modern theme for the sterling-svelte component library.",
6
6
  "license": "MIT",