mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-23 06:30:50 +08:00
This commit takes the dragging behaviour of the grippie
element (the blue bar) at the top of the composer and makes
it into an ember Modifier for use in more places.
The first usage is to add a grippie resizer to the bottom of AceEditor
to followup f819b1ec4d, since
the `@resizable` option allows the user to vertically resize
the code editor.
Custom composer-related behaviour is now done via callbacks from
the modifier. The .grippie CSS class has been hoisted so the style
applies everywhere, then AceEditor modifies the appearance to blend
a bit better.
---------
Co-authored-by: chapoi <101828855+chapoi@users.noreply.github.com>
39 lines
657 B
SCSS
Vendored
39 lines
657 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;
|
|
|
|
.form-kit__field.has-error & {
|
|
border-color: var(--danger);
|
|
}
|
|
}
|