mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-26 21:18:34 +08:00
This commit adds a `@resizable` argument to `<AceEditor />` and sets it to true always for the FormKit code control. This allows the user to vertically resize the editor inside FormKit forms. Horizontal resizing is not allowed at this time, it's more unpredictable for layout, and the vertical resizing is mostly what's needed anyway. Also changes the FormKit code control to use min-height of 250px so the inline style height takes precedence, before it was a hardcoded !important height.
41 lines
744 B
SCSS
Vendored
41 lines
744 B
SCSS
Vendored
.form-kit__field-code {
|
|
.ace-wrapper {
|
|
width: 100%;
|
|
|
|
> .loading-container {
|
|
width: 100%;
|
|
}
|
|
}
|
|
|
|
.ace-wrapper[data-disabled="true"] {
|
|
opacity: 0.5;
|
|
|
|
.ace_scroller {
|
|
cursor: not-allowed !important;
|
|
}
|
|
}
|
|
|
|
.ace-wrapper[data-disabled="false"] {
|
|
.ace_focus {
|
|
outline: 2px solid var(--tertiary);
|
|
outline-offset: -1px;
|
|
|
|
@include default-input {
|
|
height: unset;
|
|
border-color: var(--tertiary);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.form-kit__control-code {
|
|
min-height: 250px !important;
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
border: 1px solid var(--primary-400);
|
|
border-radius: var(--d-input-border-radius);
|
|
|
|
.form-kit__field.has-error & {
|
|
border-color: var(--danger);
|
|
}
|
|
}
|