style.css 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540
  1. /**
  2. * Colors
  3. */
  4. /**
  5. * Breakpoints & Media Queries
  6. */
  7. /**
  8. * SCSS Variables.
  9. *
  10. * Please use variables from this sheet to ensure consistency across the UI.
  11. * Don't add to this sheet unless you're pretty sure the value will be reused in many places.
  12. * For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
  13. */
  14. /**
  15. * Colors
  16. */
  17. /**
  18. * Fonts & basic variables.
  19. */
  20. /**
  21. * Grid System.
  22. * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
  23. */
  24. /**
  25. * Dimensions.
  26. */
  27. /**
  28. * Shadows.
  29. */
  30. /**
  31. * Editor widths.
  32. */
  33. /**
  34. * Block & Editor UI.
  35. */
  36. /**
  37. * Block paddings.
  38. */
  39. /**
  40. * React Native specific.
  41. * These variables do not appear to be used anywhere else.
  42. */
  43. /**
  44. * Converts a hex value into the rgb equivalent.
  45. *
  46. * @param {string} hex - the hexadecimal value to convert
  47. * @return {string} comma separated rgb values
  48. */
  49. /**
  50. * Breakpoint mixins
  51. */
  52. /**
  53. * Long content fade mixin
  54. *
  55. * Creates a fading overlay to signify that the content is longer
  56. * than the space allows.
  57. */
  58. /**
  59. * Focus styles.
  60. */
  61. /**
  62. * Applies editor left position to the selector passed as argument
  63. */
  64. /**
  65. * Styles that are reused verbatim in a few places
  66. */
  67. /**
  68. * Allows users to opt-out of animations via OS-level preferences.
  69. */
  70. /**
  71. * Reset default styles for JavaScript UI based pages.
  72. * This is a WP-admin agnostic reset
  73. */
  74. /**
  75. * Reset the WP Admin page styles for Gutenberg-like pages.
  76. */
  77. .wp-block-navigation {
  78. position: relative;
  79. --navigation-layout-justification-setting: flex-start;
  80. --navigation-layout-direction: row;
  81. --navigation-layout-wrap: wrap;
  82. --navigation-layout-justify: flex-start;
  83. --navigation-layout-align: center;
  84. }
  85. .wp-block-navigation ul {
  86. margin-top: 0;
  87. margin-bottom: 0;
  88. margin-left: 0;
  89. padding-left: 0;
  90. }
  91. .wp-block-navigation ul,
  92. .wp-block-navigation ul li {
  93. list-style: none;
  94. padding: 0;
  95. }
  96. .wp-block-navigation .wp-block-navigation-item {
  97. display: flex;
  98. align-items: center;
  99. position: relative;
  100. }
  101. .wp-block-navigation .wp-block-navigation-item .wp-block-navigation__submenu-container:empty {
  102. display: none;
  103. }
  104. .wp-block-navigation .wp-block-navigation-item__content {
  105. color: inherit;
  106. display: block;
  107. padding: 0;
  108. }
  109. .wp-block-navigation.has-text-decoration-underline .wp-block-navigation-item__content {
  110. text-decoration: underline;
  111. }
  112. .wp-block-navigation.has-text-decoration-underline .wp-block-navigation-item__content:focus, .wp-block-navigation.has-text-decoration-underline .wp-block-navigation-item__content:active {
  113. text-decoration: underline;
  114. }
  115. .wp-block-navigation.has-text-decoration-line-through .wp-block-navigation-item__content {
  116. text-decoration: line-through;
  117. }
  118. .wp-block-navigation.has-text-decoration-line-through .wp-block-navigation-item__content:focus, .wp-block-navigation.has-text-decoration-line-through .wp-block-navigation-item__content:active {
  119. text-decoration: line-through;
  120. }
  121. .wp-block-navigation:where(:not([class*="has-text-decoration"])) a {
  122. text-decoration: none;
  123. }
  124. .wp-block-navigation:where(:not([class*="has-text-decoration"])) a:focus, .wp-block-navigation:where(:not([class*="has-text-decoration"])) a:active {
  125. text-decoration: none;
  126. }
  127. .wp-block-navigation .wp-block-navigation__submenu-icon {
  128. align-self: center;
  129. line-height: 0;
  130. display: inline-block;
  131. font-size: inherit;
  132. padding: 0;
  133. background-color: inherit;
  134. color: currentColor;
  135. border: none;
  136. width: 0.6em;
  137. height: 0.6em;
  138. margin-left: 0.25em;
  139. }
  140. .wp-block-navigation .wp-block-navigation__submenu-icon svg {
  141. display: inline-block;
  142. stroke: currentColor;
  143. width: inherit;
  144. height: inherit;
  145. margin-top: 0.075em;
  146. }
  147. .wp-block-navigation.is-vertical {
  148. --navigation-layout-direction: column;
  149. --navigation-layout-justify: initial;
  150. --navigation-layout-align: flex-start;
  151. }
  152. .wp-block-navigation.no-wrap {
  153. --navigation-layout-wrap: nowrap;
  154. }
  155. .wp-block-navigation.items-justified-center {
  156. --navigation-layout-justification-setting: center;
  157. --navigation-layout-justify: center;
  158. }
  159. .wp-block-navigation.items-justified-center.is-vertical {
  160. --navigation-layout-align: center;
  161. }
  162. .wp-block-navigation.items-justified-right {
  163. --navigation-layout-justification-setting: flex-end;
  164. --navigation-layout-justify: flex-end;
  165. }
  166. .wp-block-navigation.items-justified-right.is-vertical {
  167. --navigation-layout-align: flex-end;
  168. }
  169. .wp-block-navigation.items-justified-space-between {
  170. --navigation-layout-justification-setting: space-between;
  171. --navigation-layout-justify: space-between;
  172. }
  173. .wp-block-navigation .has-child :where(.wp-block-navigation__submenu-container) {
  174. background-color: inherit;
  175. color: inherit;
  176. position: absolute;
  177. z-index: 2;
  178. display: flex;
  179. flex-direction: column;
  180. align-items: normal;
  181. opacity: 0;
  182. transition: opacity 0.1s linear;
  183. visibility: hidden;
  184. width: 0;
  185. height: 0;
  186. overflow: hidden;
  187. left: -1px;
  188. top: 100%;
  189. }
  190. .wp-block-navigation .has-child :where(.wp-block-navigation__submenu-container) > .wp-block-navigation-item > .wp-block-navigation-item__content {
  191. display: flex;
  192. flex-grow: 1;
  193. }
  194. .wp-block-navigation .has-child :where(.wp-block-navigation__submenu-container) > .wp-block-navigation-item > .wp-block-navigation-item__content .wp-block-navigation__submenu-icon {
  195. margin-right: 0;
  196. margin-left: auto;
  197. }
  198. .wp-block-navigation .has-child :where(.wp-block-navigation__submenu-container) .wp-block-navigation-item__content {
  199. margin: 0;
  200. }
  201. @media (min-width: 782px) {
  202. .wp-block-navigation .has-child :where(.wp-block-navigation__submenu-container) .wp-block-navigation__submenu-container {
  203. left: 100%;
  204. top: -1px;
  205. }
  206. .wp-block-navigation .has-child :where(.wp-block-navigation__submenu-container) .wp-block-navigation__submenu-container::before {
  207. content: "";
  208. position: absolute;
  209. right: 100%;
  210. height: 100%;
  211. display: block;
  212. width: 0.5em;
  213. background: transparent;
  214. }
  215. .wp-block-navigation .has-child :where(.wp-block-navigation__submenu-container) .wp-block-navigation__submenu-icon {
  216. margin-right: 0.25em;
  217. }
  218. .wp-block-navigation .has-child :where(.wp-block-navigation__submenu-container) .wp-block-navigation__submenu-icon svg {
  219. transform: rotate(-90deg);
  220. }
  221. }
  222. .wp-block-navigation .has-child:where(:not(.open-on-click)):hover > .wp-block-navigation__submenu-container {
  223. visibility: visible;
  224. overflow: visible;
  225. opacity: 1;
  226. width: auto;
  227. height: auto;
  228. min-width: 200px;
  229. }
  230. .wp-block-navigation .has-child:where(:not(.open-on-click):not(.open-on-hover-click)):focus-within > .wp-block-navigation__submenu-container {
  231. visibility: visible;
  232. overflow: visible;
  233. opacity: 1;
  234. width: auto;
  235. height: auto;
  236. min-width: 200px;
  237. }
  238. .wp-block-navigation .has-child .wp-block-navigation-submenu__toggle[aria-expanded=true] ~ .wp-block-navigation__submenu-container {
  239. visibility: visible;
  240. overflow: visible;
  241. opacity: 1;
  242. width: auto;
  243. height: auto;
  244. min-width: 200px;
  245. }
  246. .wp-block-navigation.has-background .has-child .wp-block-navigation__submenu-container {
  247. left: 0;
  248. top: 100%;
  249. }
  250. @media (min-width: 782px) {
  251. .wp-block-navigation.has-background .has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container {
  252. left: 100%;
  253. top: 0;
  254. }
  255. }
  256. .wp-block-navigation-submenu {
  257. position: relative;
  258. display: flex;
  259. }
  260. .wp-block-navigation-submenu .wp-block-navigation__submenu-icon svg {
  261. stroke: currentColor;
  262. }
  263. button.wp-block-navigation-item__content {
  264. background-color: transparent;
  265. border: none;
  266. color: currentColor;
  267. font-size: inherit;
  268. font-family: inherit;
  269. line-height: inherit;
  270. font-style: inherit;
  271. font-weight: inherit;
  272. text-transform: inherit;
  273. text-align: left;
  274. }
  275. .wp-block-navigation-submenu__toggle {
  276. cursor: pointer;
  277. }
  278. .wp-block-navigation-item.open-on-click .wp-block-navigation-submenu__toggle {
  279. padding-right: 0.85em;
  280. }
  281. .wp-block-navigation-item.open-on-click .wp-block-navigation-submenu__toggle + .wp-block-navigation__submenu-icon {
  282. margin-left: -0.6em;
  283. pointer-events: none;
  284. }
  285. /**
  286. * Margins
  287. */
  288. .wp-block-navigation__responsive-container,
  289. .wp-block-navigation__responsive-close,
  290. .wp-block-navigation__responsive-dialog,
  291. .wp-block-navigation,
  292. .wp-block-navigation .wp-block-page-list,
  293. .wp-block-navigation__container,
  294. .wp-block-navigation__responsive-container-content {
  295. gap: inherit;
  296. }
  297. .wp-block-navigation:where(.has-background),
  298. .wp-block-navigation:where(.has-background) .wp-block-navigation .wp-block-page-list,
  299. .wp-block-navigation:where(.has-background) .wp-block-navigation__container {
  300. gap: inherit;
  301. }
  302. /**
  303. * Paddings
  304. */
  305. .wp-block-navigation:where(.has-background) .wp-block-navigation-item__content {
  306. padding: 0.5em 1em;
  307. }
  308. .wp-block-navigation :where(.wp-block-navigation__submenu-container) .wp-block-navigation-item__content {
  309. padding: 0.5em 1em;
  310. }
  311. /**
  312. * Justifications.
  313. */
  314. .wp-block-navigation.items-justified-space-between .wp-block-page-list > .has-child:last-child .wp-block-navigation__submenu-container,
  315. .wp-block-navigation.items-justified-space-between > .wp-block-navigation__container > .has-child:last-child .wp-block-navigation__submenu-container,
  316. .wp-block-navigation.items-justified-right .wp-block-page-list > .has-child .wp-block-navigation__submenu-container,
  317. .wp-block-navigation.items-justified-right .wp-block-navigation__container .has-child .wp-block-navigation__submenu-container {
  318. left: auto;
  319. right: 0;
  320. }
  321. .wp-block-navigation.items-justified-space-between .wp-block-page-list > .has-child:last-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container,
  322. .wp-block-navigation.items-justified-space-between > .wp-block-navigation__container > .has-child:last-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container,
  323. .wp-block-navigation.items-justified-right .wp-block-page-list > .has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container,
  324. .wp-block-navigation.items-justified-right .wp-block-navigation__container .has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container {
  325. left: -1px;
  326. right: -1px;
  327. }
  328. @media (min-width: 782px) {
  329. .wp-block-navigation.items-justified-space-between .wp-block-page-list > .has-child:last-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container,
  330. .wp-block-navigation.items-justified-space-between > .wp-block-navigation__container > .has-child:last-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container,
  331. .wp-block-navigation.items-justified-right .wp-block-page-list > .has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container,
  332. .wp-block-navigation.items-justified-right .wp-block-navigation__container .has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container {
  333. left: auto;
  334. right: 100%;
  335. }
  336. }
  337. .wp-block-navigation:not(.has-background) .wp-block-navigation__submenu-container {
  338. background-color: #fff;
  339. color: #000;
  340. border: 1px solid rgba(0, 0, 0, 0.15);
  341. }
  342. .wp-block-navigation__container {
  343. display: flex;
  344. flex-wrap: var(--navigation-layout-wrap, wrap);
  345. flex-direction: var(--navigation-layout-direction, initial);
  346. justify-content: var(--navigation-layout-justify, initial);
  347. align-items: var(--navigation-layout-align, initial);
  348. list-style: none;
  349. margin: 0;
  350. padding-left: 0;
  351. }
  352. .wp-block-navigation__container .is-responsive {
  353. display: none;
  354. }
  355. .wp-block-navigation__container:only-child,
  356. .wp-block-page-list:only-child {
  357. flex-grow: 1;
  358. }
  359. /**
  360. * Mobile menu.
  361. */
  362. .wp-block-navigation__responsive-container {
  363. display: none;
  364. position: fixed;
  365. top: 0;
  366. left: 0;
  367. right: 0;
  368. bottom: 0;
  369. }
  370. .wp-block-navigation__responsive-container .wp-block-navigation__responsive-container-content {
  371. display: flex;
  372. flex-wrap: var(--navigation-layout-wrap, wrap);
  373. flex-direction: var(--navigation-layout-direction, initial);
  374. justify-content: var(--navigation-layout-justify, initial);
  375. align-items: var(--navigation-layout-align, initial);
  376. }
  377. .wp-block-navigation__responsive-container:not(.is-menu-open.is-menu-open) {
  378. color: inherit !important;
  379. background-color: inherit !important;
  380. }
  381. .wp-block-navigation__responsive-container.is-menu-open {
  382. display: flex;
  383. flex-direction: column;
  384. background-color: inherit;
  385. padding: 2rem;
  386. overflow: auto;
  387. z-index: 100000;
  388. }
  389. .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
  390. padding-top: calc(2rem + 24px);
  391. overflow: visible;
  392. display: flex;
  393. flex-direction: column;
  394. flex-wrap: nowrap;
  395. align-items: var(--navigation-layout-justification-setting, inherit);
  396. }
  397. .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
  398. .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-page-list,
  399. .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container {
  400. justify-content: flex-start;
  401. }
  402. .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-icon {
  403. display: none;
  404. }
  405. .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .has-child .submenu-container,
  406. .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .has-child .wp-block-navigation__submenu-container {
  407. opacity: 1;
  408. visibility: visible;
  409. height: auto;
  410. width: auto;
  411. overflow: initial;
  412. min-width: 200px;
  413. position: static;
  414. border: none;
  415. padding-left: 2rem;
  416. padding-right: 2rem;
  417. }
  418. .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-container,
  419. .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container {
  420. gap: inherit;
  421. }
  422. .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-container {
  423. padding-top: var(--wp--style--block-gap, 2em);
  424. }
  425. .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation-item__content {
  426. padding: 0;
  427. }
  428. .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container,
  429. .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation-item,
  430. .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-page-list {
  431. display: flex;
  432. flex-direction: column;
  433. align-items: var(--navigation-layout-justification-setting, initial);
  434. }
  435. .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item .wp-block-navigation__submenu-container,
  436. .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item,
  437. .wp-block-navigation__responsive-container.is-menu-open .wp-block-page-list {
  438. color: inherit !important;
  439. background: transparent !important;
  440. }
  441. .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container {
  442. right: auto;
  443. left: auto;
  444. }
  445. @media (min-width: 600px) {
  446. .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
  447. display: block;
  448. width: 100%;
  449. position: relative;
  450. z-index: auto;
  451. background-color: inherit;
  452. }
  453. .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) .wp-block-navigation__responsive-container-close {
  454. display: none;
  455. }
  456. .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container {
  457. left: 0;
  458. }
  459. }
  460. .wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open {
  461. background-color: #fff;
  462. color: #000;
  463. }
  464. .wp-block-navigation__toggle_button_label {
  465. font-size: 1rem;
  466. font-weight: bold;
  467. }
  468. .wp-block-navigation__responsive-container-open,
  469. .wp-block-navigation__responsive-container-close {
  470. vertical-align: middle;
  471. cursor: pointer;
  472. color: currentColor;
  473. background: transparent;
  474. border: none;
  475. margin: 0;
  476. padding: 0;
  477. }
  478. .wp-block-navigation__responsive-container-open svg,
  479. .wp-block-navigation__responsive-container-close svg {
  480. fill: currentColor;
  481. pointer-events: none;
  482. display: block;
  483. width: 24px;
  484. height: 24px;
  485. }
  486. .wp-block-navigation__responsive-container-open {
  487. display: flex;
  488. }
  489. @media (min-width: 600px) {
  490. .wp-block-navigation__responsive-container-open:not(.always-shown) {
  491. display: none;
  492. }
  493. }
  494. .wp-block-navigation__responsive-container-close {
  495. position: absolute;
  496. top: 0;
  497. right: 0;
  498. z-index: 2;
  499. }
  500. .wp-block-navigation__responsive-close {
  501. width: 100%;
  502. }
  503. .wp-block-navigation__responsive-close:focus {
  504. outline: none;
  505. }
  506. .is-menu-open .wp-block-navigation__responsive-close,
  507. .is-menu-open .wp-block-navigation__responsive-dialog,
  508. .is-menu-open .wp-block-navigation__responsive-container-content {
  509. box-sizing: border-box;
  510. }
  511. .wp-block-navigation__responsive-dialog {
  512. position: relative;
  513. }
  514. html.has-modal-open {
  515. overflow: hidden;
  516. }