platform/packages/theme/styles/editors.scss
Alexander Platov 23a3c8e94f
Cleaning the Editbox (#5012)
Signed-off-by: Alexander Platov <alexander.platov@hardcoreeng.com>
Signed-off-by: Alex Velichko <alex@hardcoreeng.com>
Co-authored-by: Alex Velichko <alex@hardcoreeng.com>
2024-03-19 22:38:32 +07:00

143 lines
3.3 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;
input {
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: ''; }
}
input {
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;
input {
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;
input {
font: inherit;
&::placeholder {
color: var(--input-PlaceholderColor);
}
}
&:hover input:not(:focus)::placeholder {
color: var(--input-hover-PlaceholderColor);
}
input:focus::placeholder {
color: var(--input-focus-PlaceholderColor);
}
&.disabled {
box-shadow: inset 0 0 0 1px var(--input-BorderColor);
&,
input {
cursor: not-allowed;
}
input::placeholder {
color: var(--input-PlaceholderColor);
}
}
}
.required::after {
content: ' *';
color: var(--theme-error-color);
}
}