PluginProbe
User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor / 4.0.1
User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor v4.0.1
4.0.3 4.0.2 4.0.1 4.0.0 3.16.6 3.16.5 3.16.4 3.16.3 3.16.2 3.16.1 3.16.0 3.15.9 3.9.9 3.9.5 3.9.6 3.9.7 3.9.8 1.1.7 1.1.8 1.1.9 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 All 341 releases
profile-builder / form-builder / blocks / src / style / _unique-field-tip.scss

_unique-field-tip.scss in User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor 4.0.1, at form-builder/blocks/src/style/_unique-field-tip.scss

42 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 // Tooltip on a greyed-out "New Fields" inserter entry
2 // (components/UniqueFieldTooltip.js). Core dims the entry of a field type that
3 // may only appear once per form and says nothing about why, so we anchor our
4 // own explanation to it.
5 //
6 // Styled as a dark chip like core's own Tooltip rather than the light sheet a
7 // bare Popover renders — that's the affordance users read as "hint" instead of
8 // "menu."
9 //
10 // No `.wppb-fb-block-editor` scope needed (unlike the bare-Gutenberg-selector
11 // partials): the class is ours and only reaches the DOM from a component that
12 // already gates on the PB form CPTs.
13 // `.components-popover` is doubled up (not decoration): core sizes the popover
14 // through those same classes, and a lone `.wppb-fb-unique-tip` only ties on
15 // specificity — which core's stylesheet then wins on source order.
16 .components-popover.wppb-fb-unique-tip {
17 // Load-bearing, not polish. The tooltip renders directly beneath the entry,
18 // so a pointer over it would resolve to "not an inserter entry", close the
19 // tooltip, land back on the entry, reopen it — flickering for as long as the
20 // pointer sat there.
21 pointer-events: none;
22
23 .components-popover__content {
24 // Core shrink-wraps the content box to min-content, which for a sentence
25 // means "as wide as the longest word" — the tip renders as a
26 // one-word-per-line ribbon. Sizing must land HERE, on the content box,
27 // not on the popover root: the root is itself sized from this child, so
28 // a `width` up there only widens an empty frame around a 56px chip.
29 max-width: 220px;
30 width: max-content;
31
32 background: var(--wppb-fb-surface-inverse);
33 border: none;
34 border-radius: var(--wppb-fb-radius-sm);
35 box-shadow: none;
36 color: var(--wppb-fb-text-on-accent);
37 font-size: var(--wppb-fb-font-sm);
38 line-height: 1.4;
39 padding: var(--wppb-fb-space-xs) var(--wppb-fb-space-sm);
40 }
41 }
42