aboutsummaryrefslogtreecommitdiff
path: root/src/components/select/select.vue
diff options
context:
space:
mode:
authorHJ <30-hj@users.noreply.git.pleroma.social>2024-10-03 19:44:24 +0000
committerHJ <30-hj@users.noreply.git.pleroma.social>2024-10-03 19:44:24 +0000
commita1c3a7a742ea86b0ddeb67a42ca27f478f0f22a2 (patch)
tree82540411b3afbcc66545e2419eee7ec5dbae7f93 /src/components/select/select.vue
parent56a3bff267203017a704652117167569be0cd58a (diff)
parent05ab57a8e68033b520e6038afaa6514423f0d117 (diff)
Merge branch 'shadow-control-2.0' into 'develop'
Fixed and refined the shadow control in theme tab See merge request pleroma/pleroma-fe!1939
Diffstat (limited to 'src/components/select/select.vue')
-rw-r--r--src/components/select/select.vue35
1 files changed, 34 insertions, 1 deletions
diff --git a/src/components/select/select.vue b/src/components/select/select.vue
index 32832126..0fb6fcc0 100644
--- a/src/components/select/select.vue
+++ b/src/components/select/select.vue
@@ -6,13 +6,14 @@
<select
:disabled="disabled"
:value="modelValue"
- v-bind="attrs"
+ v-bind="$attrs"
@change="$emit('update:modelValue', $event.target.value)"
>
<slot />
</select>
{{ ' ' }}
<FAIcon
+ v-if="!$attrs.size && !$attrs.multiple"
class="select-down-icon"
icon="chevron-down"
/>
@@ -39,6 +40,38 @@ label.Select {
z-index: 1;
height: 2em;
line-height: 16px;
+
+ &[multiple],
+ &[size] {
+ height: 100%;
+ padding: 0.2em;
+
+ option {
+ background-color: transparent;
+
+ &.-active {
+ color: var(--selectionText);
+ background-color: var(--selectionBackground);
+ }
+ }
+ }
+ }
+
+ &.disabled,
+ &:disabled {
+ background-color: var(--background);
+ opacity: 1; /* override browser */
+ color: var(--faint);
+
+ select {
+ &[multiple],
+ &[size] {
+ option.-active {
+ color: var(--faint);
+ background: transparent;
+ }
+ }
+ }
}
.select-down-icon {