aboutsummaryrefslogtreecommitdiff
path: root/src/components/checkbox/checkbox.vue
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2024-02-07 15:53:49 +0200
committerHenry Jameson <me@hjkos.com>2024-02-07 15:53:49 +0200
commitd2a74ea1a2965eb38609bb8029a41b45beab89ce (patch)
tree47881b435bc3f2c83d031ee5ca34492bd19551a7 /src/components/checkbox/checkbox.vue
parentc34590c43983711152a843a2e36b991a5fe3bcdf (diff)
add .input class to all inputs
Diffstat (limited to 'src/components/checkbox/checkbox.vue')
-rw-r--r--src/components/checkbox/checkbox.vue25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/components/checkbox/checkbox.vue b/src/components/checkbox/checkbox.vue
index b8b77e7c..9739c08b 100644
--- a/src/components/checkbox/checkbox.vue
+++ b/src/components/checkbox/checkbox.vue
@@ -12,7 +12,7 @@
@change="$emit('update:modelValue', $event.target.checked)"
>
<i
- class="checkbox-indicator"
+ class="input checkbox-indicator"
:aria-hidden="true"
@transitionend.capture="onTransitionEnd"
/>
@@ -62,9 +62,15 @@ export default {
display: inline-block;
min-height: 1.2em;
- &-indicator {
+ & > &-indicator {
+ /* Reset .input stuff */
+ padding: 0;
+ margin: 0;
position: relative;
+ line-height: inherit;
+ display: inline;
padding-left: 1.2em;
+ box-shadow: none;
}
&-indicator::before {
@@ -78,10 +84,8 @@ export default {
height: 1.1em;
border-radius: $fallback--checkboxRadius;
border-radius: var(--checkboxRadius, $fallback--checkboxRadius);
- box-shadow: 0 0 2px black inset;
- box-shadow: var(--inputShadow);
- background-color: $fallback--fg;
- background-color: var(--input, $fallback--fg);
+ box-shadow: var(--shadow);
+ background-color: var(--background);
vertical-align: top;
text-align: center;
line-height: 1.1em;
@@ -98,21 +102,18 @@ export default {
}
.label {
- color: $fallback--faint;
- color: var(--faint, $fallback--faint);
+ color: var(--text);
}
}
input[type="checkbox"] {
&:checked + .checkbox-indicator::before {
- color: $fallback--text;
- color: var(--inputText, $fallback--text);
+ color: var(--text);
}
&:indeterminate + .checkbox-indicator::before {
content: "–";
- color: $fallback--text;
- color: var(--inputText, $fallback--text);
+ color: var(--text);
}
}