| 1 |
// Form Shortcode panel — mirrors the designer mockup's Shortcode section: |
| 2 |
// muted help text, a monospace shortcode box, and a small borderless copy |
| 3 |
// button. Token values come from style/_tokens.scss. |
| 4 |
|
| 5 |
// Intro + footnote help text (12px, muted). |
| 6 |
.wppb-fb-shortcode-intro { |
| 7 |
color: var(--wppb-fb-text-muted); |
| 8 |
font-size: var(--wppb-fb-font-sm); |
| 9 |
margin: 0 0 var(--wppb-fb-space-md); |
| 10 |
} |
| 11 |
|
| 12 |
.wppb-fb-shortcode-help { |
| 13 |
color: var(--wppb-fb-text-muted); |
| 14 |
font-size: var(--wppb-fb-font-sm); |
| 15 |
margin: var(--wppb-fb-space-md) 0 0; |
| 16 |
} |
| 17 |
|
| 18 |
// Shortcode box. |
| 19 |
.wppb-fb-shortcode-box { |
| 20 |
align-items: center; |
| 21 |
background: var(--wppb-fb-surface-subtle); |
| 22 |
border: 1px solid var(--wppb-fb-border-default); |
| 23 |
border-radius: var(--wppb-fb-radius-sm); |
| 24 |
display: flex; |
| 25 |
gap: var(--wppb-fb-space-sm); |
| 26 |
justify-content: space-between; |
| 27 |
padding: var(--wppb-fb-space-md) var(--wppb-fb-space-lg); |
| 28 |
} |
| 29 |
|
| 30 |
.wppb-fb-shortcode-code { |
| 31 |
// Reset the editor's default <code> styling (it ships its own background + |
| 32 |
// padding) so the code reads flush on the box's surface-subtle background. |
| 33 |
background: transparent; |
| 34 |
color: var(--wppb-fb-text-primary); |
| 35 |
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; |
| 36 |
font-size: var(--wppb-fb-font-sm); |
| 37 |
line-height: 1.5; |
| 38 |
padding: 0; |
| 39 |
// Long shortcodes wrap rather than overflow the narrow sidebar. |
| 40 |
overflow-wrap: anywhere; |
| 41 |
// Let users still select the text manually if they prefer. |
| 42 |
user-select: all; |
| 43 |
} |
| 44 |
|
| 45 |
// Borderless icon button (transparent, muted, 2px padding, |
| 46 |
// hover/focus → accent). `.components-button` chained + `!important` on sizing |
| 47 |
// so it beats the @wordpress/components default Button box (36px min / padding |
| 48 |
// / focus ring), shrinking it to the bare 16px icon like the mockup. |
| 49 |
.wppb-fb-shortcode-copy.components-button { |
| 50 |
background: transparent; |
| 51 |
color: var(--wppb-fb-text-muted); |
| 52 |
flex: 0 0 auto; |
| 53 |
height: auto !important; |
| 54 |
min-width: 0 !important; |
| 55 |
padding: var(--wppb-fb-space-3xs) !important; |
| 56 |
|
| 57 |
&:hover, |
| 58 |
&:focus { |
| 59 |
background: transparent; |
| 60 |
box-shadow: none; |
| 61 |
color: var(--wppb-fb-accent); |
| 62 |
} |
| 63 |
|
| 64 |
svg { |
| 65 |
display: block; |
| 66 |
} |
| 67 |
} |
| 68 |
|