Skip to content

Document visual-editor customization vars for editable-element redesign#676

Merged
formfcw merged 2 commits into
florian/twelve-ui-updatesfrom
florian/twelve-ui-visual-editing-customization
May 15, 2026
Merged

Document visual-editor customization vars for editable-element redesign#676
formfcw merged 2 commits into
florian/twelve-ui-updatesfrom
florian/twelve-ui-visual-editing-customization

Conversation

@formfcw
Copy link
Copy Markdown
Contributor

@formfcw formfcw commented May 15, 2026

Summary

Sub-PR for #628. Documents the consumer-facing CSS surface introduced by the editable-element overlay redesign in directus/directus (branch florian/cms-1944-update-editable-elements-design-in-visual-editor-library).

Files touched:

  • content/guides/02.content/8.visual-editor/3.customization.md — main change: new CSS surface + Studio-theme callout.
  • content/getting-started/10.accessibility.md — drops the now-obsolete "Visual Editor is only accessible on the Directus side" bullet. The redesign adds :focus-visible styling and :focus-within reveal to the overlay buttons, so they're keyboard-reachable on the website.

What changed

New CSS selector

  • .directus-visual-editing-actions-flipped — modifier on the rect that flips the action buttons below it when the rect sits near the top of the viewport.

New CSS variables

  • --directus-visual-editing--actions--offset
  • --directus-visual-editing--actions--focus-ring-color / --focus-ring-width / --focus-ring-offset
  • --directus-visual-editing--edit-btn-hover--bg-color
  • --directus-visual-editing--ai-btn--bg-color / --ai-btn-hover--bg-color

Refreshed compiled-in defaults to match the redesigned overlay:

  • border-spacing 9px → 8px
  • border-width 2px → 1px
  • rect-hover--opacity / rect-highlight--opacity 0.333 → 0.4
  • edit-btn--width / --height 28px → 24px
  • edit-btn--radius 50% → 6px (circle → rounded square)

New callout explaining that inside the Studio iframe these defaults are sourced from the active Studio theme (primary color, border radius, button size, focus-ring width/offset). User :root / customClass overrides still take precedence.

- Add .directus-visual-editing-actions-flipped selector (NEW class)
- Add CSS vars: --actions--offset, --actions--focus-ring-{color,width,offset},
  --edit-btn-hover--bg-color, --ai-btn--bg-color, --ai-btn-hover--bg-color
- Refresh compiled-in defaults to match the redesigned overlay
  (border-spacing 9→8px, border-width 2→1px, hover/highlight opacity
  0.333→0.4, edit-btn 28→24px, edit-btn--radius 50%→6px)
- Add callout that defaults come from the Studio theme inside the iframe

Refs directus/directus visual-editing PR (florian/cms-1944-...)
@formfcw formfcw requested a review from a team as a code owner May 15, 2026 23:24
@vercel
Copy link
Copy Markdown

vercel Bot commented May 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment May 15, 2026 11:40pm

Request Review

editable-element overlay buttons on the website are now keyboard
reachable: :focus-visible outline + :focus-within reveal in the
overlay redesign make the prior 'only accessible on Directus side'
caveat no longer true.
@formfcw formfcw merged commit 8f0011b into florian/twelve-ui-updates May 15, 2026
1 of 2 checks passed
@formfcw formfcw deleted the florian/twelve-ui-visual-editing-customization branch May 15, 2026 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant