Skip to content

Commit d3cf857

Browse files
authored
Freeform: Move modal styles to the correct file (#50858)
1 parent 7f540d8 commit d3cf857

File tree

3 files changed

+45
-45
lines changed

3 files changed

+45
-45
lines changed

packages/block-library/src/freeform/editor.scss

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,3 +374,48 @@ div[data-type="core/freeform"] {
374374
display: block;
375375
}
376376
}
377+
378+
.block-editor-freeform-modal {
379+
.components-modal__frame {
380+
// On large screens, make the TinyMCE edit area grow to take all the
381+
// available height so that the Cancel/Save buttons are always into the
382+
// view. On smaller screens, the modal content is scrollable.
383+
@include break-large() {
384+
// On medium and large screens, the modal component sets a max-height.
385+
// We want the modal to be as tall as possible also when the content is short.
386+
height: 9999rem;
387+
388+
.components-modal__header + div {
389+
height: 100%;
390+
}
391+
392+
.mce-tinymce {
393+
height: calc(100% - #{$button-size} - #{$grid-unit-20});
394+
}
395+
396+
.mce-container-body {
397+
height: 100%;
398+
display: flex;
399+
flex-direction: column;
400+
}
401+
402+
.mce-edit-area {
403+
flex-grow: 1;
404+
display: flex;
405+
flex-direction: column;
406+
407+
iframe {
408+
flex-grow: 1;
409+
// Override the height TinyMCE sets via JavaScript so that it
410+
// can shrink to a smaller height. The actual height is
411+
// determined by Flexbox.
412+
height: 10px !important;
413+
}
414+
}
415+
}
416+
}
417+
418+
&__actions {
419+
margin-top: $grid-unit-20;
420+
}
421+
}

packages/block-library/src/freeform/style.scss

Lines changed: 0 additions & 44 deletions
This file was deleted.

packages/block-library/src/style.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
@import "./details/style.scss";
1515
@import "./embed/style.scss";
1616
@import "./file/style.scss";
17-
@import "./freeform/style.scss";
1817
@import "./gallery/style.scss";
1918
@import "./group/style.scss";
2019
@import "./heading/style.scss";

0 commit comments

Comments
 (0)