mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 10:13:45 +08:00
86b2e3aa3e
Why this change? While working on the tag selector for the theme object editor, I realised that there is an extremely high possibility that users might want to select more than one tag. By supporting the ability to select more than one tag, it also means that we get support for a single tag for free as well. What does this change do? 1. Change `type: tag` to `type: tags` and support `min` and `max` validations for `type: tags`. 2. Fix the `<SchemaThemeSetting::Types::Tags>` component to support the `min` and `max` validations
67 lines
1.1 KiB
SCSS
67 lines
1.1 KiB
SCSS
.schema-field {
|
|
margin-bottom: 1em;
|
|
width: 50%;
|
|
min-width: 200px;
|
|
display: grid;
|
|
grid-template-columns: 25% 1fr;
|
|
gap: 1em;
|
|
|
|
.schema-field__label {
|
|
word-break: break-all;
|
|
}
|
|
|
|
.schema-field__input:has(input[type="checkbox"]) {
|
|
flex-direction: row;
|
|
}
|
|
|
|
.schema-field__input {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
|
|
input {
|
|
width: 100%;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
input[type="checkbox"] {
|
|
width: auto;
|
|
}
|
|
|
|
.select-kit {
|
|
width: 100%;
|
|
|
|
&.--invalid {
|
|
summary {
|
|
border-color: var(--danger);
|
|
}
|
|
}
|
|
}
|
|
|
|
.schema-field__input-description {
|
|
font-size: var(--font-down-1);
|
|
color: var(--primary-medium);
|
|
}
|
|
}
|
|
|
|
.schema-field__input-supporting-text {
|
|
display: flex;
|
|
flex-direction: row;
|
|
margin-top: 0.2em;
|
|
|
|
.schema-field__input-count {
|
|
margin-left: auto;
|
|
font-size: var(--font-down-1);
|
|
|
|
&.--error {
|
|
color: var(--danger);
|
|
}
|
|
}
|
|
|
|
.schema-field__input-error {
|
|
font-size: var(--font-down-1);
|
|
color: var(--danger);
|
|
}
|
|
}
|
|
}
|