discourse/app/assets/stylesheets/common/form-kit/_control-code.scss
Martin Brennan f819b1ec4d
FEATURE: Add option to make <AceEditor /> resizable (#33044)
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.
2025-06-03 15:22:48 +10:00

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