platform/packages/theme/styles/editors.scss
Victor Ilyushchenko 8b47263a10
Minor improvements for survey module (#8066)
* Minor improvements for survey module

Signed-off-by: Victor Ilyushchenko <alt13ri@gmail.com>

* ff

Signed-off-by: Victor Ilyushchenko <alt13ri@gmail.com>

---------

Signed-off-by: Victor Ilyushchenko <alt13ri@gmail.com>
2025-02-21 13:33:03 +03:00

166 lines
3.8 KiB
SCSS

.antiEditBox {
display: inline-flex;
flex-direction: column;
align-items: flex-start;
min-width: 0;
.large-style {
font-weight: 400;
font-size: 1.25rem;
}
.small-style {
font-weight: 400;
font-size: 0.75rem;
}
.search-style {
font-weight: 400;
padding: 0.625rem 0.75rem;
}
.underline {
font-weight: 500;
.antiEditBoxInput {
padding: 0.25rem 0.5rem;
background-color: var(--theme-editbox-focus-color);
border-radius: 0.25rem;
&:focus { box-shadow: 0 0 0 1px var(--theme-editbox-focus-border); }
}
}
.focusable:not(.underline, .default, .default-large, .ghost, .ghost-large, .modern-ghost-large) {
position: relative;
padding: 0.625rem 0;
&::after {
position: absolute;
top: 0;
left: -0.75rem;
width: calc(100% + 1.5rem);
height: 100%;
border: 1px solid var(--theme-editbox-focus-border);
border-radius: 0.25rem;
}
&:focus-within::after { content: ''; }
}
.antiEditBoxInput {
margin: 0;
padding: 0;
min-width: 0;
color: var(--theme-caption-color);
border: none;
border-radius: 2px;
&::-webkit-contacts-auto-fill-button,
&::-webkit-credentials-auto-fill-button {
visibility: hidden;
display: none !important;
pointer-events: none;
height: 0;
width: 0;
margin: 0;
}
&.number::-webkit-outer-spin-button,
&.number::-webkit-inner-spin-button { -webkit-appearance: none; }
}
input[type='number'] { -moz-appearance: textfield; }
&.uppercase .hidden-text,
&.uppercase input { text-transform: uppercase; }
.default, .ghost {
font-weight: 400;
font-size: .8125rem;
}
.default-large, .ghost-large {
font-weight: 500;
font-size: 1rem;
}
.default, .ghost { padding: 0.3125rem 0.5rem; }
.default-large, .ghost-large { padding: 0.4375rem 0.5rem; }
.ghost-large {
color: var(--theme-caption-color);
}
.default, .ghost, .default-large, .ghost-large {
box-sizing: border-box;
line-height: 1.25rem;
border-radius: .375rem;
border: 1px solid transparent;
.antiEditBoxInput {
color: inherit;
&::placeholder { color: var(--theme-darker-color); }
}
&:hover { background-color: var(--theme-button-hovered); }
&.focusable:focus-within {
background-color: var(--theme-button-focused);
border-color: var(--primary-button-default);
}
&.disabled {
color: var(--theme-dark-color);
background-color: transparent;
border-color: var(--theme-divider-color);
}
}
.default, .default-large { border-color: var(--theme-divider-color); }
.modern-ghost-large {
padding: var(--spacing-1) var(--spacing-2);
height: var(--spacing-6);
font-weight: 500;
font-size: 1.5rem;
.antiEditBoxInput {
font: inherit;
&::placeholder {
color: var(--input-PlaceholderColor);
}
}
&:hover input:not(:focus)::placeholder {
color: var(--input-hover-PlaceholderColor);
}
.antiEditBoxInput:focus::placeholder {
color: var(--input-focus-PlaceholderColor);
}
&.disabled {
box-shadow: inset 0 0 0 1px var(--input-BorderColor);
&,
.antiEditBoxInput {
cursor: not-allowed;
}
.antiEditBoxInput::placeholder {
color: var(--input-PlaceholderColor);
}
}
}
.required::after {
content: ' *';
color: var(--theme-error-color);
}
.antiEditBoxGridWrapper {
display: grid;
&::after {
content: attr(data-value) " ";
white-space: pre-wrap;
visibility: hidden;
z-index: -1;
}
textarea {
resize: none;
}
&::after, textarea {
font: inherit;
outline: none;
background-color: transparent;
overflow: hidden;
grid-area: 1 / 1 / 2 / 2;
min-height: 1.25rem;
}
}
}