editor.css 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  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[data-align=center] > .wp-block-site-logo,
  78. .wp-block-site-logo.aligncenter > div {
  79. display: table;
  80. margin-left: auto;
  81. margin-right: auto;
  82. }
  83. .wp-block-site-logo a {
  84. pointer-events: none;
  85. }
  86. .wp-block-site-logo .custom-logo-link {
  87. cursor: inherit;
  88. }
  89. .wp-block-site-logo .custom-logo-link:focus {
  90. box-shadow: none;
  91. }
  92. .wp-block-site-logo .custom-logo-link.is-transient img {
  93. opacity: 0.3;
  94. }
  95. .wp-block-site-logo img {
  96. display: block;
  97. height: auto;
  98. max-width: 100%;
  99. }
  100. .wp-block-site-logo.wp-block-site-logo .components-placeholder,
  101. .wp-block-site-logo.wp-block-site-logo .components-resizable-box__container {
  102. border-radius: inherit;
  103. }
  104. .wp-block-site-logo.wp-block-site-logo.is-default-size .components-placeholder {
  105. height: 120px;
  106. width: 120px;
  107. }
  108. .wp-block-site-logo.wp-block-site-logo .components-placeholder {
  109. display: flex;
  110. justify-content: center;
  111. align-items: center;
  112. box-shadow: none;
  113. padding: 0;
  114. min-height: 48px;
  115. min-width: 48px;
  116. height: 100%;
  117. width: 100%;
  118. color: currentColor;
  119. background: transparent;
  120. }
  121. .wp-block-site-logo.wp-block-site-logo .components-placeholder .components-form-file-upload {
  122. display: none;
  123. }
  124. .wp-block-site-logo.wp-block-site-logo .components-placeholder .components-placeholder__preview {
  125. position: absolute;
  126. top: 4px;
  127. right: 4px;
  128. bottom: 4px;
  129. left: 4px;
  130. background: rgba(255, 255, 255, 0.8);
  131. display: flex;
  132. align-items: center;
  133. justify-content: center;
  134. }
  135. .wp-block-site-logo.wp-block-site-logo .components-placeholder .components-drop-zone__content-text {
  136. display: none;
  137. }
  138. .wp-block-site-logo.wp-block-site-logo .components-placeholder::before {
  139. content: "";
  140. display: block;
  141. position: absolute;
  142. top: 0;
  143. right: 0;
  144. bottom: 0;
  145. left: 0;
  146. border: 1px dashed currentColor;
  147. opacity: 0.4;
  148. pointer-events: none;
  149. border-radius: inherit;
  150. }
  151. .wp-block-site-logo.wp-block-site-logo .components-placeholder .components-placeholder__fieldset {
  152. width: auto;
  153. }
  154. .wp-block-site-logo.wp-block-site-logo .components-placeholder .components-button.components-button {
  155. color: inherit;
  156. padding: 0;
  157. display: flex;
  158. justify-content: center;
  159. align-items: center;
  160. width: 48px;
  161. height: 48px;
  162. border-radius: 50%;
  163. position: relative;
  164. visibility: hidden;
  165. background: transparent;
  166. transition: all 0.1s linear;
  167. }
  168. @media (prefers-reduced-motion: reduce) {
  169. .wp-block-site-logo.wp-block-site-logo .components-placeholder .components-button.components-button {
  170. transition-duration: 0s;
  171. transition-delay: 0s;
  172. }
  173. }
  174. .wp-block-site-logo.wp-block-site-logo .components-placeholder .components-button.components-button > svg {
  175. color: #fff;
  176. }
  177. .wp-block-site-logo.wp-block-site-logo .components-placeholder .components-placeholder__illustration {
  178. position: absolute;
  179. top: 0;
  180. right: 0;
  181. bottom: 0;
  182. left: 0;
  183. width: 100%;
  184. height: 100%;
  185. stroke: currentColor;
  186. stroke-dasharray: 3;
  187. opacity: 0.4;
  188. }
  189. .wp-block-site-logo.wp-block-site-logo.is-selected .components-button.components-button {
  190. background: var(--wp-admin-theme-color);
  191. border-color: var(--wp-admin-theme-color);
  192. border-style: solid;
  193. color: #fff;
  194. opacity: 1;
  195. visibility: visible;
  196. }