| [ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Summary view] [Print] [Text view]
1 /* Accessible tooltip component. Markup from wp_get_tooltip(). */ 2 3 .wp-tooltip { 4 display: inline-flex; 5 align-items: center; 6 } 7 8 /* Toggle and close buttons. */ 9 .wp-tooltip .wp-tooltip__toggle, 10 .wp-tooltip .wp-tooltip__close { 11 display: inline-flex; 12 align-items: center; 13 justify-content: center; 14 width: 24px; 15 height: 24px; 16 padding: 0; 17 border: 0; 18 border-radius: 2px; 19 background: none; 20 color: #50575e; 21 cursor: pointer; 22 } 23 24 .wp-tooltip:not(:has(button[aria-disabled="true"],button[disabled])) .wp-tooltip__toggle:hover, 25 .wp-tooltip:not(:has(button[aria-disabled="true"],button[disabled])) .wp-tooltip__toggle:focus, 26 .wp-tooltip .wp-tooltip__close:hover, 27 .wp-tooltip .wp-tooltip__close:focus { 28 color: var(--wp-admin-theme-color, #3858e9); 29 } 30 31 /* 32 * `:where()` keeps the wrapper out of the specificity total, so buttons 33 * passed into a tooltip keep control of their own focus ring. 34 */ 35 :where(.wp-tooltip:not(:has(button[aria-disabled="true"],button[disabled]))) .wp-tooltip__toggle:focus, 36 .wp-tooltip .wp-tooltip__close:focus { 37 outline: 2px solid transparent; 38 box-shadow: 0 0 0 var(--wp-admin-border-width-focus, 1.5px) var(--wp-admin-theme-color, #3858e9); 39 } 40 41 .wp-tooltip .wp-tooltip__toggle .dashicons { 42 width: 20px; 43 height: 20px; 44 font-size: 20px; 45 } 46 47 .wp-tooltip .wp-tooltip__close .dashicons { 48 width: 18px; 49 height: 18px; 50 font-size: 18px; 51 } 52 53 /* Bubble. No position here, so it falls back to the UA's centered popover without anchoring. */ 54 .wp-tooltip .wp-tooltip__bubble { 55 max-width: min(280px, calc(100vw - 32px)); 56 margin: auto; 57 padding: 12px 16px; 58 overflow: visible; 59 border: 1px solid #c3c4c7; 60 border-radius: 4px; 61 background: #fff; 62 color: #1d2327; 63 font-size: 13px; 64 font-weight: 400; 65 line-height: 1.5; 66 text-align: left; 67 box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08); 68 } 69 70 .wp-tooltip.wp-is-tooltip .wp-tooltip__bubble, 71 .wp-tooltip .wp-tooltip__hint { 72 background: #000; 73 color: #f0f0f0; 74 text-align: center; 75 padding: 4px 8px; 76 line-height: 1.4; 77 } 78 79 .wp-tooltip:not(.wp-is-tooltip) .wp-tooltip__bubble:not(.wp-tooltip__hint) .wp-tooltip__text { 80 display: block; 81 padding-inline-end: 24px; 82 } 83 84 .wp-tooltip .wp-tooltip__close { 85 position: absolute; 86 top: 6px; 87 inset-inline-end: 6px; 88 } 89 90 /* Anchor the bubble above its toggle, with a downward arrow. */ 91 @supports (anchor-name: --a) { 92 .wp-tooltip .wp-tooltip__bubble { 93 position-area: top; 94 margin: 0 0 8px; 95 position-try-fallbacks: flip-block, flip-inline; 96 } 97 98 .wp-tooltip.wp-is-tooltip .wp-tooltip__bubble, 99 .wp-tooltip .wp-tooltip__hint { 100 margin: 0; 101 } 102 103 /* Arrow: gray border (::before) under a white fill (::after). */ 104 .wp-tooltip:not(.wp-is-tooltip) .wp-tooltip__bubble:not(.wp-tooltip__hint)::before, 105 .wp-tooltip:not(.wp-is-tooltip) .wp-tooltip__bubble:not(.wp-tooltip__hint)::after { 106 content: ""; 107 position: absolute; 108 top: 100%; 109 left: 50%; 110 width: 0; 111 height: 0; 112 border: 8px solid transparent; 113 border-bottom: 0; 114 } 115 116 .wp-tooltip:not(.wp-is-tooltip) .wp-tooltip__bubble:not(.wp-tooltip__hint)::before { 117 margin-left: -8px; 118 border-top-color: #c3c4c7; 119 } 120 121 .wp-tooltip:not(.wp-is-tooltip) .wp-tooltip__bubble:not(.wp-tooltip__hint)::after { 122 margin-left: -7px; 123 border-width: 7px; 124 border-bottom: 0; 125 border-top-color: #fff; 126 } 127 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated : Wed Oct 14 08:20:33 2026 | Cross-referenced by PHPXref |