mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-06-19 05:59:26 +08:00
There were some minor regressions to the expanding textarea after it was adjusted in an earlier commit... this adds a new css variable to adjust padding as needed, fixes some `@value` references and adjusts specific styles on the /tags page. Also added a modifier class to the child textarea so it can more easily be separated from normal textareas. before: <img width="700" alt="image" src="https://github.com/user-attachments/assets/c7cb28ce-a626-49e2-90d1-7bbee166b79b" /> after: <img width="700" alt="image" src="https://github.com/user-attachments/assets/0393c9ba-9ea9-43f1-87ba-5c34076cd1c1" />
37 lines
960 B
SCSS
Vendored
37 lines
960 B
SCSS
Vendored
.expanding-text-area {
|
|
width: 100%;
|
|
min-width: 0;
|
|
|
|
> textarea {
|
|
field-sizing: content;
|
|
height: auto;
|
|
resize: none;
|
|
max-width: 100%;
|
|
padding: var(--expanding-text-area-padding, 0.5em 0.65em);
|
|
min-height: var(--expanding-text-area-min-height, auto);
|
|
max-height: var(--expanding-text-area-max-height, none);
|
|
}
|
|
|
|
@supports not (field-sizing: content) {
|
|
display: grid;
|
|
grid-template-columns: minmax(0, 1fr);
|
|
|
|
> textarea {
|
|
grid-area: 1 / 1;
|
|
}
|
|
|
|
&::after {
|
|
content: attr(data-replicated-value) " ";
|
|
white-space: pre-wrap;
|
|
word-break: break-word;
|
|
visibility: hidden;
|
|
grid-area: 1 / 1;
|
|
box-sizing: border-box;
|
|
padding: var(--expanding-text-area-padding, 0.5em 0.65em);
|
|
border: 1px solid transparent;
|
|
font: inherit;
|
|
min-height: var(--expanding-text-area-min-height, auto);
|
|
max-height: var(--expanding-text-area-max-height, none);
|
|
}
|
|
}
|
|
}
|