beercss 3.0.8 → 3.1.1

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.
@@ -1,4 +1,4 @@
1
- /* checkbox, radio and switch */
1
+ /* checkbox, radio, switch */
2
2
  .checkbox,
3
3
  .radio,
4
4
  .switch {
@@ -11,31 +11,31 @@
11
11
  align-items: center;
12
12
  }
13
13
 
14
- .checkbox > input,
15
- .radio > input {
14
+ :is(.checkbox, .radio) > input {
16
15
  width: 1.5rem;
17
16
  height: 1.5rem;
18
17
  opacity: 0;
19
18
  }
20
19
 
21
- .checkbox > span,
22
- .radio > span,
23
- .switch > span {
20
+ .switch > input {
21
+ width: 3.25rem;
22
+ height: 2rem;
23
+ opacity: 0;
24
+ }
25
+
26
+ :is(.checkbox, .radio, .switch) > span {
24
27
  display: inline-flex;
25
28
  align-items: center;
26
29
  color: var(--on-background);
27
30
  font-size: 0.875rem;
28
31
  }
29
32
 
30
- .checkbox > span:not(:empty),
31
- .radio > span:not(:empty) {
33
+ :is(.checkbox, .radio) > span:not(:empty) {
32
34
  padding-left: 0.25rem;
33
35
  }
34
36
 
35
- .checkbox > input + span::before,
36
- .radio > input + span::before,
37
- .switch > input + span:empty::after,
38
- .switch > input + span > i {
37
+ :is(.checkbox, .radio, .switch) > span::before,
38
+ .icon > span > i {
39
39
  font-family: "Material Symbols Outlined";
40
40
  font-weight: normal;
41
41
  font-style: normal;
@@ -62,140 +62,126 @@
62
62
  left: -1.5rem;
63
63
  background-color: transparent;
64
64
  border-radius: 50%;
65
+ user-select: none;
66
+ z-index: 1;
67
+ box-shadow: 0 0 0 0 var(--active);
68
+ transition: var(--speed1) all;
65
69
  }
66
70
 
67
- .checkbox > input + span::before {
68
- content: "check_box_outline_blank";
71
+ .switch > span::before,
72
+ .switch.icon > span > i {
73
+ position: absolute;
74
+ left: 0;
75
+ top: 50%;
76
+ display: inline-flex;
77
+ align-items: center;
78
+ justify-content: center;
79
+ border-radius: 50%;
80
+ transition: var(--speed2) all;
81
+ font-size: 1rem;
82
+ user-select: none;
83
+ min-width: auto;
84
+ content: "";
85
+ color: var(--surface-variant);
86
+ background-color: var(--outline);
87
+ transform: translate(-3rem, -50%) scale(0.6);
69
88
  }
70
89
 
71
- .radio > input + span::before {
72
- content: "radio_button_unchecked";
90
+ .switch.icon > span > i {
91
+ transform: translate(-3rem, -50%) scale(1);
73
92
  }
74
93
 
75
- .checkbox > input:not([disabled]):focus + span::before,
76
- .checkbox > input:not([disabled]):hover + span::before,
77
- .radio > input:not([disabled]):focus + span::before,
78
- .radio > input:not([disabled]):hover + span::before {
79
- background-color: var(--active);
80
- box-shadow: 0 0 0 0.5rem var(--active);
81
- animation: var(--speed1) to-checked ease-out;
94
+ .checkbox > span::before {
95
+ content: "check_box_outline_blank";
96
+ }
97
+
98
+ .radio > span::before {
99
+ content: "radio_button_unchecked";
82
100
  }
83
101
 
84
102
  .checkbox > input:checked + span::before {
85
- color: var(--primary);
86
103
  content: "check_box";
87
104
  font-variation-settings: "FILL" 1;
88
105
  }
89
106
 
90
107
  .radio > input:checked + span::before {
91
- color: var(--primary);
92
108
  content: "radio_button_checked";
93
109
  }
94
110
 
95
- .checkbox + .checkbox,
96
- .radio + .radio,
97
- .switch + .switch {
98
- margin-left: 0.5rem;
111
+ :is(.radio, .checkbox, .switch).icon > span::before {
112
+ content: "" !important;
113
+ font-variation-settings: unset !important;
99
114
  }
100
115
 
101
- .switch > input {
102
- width: 3.25rem;
103
- height: 2rem;
116
+ :is(.checkbox, .radio) > input:is(:focus, :hover) + span::before {
117
+ background-color: var(--active);
118
+ box-shadow: 0 0 0 0.5rem var(--active);
119
+ }
120
+
121
+ .switch > input:is(:focus, :hover) + span::before,
122
+ .switch.icon > input:is(:focus, :hover) + span > i {
123
+ box-shadow: 0 0 0 0.5rem var(--active);
124
+ }
125
+
126
+ :is(.checkbox, .radio) > input:checked + span::before,
127
+ :is(.checkbox, .radio).icon > input:checked + span > i {
128
+ color: var(--primary);
129
+ }
130
+
131
+ .icon > input:checked + span > i:first-child,
132
+ .icon > span > i:last-child {
104
133
  opacity: 0;
105
134
  }
106
135
 
107
- .switch > input + span::before {
108
- content: "";
109
- position: absolute;
110
- left: 0;
111
- top: 50%;
112
- background-color: var(--active);
113
- border: 0.125rem solid var(--outline);
114
- box-sizing: border-box;
115
- width: 3.25rem;
116
- height: 2rem;
117
- border-radius: 2rem;
118
- transform: translate(-3.25rem, -50%);
136
+ .icon > input:checked + span > i:last-child,
137
+ .icon > span > i:first-child {
138
+ opacity: 1;
119
139
  }
120
140
 
121
- .switch > input:checked + span::before {
141
+ .switch > input:checked + span::after {
122
142
  border: none;
123
143
  background-color: var(--primary);
124
144
  }
125
145
 
126
- .switch > input + span:empty::after,
127
- .switch > input + span > i {
128
- position: absolute;
129
- left: 0;
130
- top: 50%;
131
- display: inline-flex;
132
- align-items: center;
133
- justify-content: center;
134
- border-radius: 50%;
135
- transition: var(--speed2) all;
136
- font-size: 1rem;
137
- user-select: none;
138
- min-width: auto;
139
- content: "";
140
- color: var(--surface-variant);
141
- background-color: var(--outline);
142
- transform: translate(-3rem, -50%) scale(0.6);
143
- }
144
-
145
- .switch > input:checked + span:empty::after,
146
- .switch > input:checked + span > i {
146
+ .switch > input:checked + span::before,
147
+ .switch.icon > input:checked + span > i {
147
148
  content: "check";
148
149
  color: var(--primary);
149
150
  background-color: var(--on-primary);
150
151
  transform: translate(-1.75rem, -50%) scale(1);
151
152
  }
152
153
 
153
- .switch > input + span > i {
154
- transform: translate(-3rem, -50%) scale(1);
155
- }
156
-
157
- .switch > input + span > i:last-child,
158
- .switch > input:checked + span > i:first-child {
159
- opacity: 0;
160
- }
161
-
162
- .switch > input:checked + span > i:last-child,
163
- .switch > input + span > i:first-child {
164
- opacity: 1;
154
+ :is(.checkbox, .radio, .switch) > input:disabled + span {
155
+ opacity: 0.5;
156
+ cursor: not-allowed;
165
157
  }
166
158
 
167
- .switch > input:not([disabled]):focus + span:empty::after,
168
- .switch > input:not([disabled]):hover + span:empty::after,
169
- .switch > input:not([disabled]):focus + span > i,
170
- .switch > input:not([disabled]):hover + span > i {
171
- box-shadow: 0 0 0 0.5rem var(--active);
159
+ .checkbox + .checkbox,
160
+ .radio + .radio,
161
+ .switch + .switch {
162
+ margin-left: 0.5rem;
172
163
  }
173
164
 
174
- .checkbox > input:disabled + span,
175
- .radio > input:disabled + span,
176
- .switch > input:disabled + span {
177
- opacity: 0.5;
178
- cursor: not-allowed;
165
+ .switch > span::after {
166
+ content: "";
167
+ position: absolute;
168
+ left: 0;
169
+ top: 50%;
170
+ background-color: var(--active);
171
+ border: 0.125rem solid var(--outline);
172
+ box-sizing: border-box;
173
+ width: 3.25rem;
174
+ height: 2rem;
175
+ border-radius: 2rem;
176
+ transform: translate(-3.25rem, -50%);
179
177
  }
180
178
 
181
- .field > nav,
182
- .field > .row {
179
+ .field > :is(nav, .row) {
183
180
  flex-grow: 1;
184
181
  padding: 0 1rem;
185
182
  }
186
183
 
187
- .field.round > nav,
188
- .field.round > .row {
184
+ .field.round > :is(nav, .row) {
189
185
  flex-grow: 1;
190
186
  padding: 0 1.5rem;
191
187
  }
192
-
193
- @keyframes to-checked {
194
- from {
195
- box-shadow: 0 0 0 0 var(--active);
196
- }
197
-
198
- to {
199
- box-shadow: 0 0 0 0.5rem var(--active);
200
- }
201
- }
@@ -0,0 +1,124 @@
1
+ .slider {
2
+ display: flex;
3
+ align-items: center !important;
4
+ width: auto;
5
+ margin: 1.125rem;
6
+ flex: auto;
7
+ }
8
+
9
+ .slider.small {
10
+ width: 4rem;
11
+ flex: none;
12
+ }
13
+
14
+ .slider.medium {
15
+ width: 8rem;
16
+ flex: none;
17
+ }
18
+
19
+ .slider.large {
20
+ width: 12rem;
21
+ flex: none;
22
+ }
23
+
24
+ .slider.vertical {
25
+ margin: 0.5rem auto !important;
26
+ padding: 50% 0;
27
+ transform: rotate(-90deg);
28
+ }
29
+
30
+ .slider > input {
31
+ appearance: none;
32
+ box-shadow: none;
33
+ border: none;
34
+ outline: none;
35
+ pointer-events: none;
36
+ width: 100%;
37
+ height: 0.25rem;
38
+ border-radius: 1rem;
39
+ background: var(--active);
40
+ z-index: 1;
41
+ padding: 0;
42
+ margin: 0;
43
+ }
44
+
45
+ .slider > input:focus ~ .tooltip {
46
+ visibility: visible;
47
+ }
48
+
49
+ .slider > input:only-of-type {
50
+ cursor: pointer;
51
+ pointer-events: all;
52
+ }
53
+
54
+ .slider > input + input {
55
+ position: absolute;
56
+ }
57
+
58
+ .slider > input::-webkit-slider-thumb {
59
+ appearance: none;
60
+ box-shadow: none;
61
+ border: none;
62
+ outline: none;
63
+ pointer-events: all;
64
+ height: 1.25rem;
65
+ width: 1.25rem;
66
+ border-radius: 50%;
67
+ background: var(--primary);
68
+ transition: var(--speed1) all ease-out;
69
+ cursor: pointer;
70
+ }
71
+
72
+ .slider > input::-moz-range-thumb {
73
+ appearance: none;
74
+ box-shadow: none;
75
+ border: none;
76
+ outline: none;
77
+ pointer-events: all;
78
+ height: 1.25rem;
79
+ width: 1.25rem;
80
+ border-radius: 50%;
81
+ background: var(--primary);
82
+ transition: var(--speed1) all ease-out;
83
+ cursor: pointer;
84
+ }
85
+
86
+ .slider > input:not(:disabled):is(:focus, :hover)::-webkit-slider-thumb {
87
+ box-shadow: 0 0 0 0.625rem var(--active);
88
+ }
89
+
90
+ .slider > input:not(:disabled):is(:focus, :hover)::-moz-range-thumb {
91
+ box-shadow: 0 0 0 0.625rem var(--active);
92
+ }
93
+
94
+ .slider > input:disabled {
95
+ cursor: not-allowed;
96
+ opacity: 1;
97
+ }
98
+
99
+ .slider > input:disabled::-webkit-slider-thumb {
100
+ background: #9E9E9E;
101
+ cursor: not-allowed;
102
+ }
103
+
104
+ .slider > input:disabled::-moz-range-thumb {
105
+ background: #9E9E9E;
106
+ cursor: not-allowed;
107
+ }
108
+
109
+ .slider > input:disabled + span {
110
+ background: #9E9E9E;
111
+ }
112
+
113
+ .slider > span {
114
+ position: absolute;
115
+ top: calc(50% - 0.1875rem);
116
+ height: 0.375rem;
117
+ border-radius: 1rem;
118
+ background: var(--primary);
119
+ z-index: 0;
120
+ }
121
+
122
+ .field > .slider {
123
+ width: 100%;
124
+ }
@@ -7,8 +7,7 @@ table {
7
7
  border-radius: 0;
8
8
  }
9
9
 
10
- table td,
11
- table th {
10
+ table :is(th, td) {
12
11
  width: 1%;
13
12
  text-align: inherit;
14
13
  padding: 0.5rem;
@@ -18,42 +17,30 @@ table th {
18
17
  font-weight: 500;
19
18
  }
20
19
 
21
- table.border td,
22
- table.border th {
20
+ table.border :is(th, td) {
23
21
  border-bottom: 0.0625rem solid var(--outline);
24
22
  }
25
23
 
26
- table.no-space td,
27
- table.no-space th {
24
+ table.no-space :is(th, td) {
28
25
  padding: 0;
29
26
  }
30
27
 
31
- table.medium-space td,
32
- table.medium-space th {
28
+ table.medium-space :is(th, td) {
33
29
  padding: 0.75rem;
34
30
  }
35
31
 
36
- table.large-space td,
37
- table.large-space th {
32
+ table.large-space :is(th, td) {
38
33
  padding: 1rem;
39
34
  }
40
35
 
41
- td > .button,
42
- td > nav > .button,
43
- td > button,
44
- td > nav > button,
45
- td > .none,
46
- td > nav > .none,
47
- td > .chip,
48
- td > nav > .chip {
36
+ td > :is(.button, button, .none, .chip),
37
+ td > nav > :is(.button, button, .none, .chip) {
49
38
  min-height: 1.5rem;
50
39
  max-height: 1.5rem;
51
40
  }
52
41
 
53
- td > .circle:not(.tiny, .small, .medium, .large, .extra),
54
- td > nav > .circle:not(.tiny, .small, .medium, .large, .extra),
55
- td > .square:not(.tiny, .small, .medium, .large, .extra),
56
- td > nav > .square:not(.tiny, .small, .medium, .large, .extra) {
42
+ td > :is(.circle, .square):not(.tiny, .small, .medium, .large, .extra),
43
+ td > nav > :is(.circle, .square):not(.tiny, .small, .medium, .large, .extra) {
57
44
  min-width: 1.5rem;
58
45
  max-width: 1.5rem;
59
46
  min-height: 1.5rem;
@@ -57,8 +57,6 @@
57
57
  color: var(--primary);
58
58
  }
59
59
 
60
- .tabs.left-align > a,
61
- .tabs.center-align > a,
62
- .tabs.right-align > a {
60
+ .tabs:is(.left-align, .center-align .right-align) > a {
63
61
  width: auto;
64
62
  }
@@ -1,5 +1,11 @@
1
1
  .tooltip {
2
- display: none;
2
+ ---space: 0;
3
+
4
+ visibility: hidden;
5
+ display: flex;
6
+ align-items: center;
7
+ justify-content: center;
8
+ gap: 0.5rem;
3
9
  background-color: rgb(0 0 0 / 0.9);
4
10
  color: #FFF;
5
11
  font-size: 0.75rem;
@@ -12,10 +18,12 @@
12
18
  left: 50%;
13
19
  bottom: auto;
14
20
  right: auto;
15
- transform: translate(-50%, -100%);
21
+ transform: translate(-50%, -100%) scale(0.9);
16
22
  width: auto;
17
23
  white-space: nowrap;
18
24
  font-weight: 500;
25
+ opacity: 0;
26
+ transition: var(--speed2) all;
19
27
  }
20
28
 
21
29
  .tooltip.left {
@@ -23,7 +31,7 @@
23
31
  top: 50%;
24
32
  bottom: auto;
25
33
  right: auto;
26
- transform: translate(-100%, -50%);
34
+ transform: translate(-100%, -50%) scale(0.9);
27
35
  }
28
36
 
29
37
  .tooltip.right {
@@ -31,15 +39,7 @@
31
39
  top: 50%;
32
40
  bottom: auto;
33
41
  left: auto;
34
- transform: translate(100%, -50%);
35
- }
36
-
37
- .tooltip.top {
38
- top: 0;
39
- left: 50%;
40
- bottom: auto;
41
- right: auto;
42
- transform: translate(-50%, -100%);
42
+ transform: translate(100%, -50%) scale(0.9);
43
43
  }
44
44
 
45
45
  .tooltip.bottom {
@@ -47,7 +47,7 @@
47
47
  left: 50%;
48
48
  top: auto;
49
49
  right: auto;
50
- transform: translate(-50%, 100%);
50
+ transform: translate(-50%, 100%) scale(0.9);
51
51
  }
52
52
 
53
53
  .tooltip.small {
@@ -65,15 +65,87 @@
65
65
  white-space: normal;
66
66
  }
67
67
 
68
- *:hover > .tooltip {
69
- display: flex;
70
- align-items: center;
71
- gap: 0.5rem;
68
+ :hover > .tooltip {
69
+ visibility: visible;
70
+ opacity: 1;
71
+ transform: translate(-50%, -100%) scale(1);
72
+ }
73
+
74
+ :hover > .tooltip.left {
75
+ transform: translate(-100%, -50%) scale(1);
76
+ }
77
+
78
+ :hover > .tooltip.right {
79
+ transform: translate(100%, -50%) scale(1);
80
+ }
81
+
82
+ :hover > .tooltip.bottom {
83
+ transform: translate(-50%, 100%) scale(1);
84
+ }
85
+
86
+ .tooltip.small-space,
87
+ .tooltip.space {
88
+ ---space: -0.5rem;
89
+ }
90
+
91
+ .tooltip.medium-space {
92
+ ---space: -1rem;
93
+ }
94
+
95
+ .tooltip.large-space {
96
+ ---space: -1.5rem;
97
+ }
98
+
99
+ .tooltip:not(.left, .right, .bottom) {
100
+ margin-top: var(---space) !important;
101
+ }
102
+
103
+ .tooltip.left {
104
+ margin-left: var(---space) !important;
105
+ }
106
+
107
+ .tooltip.right {
108
+ margin-right: var(---space) !important;
109
+ }
110
+
111
+ .tooltip.bottom {
112
+ margin-bottom: var(---space) !important;
72
113
  }
73
114
 
74
115
  .dropdown:active ~ .tooltip,
75
- button:focus > .dropdown ~ .tooltip,
76
- .button:focus > .dropdown ~ .tooltip,
116
+ :is(button, .button):focus > .dropdown ~ .tooltip,
77
117
  .field > :focus ~ .dropdown ~ .tooltip {
78
- display: none;
118
+ visibility: hidden;
119
+ }
120
+
121
+ .vertical > .tooltip:not(.left, .right, .bottom) {
122
+ top: calc(50% + var(---space));
123
+ transform: translate(-50%, -100%) scale(1) rotate(90deg);
124
+ }
125
+
126
+ .vertical > .tooltip.left {
127
+ left: var(---space);
128
+ transform: translate(-100%, -50%) scale(1) rotate(90deg);
129
+ }
130
+
131
+ .vertical > .tooltip.right {
132
+ right: var(---space);
133
+ transform: translate(100%, -50%) scale(1) rotate(90deg);
134
+ }
135
+
136
+ .vertical > .tooltip.bottom {
137
+ bottom: calc(50% + var(---space));
138
+ transform: translate(-50%, 100%) scale(1) rotate(90deg);
139
+ }
140
+
141
+ .slider > .tooltip {
142
+ ---space: -1.25rem;
143
+ }
144
+
145
+ .slider.vertical > .tooltip {
146
+ ---space: -0.75rem;
147
+ }
148
+
149
+ .slider.vertical > .tooltip:is(.left, .right) {
150
+ ---space: -0.5rem;
79
151
  }
@@ -0,0 +1,21 @@
1
+ :is(.blur, .small-blur, .medium-blur, .large-blur),
2
+ :is(.blur, .small-blur, .medium-blur, .large-blur).light {
3
+ ---blur: 1rem;
4
+ -webkit-backdrop-filter: blur(var(---blur));
5
+ backdrop-filter: blur(var(---blur));
6
+ color: var(--on-background);
7
+ background-color: rgb(255 255 255 / 0.5);
8
+ }
9
+
10
+ .dark :is(.blur, .small-blur, .medium-blur, .large-blur),
11
+ :is(.blur, .small-blur, .medium-blur, .large-blur).dark {
12
+ background-color: rgb(0 0 0 / 0.5);
13
+ }
14
+
15
+ .small-blur {
16
+ ---blur: 0.5rem;
17
+ }
18
+
19
+ .large-blur {
20
+ ---blur: 1.5rem;
21
+ }
@@ -12,9 +12,7 @@
12
12
  }
13
13
 
14
14
  .vertical,
15
- button.vertical,
16
- .button.vertical,
17
- .chip.vertical {
15
+ .vertical:is(button, .button, .chip) {
18
16
  display: inline-flex;
19
17
  flex-direction: column !important;
20
18
  gap: 0.25rem;
@@ -1,4 +1,4 @@
1
- .round:not(img, video) {
1
+ .round:not(i, img, video, svg) {
2
2
  border-radius: 2rem !important;
3
3
  }
4
4
 
@@ -38,38 +38,40 @@
38
38
  border-radius: 0 2rem 2rem !important;
39
39
  }
40
40
 
41
- .circle:not(img, video),
42
- .square:not(img, video) {
41
+ .circle {
42
+ border-radius: 50%;
43
+ }
44
+
45
+ :is(button, .button, .chip).circle {
46
+ border-radius: 2.5rem;
47
+ }
48
+
49
+ :is(.circle, .square):not(i, img, video, svg) {
43
50
  height: 2.5rem;
44
51
  width: 2.5rem;
45
52
  padding: 0;
46
53
  }
47
54
 
48
- .circle > span,
49
- .square > span {
55
+ :is(.circle, .square) > span {
50
56
  display: none;
51
57
  }
52
58
 
53
- .square.small:not(img, video),
54
- .circle.small:not(img, video) {
59
+ :is(.circle, .square).small:not(i, img, video, svg) {
55
60
  height: 2rem;
56
61
  width: 2rem;
57
62
  }
58
63
 
59
- .square.large:not(img, video),
60
- .circle.large:not(img, video) {
64
+ :is(.circle, .square).large:not(i, img, video, svg) {
61
65
  height: 3rem;
62
66
  width: 3rem;
63
67
  }
64
68
 
65
- .square.extra:not(img, video),
66
- .circle.extra:not(img, video) {
69
+ :is(.circle, .square).extra:not(i, img, video, svg) {
67
70
  height: 3.5rem;
68
71
  width: 3.5rem;
69
72
  }
70
73
 
71
- .square.round,
72
- .circle.round {
74
+ :is(.circle, .square).round {
73
75
  border-radius: 1rem !important;
74
76
  }
75
77