/* The rich text editor, made workable.
 *
 * Trix renders into a contenteditable with a fixed min-height, so a lesson or a
 * note body was written through a slot a few lines deep with everything above
 * scrolled out of sight. An author cannot see the shape of what they are writing
 * — which for a note body *is* the content, because its lines are its layout.
 *
 * resize is the browser's own handle, which is why this is CSS rather than a
 * drag implementation: a textarea has had one for twenty years and people know
 * what the corner grip means. `resize` needs a non-visible overflow to work at
 * all, hence the pair.
 *
 * Loaded through UNFOLD["STYLES"]; Unfold has no other seam for admin CSS, and
 * its own build is compiled and frozen.
 *
 * The selector carries [input] to out-specify Trix's own `trix-editor` rule,
 * which sets min-height: 5em. UNFOLD["STYLES"] renders in <head> and the
 * widget's Media CSS comes after it, so on equal specificity theirs wins by
 * load order — and the editor stayed five lines tall with the resize handle on
 * it, which looks like the fix working and is not. Every Trix editor carries
 * `input`, so this still means "all of them".
 */
trix-editor[input] {
  min-height: 18rem;
  max-height: 80vh;
  overflow-y: auto;
  resize: vertical;
}

/* The toolbar scrolls rather than wrapping into the writing area on a narrow
   window, so the editor's top edge does not move as buttons re-flow. */
trix-toolbar {
  overflow-x: auto;
}
