discourse/app/assets/stylesheets/common/admin/schema_field.scss
Alan Guo Xiang Tan 86b2e3aa3e
DEV: Change tag type to tags type for theme object schema (#26315)
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
2024-03-22 15:32:00 +08:00

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);
}
}
}