Initial public release of BreznFlow, an n8n workflow renderer for WordPress. Fully PHPCS-compliant (WordPress Coding Standards), security-hardened, and ready for WordPress.org plugin review. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
613 lines
13 KiB
CSS
613 lines
13 KiB
CSS
/* BreznFlow — Frontend Renderer Styles */
|
|
/* Color values live in assets/themes/*.css — this file contains structure only. */
|
|
|
|
/* Wrap */
|
|
.breznflow-embed {
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
font-size: 14px;
|
|
line-height: 1.5;
|
|
border: 1px solid var(--breznflow-node-border);
|
|
border-radius: 8px;
|
|
overflow: hidden;
|
|
background: var(--breznflow-canvas-bg);
|
|
}
|
|
|
|
.breznflow-wrap {
|
|
display: flex;
|
|
flex-direction: column;
|
|
width: 100%;
|
|
}
|
|
|
|
/* Title */
|
|
.breznflow-title {
|
|
margin: 0 0 0.5em;
|
|
}
|
|
|
|
/* Toolbar */
|
|
.breznflow-toolbar {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 8px 12px;
|
|
background: var(--breznflow-toolbar-bg);
|
|
border-bottom: 1px solid var(--breznflow-toolbar-border);
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.breznflow-toolbar-name {
|
|
font-weight: 600;
|
|
color: var(--breznflow-toolbar-text);
|
|
margin-right: auto;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
max-width: 40%;
|
|
}
|
|
|
|
.breznflow-btn {
|
|
background: var(--breznflow-btn-bg);
|
|
color: var(--breznflow-btn-text);
|
|
border: 1px solid var(--breznflow-btn-border);
|
|
border-radius: 4px;
|
|
padding: 4px 10px;
|
|
cursor: pointer;
|
|
font-size: 13px;
|
|
line-height: 1.4;
|
|
transition: background 0.15s;
|
|
}
|
|
|
|
.breznflow-btn:hover {
|
|
background: var(--breznflow-btn-hover-bg);
|
|
}
|
|
|
|
.breznflow-zoom-label {
|
|
color: var(--breznflow-node-sub);
|
|
font-size: 12px;
|
|
min-width: 36px;
|
|
text-align: center;
|
|
}
|
|
|
|
/* Diagram Container */
|
|
.breznflow-diagram-container {
|
|
position: relative;
|
|
overflow: hidden;
|
|
min-height: 200px;
|
|
cursor: grab;
|
|
user-select: none;
|
|
}
|
|
|
|
.breznflow-diagram-container:active {
|
|
cursor: grabbing;
|
|
}
|
|
|
|
.breznflow-svg {
|
|
display: block;
|
|
width: 100%;
|
|
overflow: visible;
|
|
}
|
|
|
|
/* Canvas (zoom/pan transform applied here) */
|
|
.breznflow-canvas {
|
|
transition: none;
|
|
}
|
|
|
|
/* Connections */
|
|
.breznflow-connection-path {
|
|
fill: none;
|
|
stroke: var(--breznflow-connection);
|
|
stroke-width: 2;
|
|
stroke-linecap: round;
|
|
transition: stroke 0.2s;
|
|
}
|
|
|
|
.breznflow-connection-path:hover {
|
|
stroke: var(--breznflow-connection-hover);
|
|
}
|
|
|
|
/* Nodes */
|
|
.breznflow-node {
|
|
cursor: pointer;
|
|
}
|
|
|
|
.breznflow-node:hover .breznflow-node-box {
|
|
filter: brightness(1.15);
|
|
}
|
|
|
|
.breznflow-node.selected .breznflow-node-box {
|
|
stroke-width: 2;
|
|
}
|
|
|
|
.breznflow-node-box {
|
|
fill: var(--breznflow-node-bg);
|
|
stroke: var(--breznflow-node-border);
|
|
stroke-width: 1;
|
|
rx: 6;
|
|
ry: 6;
|
|
transition: filter 0.15s;
|
|
}
|
|
|
|
.breznflow-node-icon-rect {
|
|
rx: 4;
|
|
ry: 4;
|
|
}
|
|
|
|
.breznflow-node-icon-text {
|
|
dominant-baseline: central;
|
|
text-anchor: middle;
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.breznflow-node-name {
|
|
fill: var(--breznflow-node-text);
|
|
dominant-baseline: central;
|
|
text-anchor: start;
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.breznflow-node-type {
|
|
fill: var(--breznflow-node-sub);
|
|
dominant-baseline: central;
|
|
text-anchor: start;
|
|
font-size: 10px;
|
|
}
|
|
|
|
/* Detail Panel */
|
|
.breznflow-detail-panel {
|
|
background: var(--breznflow-panel-bg);
|
|
border-top: 1px solid var(--breznflow-panel-border);
|
|
color: var(--breznflow-panel-text);
|
|
overflow: hidden;
|
|
max-height: 0;
|
|
transition: max-height 0.3s ease;
|
|
}
|
|
|
|
.breznflow-detail-panel.open {
|
|
max-height: 400px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.breznflow-detail-panel-inner {
|
|
padding: 16px;
|
|
}
|
|
|
|
.breznflow-detail-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.breznflow-detail-title {
|
|
font-size: 15px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.breznflow-detail-close {
|
|
background: none;
|
|
border: none;
|
|
color: var(--breznflow-node-sub);
|
|
cursor: pointer;
|
|
font-size: 18px;
|
|
padding: 0 4px;
|
|
line-height: 1;
|
|
}
|
|
|
|
.breznflow-detail-close:hover {
|
|
color: var(--breznflow-panel-text);
|
|
}
|
|
|
|
.breznflow-detail-dl {
|
|
display: grid;
|
|
grid-template-columns: max-content 1fr;
|
|
gap: 4px 16px;
|
|
margin: 0;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.breznflow-detail-dt {
|
|
color: var(--breznflow-node-sub);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.breznflow-detail-dd {
|
|
margin: 0;
|
|
word-break: break-word;
|
|
color: var(--breznflow-panel-text);
|
|
}
|
|
|
|
.breznflow-detail-multiline {
|
|
margin: 0;
|
|
font-family: inherit;
|
|
font-size: 0.88em;
|
|
white-space: pre-wrap;
|
|
word-break: break-word;
|
|
color: var(--breznflow-panel-text);
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.breznflow-detail-code {
|
|
background: var(--breznflow-modal-code-bg);
|
|
border: 1px solid var(--breznflow-modal-border);
|
|
border-radius: 4px;
|
|
padding: 8px;
|
|
font-family: monospace;
|
|
font-size: 12px;
|
|
overflow-y: auto;
|
|
white-space: pre;
|
|
color: #a8e6cf;
|
|
margin: 4px 0;
|
|
}
|
|
|
|
/* InfoBox */
|
|
.breznflow-infobox {
|
|
background: var(--breznflow-toolbar-bg);
|
|
border-top: 1px solid var(--breznflow-node-border);
|
|
padding: 12px 16px;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.breznflow-infobox-nodes {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 6px;
|
|
flex: 1;
|
|
}
|
|
|
|
.breznflow-infobox-node {
|
|
background: var(--breznflow-btn-bg);
|
|
border-radius: 4px;
|
|
padding: 2px 8px;
|
|
font-size: 12px;
|
|
color: var(--breznflow-btn-text);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.breznflow-infobox-node strong {
|
|
color: var(--breznflow-node-text);
|
|
}
|
|
|
|
.breznflow-infobox-more {
|
|
font-size: 12px;
|
|
color: var(--breznflow-node-sub);
|
|
background: none;
|
|
border: none;
|
|
padding: 2px 4px;
|
|
cursor: pointer;
|
|
border-radius: 3px;
|
|
transition: color 0.15s, background 0.15s;
|
|
}
|
|
|
|
.breznflow-infobox-more:hover {
|
|
color: var(--breznflow-panel-text);
|
|
background: rgba(255, 255, 255, 0.08);
|
|
}
|
|
|
|
.breznflow-infobox-ai {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.breznflow-ai-badge {
|
|
background: linear-gradient(135deg, #7c3aed, #4338ca);
|
|
color: #fff;
|
|
border-radius: 12px;
|
|
padding: 2px 10px;
|
|
font-size: 11px;
|
|
font-weight: 700;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.breznflow-infobox-total {
|
|
font-size: 12px;
|
|
color: var(--breznflow-node-sub);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
/* Admin badge */
|
|
.breznflow-badge-ai {
|
|
background: #7c3aed;
|
|
color: #fff;
|
|
padding: 1px 6px;
|
|
border-radius: 3px;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* Arrowhead */
|
|
.breznflow-arrow-head {
|
|
fill: var(--breznflow-connection);
|
|
}
|
|
|
|
/* Category node border colors */
|
|
[data-category="trigger"] .breznflow-node-box { stroke: var(--breznflow-color-trigger); stroke-width: 2; }
|
|
[data-category="http"] .breznflow-node-box { stroke: var(--breznflow-color-http); stroke-width: 2; }
|
|
[data-category="code"] .breznflow-node-box { stroke: var(--breznflow-color-code); stroke-width: 2; }
|
|
[data-category="logic"] .breznflow-node-box { stroke: var(--breznflow-color-logic); stroke-width: 2; }
|
|
[data-category="database"].breznflow-node-box { stroke: var(--breznflow-color-database); stroke-width: 2; }
|
|
[data-category="ai"] .breznflow-node-box { stroke: var(--breznflow-color-ai); stroke-width: 2; }
|
|
|
|
/* Connection dots — match category color */
|
|
[data-category="trigger"] circle { stroke: var(--breznflow-color-trigger); }
|
|
[data-category="http"] circle { stroke: var(--breznflow-color-http); }
|
|
[data-category="code"] circle { stroke: var(--breznflow-color-code); }
|
|
[data-category="logic"] circle { stroke: var(--breznflow-color-logic); }
|
|
[data-category="database"]circle { stroke: var(--breznflow-color-database); }
|
|
[data-category="ai"] circle { stroke: var(--breznflow-color-ai); }
|
|
|
|
/* Tooltip */
|
|
.breznflow-tooltip {
|
|
position: absolute;
|
|
pointer-events: none;
|
|
background: var(--breznflow-tooltip-bg);
|
|
color: var(--breznflow-tooltip-text);
|
|
font-size: 12px;
|
|
padding: 4px 10px;
|
|
border-radius: 4px;
|
|
white-space: nowrap;
|
|
transform: translate(-50%, -100%);
|
|
opacity: 0;
|
|
transition: opacity 0.12s;
|
|
z-index: 10;
|
|
}
|
|
|
|
.breznflow-tooltip.visible { opacity: 1; }
|
|
|
|
/* Fullscreen portal — appended to <body> to escape any containing block */
|
|
.breznflow-fs-portal {
|
|
position: fixed;
|
|
inset: 0;
|
|
top: var(--wp-admin--admin-bar--height, 0px);
|
|
z-index: 9999;
|
|
display: flex;
|
|
align-items: stretch;
|
|
padding: 48px;
|
|
background: var(--breznflow-fullscreen-overlay-bg);
|
|
cursor: default;
|
|
}
|
|
|
|
.breznflow-fs-portal .breznflow-wrap {
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex: 1;
|
|
min-height: 0;
|
|
border-radius: 10px;
|
|
overflow: hidden;
|
|
box-shadow: 0 12px 48px rgba(0, 0, 0, 0.7);
|
|
cursor: default;
|
|
}
|
|
|
|
.breznflow-fs-portal .breznflow-diagram-container {
|
|
flex: 1;
|
|
min-height: 0;
|
|
height: auto !important;
|
|
cursor: grab;
|
|
}
|
|
|
|
.breznflow-fs-portal .breznflow-diagram-container:active {
|
|
cursor: grabbing;
|
|
}
|
|
|
|
/* Minimap */
|
|
.breznflow-minimap {
|
|
position: absolute;
|
|
bottom: 8px;
|
|
right: 8px;
|
|
width: 160px;
|
|
height: 100px;
|
|
background: var(--breznflow-minimap-bg);
|
|
border: 1px solid var(--breznflow-minimap-border);
|
|
border-radius: 4px;
|
|
overflow: hidden;
|
|
cursor: crosshair;
|
|
z-index: 5;
|
|
}
|
|
|
|
.breznflow-minimap svg { display: block; }
|
|
|
|
/* Infobox node badges — interactive highlight */
|
|
.breznflow-infobox-node {
|
|
cursor: pointer;
|
|
border-left: 3px solid transparent;
|
|
padding-left: 6px;
|
|
transition: background 0.15s, opacity 0.15s;
|
|
}
|
|
|
|
.breznflow-infobox-node:hover {
|
|
background: var(--breznflow-btn-hover-bg);
|
|
}
|
|
|
|
.breznflow-infobox-node.active {
|
|
background: var(--breznflow-btn-hover-bg);
|
|
outline: 1px solid rgba(255,255,255,0.15);
|
|
outline-offset: -1px;
|
|
}
|
|
|
|
/* Category-colored left borders on infobox badges */
|
|
.breznflow-infobox-node[data-category="trigger"] { border-left-color: var(--breznflow-color-trigger); }
|
|
.breznflow-infobox-node[data-category="http"] { border-left-color: var(--breznflow-color-http); }
|
|
.breznflow-infobox-node[data-category="code"] { border-left-color: var(--breznflow-color-code); }
|
|
.breznflow-infobox-node[data-category="logic"] { border-left-color: var(--breznflow-color-logic); }
|
|
.breznflow-infobox-node[data-category="database"]{ border-left-color: var(--breznflow-color-database); }
|
|
.breznflow-infobox-node[data-category="ai"] { border-left-color: var(--breznflow-color-ai); }
|
|
|
|
/* Dim all nodes when highlight is active */
|
|
.breznflow-nodes.breznflow-dim .breznflow-node {
|
|
opacity: 0.15;
|
|
transition: opacity 0.12s;
|
|
}
|
|
|
|
/* Keep highlighted node fully visible */
|
|
.breznflow-nodes.breznflow-dim .breznflow-node.breznflow-highlighted {
|
|
opacity: 1;
|
|
}
|
|
|
|
/* Brighten the highlighted node box */
|
|
.breznflow-node.breznflow-highlighted .breznflow-node-box {
|
|
filter: brightness(1.35);
|
|
}
|
|
|
|
/* Action Bar */
|
|
.breznflow-action-bar {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
flex-wrap: wrap;
|
|
padding: 8px 12px;
|
|
background: var(--breznflow-action-bar-bg);
|
|
border-top: 1px solid var(--breznflow-action-bar-border);
|
|
}
|
|
|
|
/* Modal Overlay + Box */
|
|
.breznflow-modal-overlay {
|
|
position: fixed;
|
|
inset: 0;
|
|
z-index: 10000;
|
|
background: var(--breznflow-modal-overlay-bg);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 24px;
|
|
}
|
|
|
|
.breznflow-modal-box {
|
|
background: var(--breznflow-modal-bg);
|
|
border: 1px solid var(--breznflow-modal-border);
|
|
border-radius: 8px;
|
|
box-shadow: 0 12px 48px rgba(0, 0, 0, 0.7);
|
|
min-width: 320px;
|
|
max-width: 540px;
|
|
width: 100%;
|
|
max-height: 90vh;
|
|
overflow-y: auto;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.breznflow-modal-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 14px 16px 10px;
|
|
border-bottom: 1px solid var(--breznflow-modal-border);
|
|
}
|
|
|
|
.breznflow-modal-title {
|
|
font-size: 15px;
|
|
font-weight: 600;
|
|
color: var(--breznflow-modal-title);
|
|
}
|
|
|
|
.breznflow-modal-close {
|
|
background: none;
|
|
border: none;
|
|
color: var(--breznflow-modal-close);
|
|
cursor: pointer;
|
|
font-size: 20px;
|
|
padding: 0 4px;
|
|
line-height: 1;
|
|
}
|
|
|
|
.breznflow-modal-close:hover {
|
|
color: var(--breznflow-modal-text);
|
|
}
|
|
|
|
.breznflow-modal-body {
|
|
padding: 16px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 16px;
|
|
}
|
|
|
|
/* Share Blocks */
|
|
.breznflow-share-block {
|
|
background: var(--breznflow-modal-secondary-bg);
|
|
border: 1px solid var(--breznflow-modal-secondary-border);
|
|
border-radius: 6px;
|
|
padding: 12px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
|
|
.breznflow-share-label {
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
color: var(--breznflow-modal-sub);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.breznflow-share-preview {
|
|
font-size: 12px;
|
|
color: var(--breznflow-modal-text);
|
|
white-space: pre-wrap;
|
|
word-break: break-all;
|
|
background: var(--breznflow-modal-code-bg);
|
|
border: 1px solid var(--breznflow-modal-border);
|
|
border-radius: 4px;
|
|
padding: 8px;
|
|
font-family: monospace;
|
|
line-height: 1.5;
|
|
margin: 0;
|
|
}
|
|
|
|
/* Textarea + JSON meta */
|
|
.breznflow-modal-textarea {
|
|
width: 100%;
|
|
min-height: 90px;
|
|
background: var(--breznflow-modal-code-bg);
|
|
border: 1px solid var(--breznflow-modal-border);
|
|
border-radius: 4px;
|
|
color: var(--breznflow-modal-text);
|
|
font-family: monospace;
|
|
font-size: 12px;
|
|
padding: 8px;
|
|
resize: vertical;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.breznflow-modal-desc {
|
|
font-size: 13px;
|
|
color: var(--breznflow-modal-sub);
|
|
margin: 0;
|
|
}
|
|
|
|
.breznflow-json-meta {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
.breznflow-json-size {
|
|
font-size: 11px;
|
|
color: var(--breznflow-modal-sub);
|
|
}
|
|
|
|
.breznflow-copy-btn {
|
|
align-self: flex-start;
|
|
}
|
|
|
|
/* Mobile */
|
|
@media (max-width: 600px) {
|
|
.breznflow-btn-zoom {
|
|
display: none;
|
|
}
|
|
|
|
.breznflow-detail-panel.open {
|
|
max-height: 300px;
|
|
}
|
|
|
|
.breznflow-modal-box {
|
|
min-width: 0;
|
|
max-width: 100%;
|
|
}
|
|
|
|
.breznflow-action-bar {
|
|
padding: 6px 8px;
|
|
gap: 6px;
|
|
}
|
|
}
|