@import "tailwindcss" source(none) important; @import "../tailwind.css" source(none); @source "."; @theme { /* Body-level bars/menus render outside WP admin's font context, so they need an explicit system UI stack. */ --font-qe: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; } /* DOMHighlighter renders one motion.div for both hover preview AND selected-block X-close. Hover state has `pointer-events: none` inline, selected state has `auto` — keep the selected rect, hide the hover. */ /* no-prefix */ html.extendify-quick-edit-on #extendify-agent-dom-mount [style*="pointer-events: none"] { @apply hidden!; } /* Once a block is being edited in Quick Edit, the agent's selected-block X-close (rendered as a div[role="button"] inside its portal at the cover's top-center) reads as orphaned — the user moved past the agent's block-selection step and now owns Cancel via the QE toolbar. Suppress it while a QE canvas is mounted. Wrapped in @layer utilities so this `!important` rule competes in the same layer as the agent bundle's Tailwind `.extendify-agent .flex { display: flex !important }`. Per the cascade-layer spec, important rules in any declared layer beat important rules outside layers — without this wrapping, the layered .flex !important would always win regardless of selector specificity. */ @layer utilities { /* no-prefix */ html:has(.extendify-quick-edit-canvas) #extendify-agent-dom-mount div[role="button"] { @apply hidden!; } } /* Admin-bar Edit Mode pill. Lives outside our scope wrapper, so each rule carries a `no-prefix` marker. */ /* no-prefix */ #wpadminbar #wp-admin-bar-extendify-quick-edit-toggle > a.ab-item { @apply inline-flex! items-center! gap-[8px]!; } /* no-prefix */ #wpadminbar #wp-admin-bar-extendify-quick-edit-toggle .extendify-quick-edit-toggle-pill { @apply inline-block! relative! shrink-0! h-[16px]! w-[28px]! rounded-full! bg-[rgba(255,255,255,0.25)]!; transition: background 0.18s ease !important; } /* no-prefix */ #wpadminbar #wp-admin-bar-extendify-quick-edit-toggle .extendify-quick-edit-toggle-thumb { /* Literal color, not bg-white — the theme vars don't reach #wpadminbar, so var-based utilities silently no-op here. */ @apply absolute! top-[2px]! left-[2px]! h-[12px]! w-[12px]! rounded-full! bg-[#fff]!; transition: transform 0.18s ease !important; } /* On state — pill turns the AI Agent button's blue (not the partner color), thumb slides right. */ /* no-prefix */ html.extendify-quick-edit-on #wpadminbar #wp-admin-bar-extendify-quick-edit-toggle .extendify-quick-edit-toggle-pill { @apply bg-[#3858e9]!; } /* no-prefix */ html.extendify-quick-edit-on #wpadminbar #wp-admin-bar-extendify-quick-edit-toggle .extendify-quick-edit-toggle-thumb { @apply translate-x-[12px]!; } /* Ask AI flash — `lib/ask-ai.js#flashSelection` adds the class. */ /* no-prefix */ @keyframes extendify-quick-edit-ask-flash { 0% { outline-color: rgba(56, 88, 233, 0); box-shadow: 0 0 0 0 rgba(56, 88, 233, 0); } 30% { outline-color: rgba(56, 88, 233, 1); box-shadow: 0 0 0 6px rgba(56, 88, 233, 0.35); } 100% { outline-color: rgba(56, 88, 233, 0); box-shadow: 0 0 0 0 rgba(56, 88, 233, 0); } } /* no-prefix */ .extendify-quick-edit-ask-flash { @apply rounded-[4px]! outline-offset-[4px]!; outline: 3px solid transparent !important; animation: extendify-quick-edit-ask-flash 1.4s ease-out both !important; } /* Above WP admin bar (z 100000). */ #extendify-quick-edit-root { @apply relative z-[100001]; } /* The agent's highlighter-mode CSS sets pointer-events: none on page-wide buttons/links so the selector-tool can capture clicks. Re-enable them inside our UI surfaces. `html` prefix is required to win specificity against the agent's `!important` rule. The canvas inclusion is what keeps the LinkControl popover (and any other BlockTools-slotted popover) clickable when the agent sidebar is open — `BlockTools` puts its popover Slot inside the canvas, so the popover renders inside `.wp-site-blocks`, in the highlighter-mode scope. */ /* no-prefix */ html .extendify-quick-edit-bar, html .extendify-quick-edit-bar *, html .extendify-quick-edit-floating-bar, html .extendify-quick-edit-floating-bar *, html .extendify-quick-edit-image-menu, html .extendify-quick-edit-image-menu *, html .extendify-quick-edit-canvas, html .extendify-quick-edit-canvas * { @apply pointer-events-auto!; } /* Restore pointer-events on `.wp-block-button` wrapper divs inside highlighter-mode. The agent ships a secondary rule (in agent.css) that drops pointer-events on `.wp-block-button` whenever the parent `.wp-block-buttons` contains exactly one button: .extendify-agent-highlighter-mode .wp-block-buttons:has(> .wp-block-button):not(:has(> .wp-block-button:nth-of-type(2))) > .wp-block-button That selector's specificity is (0,6,0) once `:has` / `:not` are scored, so a plain `html.extendify-quick-edit-on .extendify-agent-highlighter-mode .wp-block-button` rescue loses the cascade even with !important. Mirror the same `:has` / `:not` chain to outweigh it; the rescue still fires only when the agent's rule fires, which is exactly the bug scope. The inner `` still has pointer-events:none from the broader `.extendify-agent-highlighter-mode a` rule, so link-nav prevention is intact — we only restore the wrapper div so hover/click targeting resolves to the button via QE's findTagged walk-up. */ /* no-prefix */ html.extendify-quick-edit-on .extendify-agent-highlighter-mode .wp-block-buttons:has(> .wp-block-button):not( :has(> .wp-block-button:nth-of-type(2)) ) > .wp-block-button { @apply pointer-events-auto!; } /* Cursor contract for edit mode. Tagged blocks read as selectable (crosshair); anchors and form controls inside them keep their native cursors so the click rule (lib/click-rule.js) telegraphs which branch a click will hit before the user clicks. Scoped to `html.extendify-quick-edit-on` so cursors don't bleed into normal browsing. */ /* no-prefix */ html.extendify-quick-edit-on [data-extendify-agent-block-id], html.extendify-quick-edit-on [data-extendify-part-block-id], html.extendify-quick-edit-on [data-extendify-quick-edit-product-id], html.extendify-quick-edit-on [data-extendify-quick-edit-wpform-field-id] { @apply cursor-crosshair; } /* no-prefix */ html.extendify-quick-edit-on [data-extendify-agent-block-id] a[href], html.extendify-quick-edit-on [data-extendify-part-block-id] a[href], html.extendify-quick-edit-on [data-extendify-quick-edit-product-id] a[href], html.extendify-quick-edit-on [data-extendify-quick-edit-wpform-field-id] a[href] { @apply cursor-pointer; } /* `revert` restores the UA-default cursor — text on inputs/textarea, default/pointer on select/button — so form controls inside tagged blocks still feel like form controls. */ /* no-prefix */ html.extendify-quick-edit-on [data-extendify-agent-block-id] :is(input, textarea, select, button), html.extendify-quick-edit-on [data-extendify-part-block-id] :is(input, textarea, select, button), html.extendify-quick-edit-on [data-extendify-quick-edit-product-id] :is(input, textarea, select, button), html.extendify-quick-edit-on [data-extendify-quick-edit-wpform-field-id] :is(input, textarea, select, button) { @apply cursor-[revert]; } /* keyboard-entry.js adds tabindex="0" to every tagged block so Tab can walk between blocks for accessibility. Side effect: a mouse click on a tagged block focuses it, the browser paints its :focus-visible ring (1px solid blue in Chrome), and the ring lingers on after the QE click-rule / Esc clears the committed selection — because focus stays on the element until something else takes it. The hover bar's showBar (driven by both mouseover AND focusin) already paints the dashed outline as the visual focus indicator, so the browser ring is both redundant and visually conflicting. Suppress it on every tagged-block flavour while edit mode is on. */ /* no-prefix */ html.extendify-quick-edit-on [data-extendify-agent-block-id]:focus, html.extendify-quick-edit-on [data-extendify-agent-block-id]:focus-visible, html.extendify-quick-edit-on [data-extendify-part-block-id]:focus, html.extendify-quick-edit-on [data-extendify-part-block-id]:focus-visible, html.extendify-quick-edit-on [data-extendify-quick-edit-product-id]:focus, html.extendify-quick-edit-on [data-extendify-quick-edit-product-id]:focus-visible, html.extendify-quick-edit-on [data-extendify-quick-edit-wpform-field-id]:focus, html.extendify-quick-edit-on [data-extendify-quick-edit-wpform-field-id]:focus-visible { @apply outline-none; } /* WP's `` (and `` via it) layers a visual `__backdrop` div over the input element to draw the focus border. By WP design it carries `pointer-events: none` so clicks pass through to the input behind. Our broader `.extendify-quick-edit-canvas *` rule above forces every descendant to `pointer-events: auto`, which re-enables the backdrop and makes it eat real-user clicks on the LinkControl URL input (the "click does nothing" symptom). Pin the backdrop back to none — scoped to the LinkControl shell + the QE canvas's WP popovers so we don't touch input-controls in unrelated UI (the AI Agent's chat input, WP admin forms, etc.). */ /* no-prefix */ html.extendify-quick-edit-on .block-editor-link-control .components-input-control__backdrop, html.extendify-quick-edit-on .extendify-quick-edit-canvas .components-popover .components-input-control__backdrop { @apply pointer-events-none!; } /* The tagged-descendant cursor rules above scope by `[data-extendify-*]` ancestor. WP's LinkControl popover (Quick Edit canvas → BlockTools → Popover.Slot) can end up portaled inside a tagged element when the live block's parent is itself a tagged container; the form-control override on `:is(input, ...)` matches the `` itself, but WP wraps the input in `.components-input-control` + similar divs that catch hover events around the input edge and read as crosshair. Pin the cursor on the popover root + every interactive descendant so the LinkControl always feels like a form, regardless of which tagged ancestor it lands under. */ /* no-prefix */ html.extendify-quick-edit-on .block-editor-link-control, html.extendify-quick-edit-on .block-editor-link-control *, html.extendify-quick-edit-on .extendify-quick-edit-canvas .components-popover, html.extendify-quick-edit-on .extendify-quick-edit-canvas .components-popover * { @apply cursor-[revert]; } html.extendify-quick-edit-on .block-editor-link-control input, html.extendify-quick-edit-on .block-editor-link-control textarea, html.extendify-quick-edit-on .extendify-quick-edit-canvas .components-popover input, html.extendify-quick-edit-on .extendify-quick-edit-canvas .components-popover textarea { @apply cursor-text; } /* The `cursor: revert` block above reverts buttons inside the LinkControl popover (pencil / unlink / copy) to the UA default, which is the arrow cursor — not pointer. WP's `.components-button` normally sets `cursor: pointer` but our blanket revert wins. Pin pointer on the link-control's `