/*
 * Empty rich text cells in the "Table with formatting" block clip their
 * placeholder.
 *
 * Stock Wagtail behaviour, not something this project introduced.
 * wagtailadmin/css/panels/draftail.css sets:
 *
 *     .DraftEditor-editorContainer,.DraftEditor-root,.public-DraftEditor-content
 *         { height: inherit }
 *     .Draftail-Editor .DraftEditor-root
 *         { overflow: auto }
 *
 * In a full-width panel the placeholder ("Write something or type '/' to
 * insert a block") fits on one line. Inside a typed table cell, which
 * typed_table_block.css caps at min-width: 20rem, it wraps to two lines.
 *
 * Why a min-height rather than height: auto alone -- Draft.js renders the
 * placeholder as an *absolutely positioned* element, so it contributes zero
 * content height. An auto height therefore sizes the box for a single empty
 * line while the placeholder needs two; relaxing overflow only converts the
 * clipping into overflow, which looks identical on screen. A floor of 5.5rem
 * reserves room for both lines.
 *
 * min-height is a floor, not a cap: cells with several paragraphs still grow,
 * because height stays auto.
 *
 * Measured in the browser with this rule applied: client height 88px, scroll
 * height 88px, zero overflow, both placeholder lines inside the box.
 *
 * Every selector is scoped under .typed-table-block, so Draftail elsewhere in
 * the admin is untouched. Specificity (0,3,0) beats both stock rules without
 * !important.
 */
.typed-table-block .Draftail-Editor .DraftEditor-root,
.typed-table-block .Draftail-Editor .DraftEditor-editorContainer,
.typed-table-block .Draftail-Editor .public-DraftEditor-content {
    height: auto;
    min-height: 5.5rem;
}

/*
 * Retained from the earlier attempt: inert now that nothing overflows, but it
 * is the configuration that was measured, so it stays rather than being
 * "tidied" on untested reasoning.
 */
.typed-table-block .Draftail-Editor .DraftEditor-root {
    overflow: visible;
}
