| 1 |
// Progress Bar — auto-injected at top and/or bottom of the canvas (or per |
| 2 |
// MSF step) based on the Progress Bar panel settings. Locked from drag/remove |
| 3 |
// so the document sidebar is the only edit surface. |
| 4 |
// |
| 5 |
// Wrapper chrome (card + type chip + meta line) is editor-only and follows the |
| 6 |
// same neutral design language as the field blocks (white card, grey chip, |
| 7 |
// faint meta). The inner `.wppb-progress-bar-container` mirrors the front-end |
| 8 |
// markup from `add-ons/multiple-forms/progress-bar/progress-bar.php`. Token |
| 9 |
// values come from style/_tokens.scss. |
| 10 |
.wppb-fb-progress-bar { |
| 11 |
background: var(--wppb-fb-surface-default); |
| 12 |
border: 1px solid var(--wppb-fb-border-default); |
| 13 |
border-radius: var(--wppb-fb-radius-md); |
| 14 |
// See _field-block.scss: border-box so the content-size caps total width |
| 15 |
// and every PB block lines up at the same width. |
| 16 |
box-sizing: border-box; |
| 17 |
margin: var(--wppb-fb-space-md) 0; |
| 18 |
padding: var(--wppb-fb-space-lg) var(--wppb-fb-space-xl); |
| 19 |
|
| 20 |
&--bottom { |
| 21 |
margin-top: var(--wppb-fb-space-lg); |
| 22 |
} |
| 23 |
|
| 24 |
&__chrome { |
| 25 |
align-items: center; |
| 26 |
display: flex; |
| 27 |
gap: var(--wppb-fb-space-md); |
| 28 |
margin-bottom: var(--wppb-fb-space-md); |
| 29 |
} |
| 30 |
|
| 31 |
// Type chip — mirrors the field-block `.wppb-fb-field-tag`. |
| 32 |
&__badge { |
| 33 |
background: var(--wppb-fb-surface-subtle); |
| 34 |
border-radius: var(--wppb-fb-radius-pill); |
| 35 |
color: var(--wppb-fb-text-muted); |
| 36 |
font-size: var(--wppb-fb-font-xs); |
| 37 |
font-weight: 500; |
| 38 |
padding: var(--wppb-fb-space-3xs) var(--wppb-fb-space-xs); |
| 39 |
} |
| 40 |
|
| 41 |
&__meta { |
| 42 |
color: var(--wppb-fb-text-faint); |
| 43 |
font-size: var(--wppb-fb-font-xs); |
| 44 |
} |
| 45 |
|
| 46 |
// Mirror of front-end .wppb-progress-bar-container layout. The editor fill |
| 47 |
// uses the accent color (per the Figma mockup) rather than the front-end |
| 48 |
// green (#4cd964) — a deliberate editor-only treatment (scoped under |
| 49 |
// .wppb-fb-progress-bar) that reads as an editor-UI accent, distinct from |
| 50 |
// the live front-end bar. The front-end bar color is unaffected. |
| 51 |
.wppb-progress-bar-container { |
| 52 |
background-color: var(--wppb-fb-surface-subtle); |
| 53 |
border-radius: var(--wppb-fb-radius-md); |
| 54 |
box-sizing: border-box; |
| 55 |
height: 20px; |
| 56 |
margin: 0; |
| 57 |
overflow: hidden; |
| 58 |
position: relative; |
| 59 |
width: 100%; |
| 60 |
} |
| 61 |
|
| 62 |
.wppb-progress-bar-fill { |
| 63 |
background-color: var(--wppb-fb-accent); |
| 64 |
border-radius: var(--wppb-fb-radius-md); |
| 65 |
height: 100%; |
| 66 |
transition: width 0.3s ease-in-out; |
| 67 |
} |
| 68 |
|
| 69 |
.wppb-progress-bar-text { |
| 70 |
color: var(--wppb-fb-text-primary); |
| 71 |
font-size: var(--wppb-fb-font-sm); |
| 72 |
font-weight: 700; |
| 73 |
left: 0; |
| 74 |
mix-blend-mode: multiply; |
| 75 |
position: absolute; |
| 76 |
text-align: center; |
| 77 |
top: 50%; |
| 78 |
transform: translateY(-50%); |
| 79 |
width: 100%; |
| 80 |
} |
| 81 |
} |
| 82 |
|