editor.css 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  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-image.wp-block-image.is-selected .components-placeholder {
  78. color: #1e1e1e;
  79. background-color: #fff;
  80. box-shadow: inset 0 0 0 1px #1e1e1e;
  81. border: none;
  82. filter: none;
  83. border-radius: 2px;
  84. }
  85. .wp-block-image.wp-block-image.is-selected .components-placeholder > svg {
  86. opacity: 0;
  87. }
  88. .wp-block-image.wp-block-image.is-selected .components-placeholder .components-placeholder__illustration {
  89. display: none;
  90. }
  91. .wp-block-image.wp-block-image .components-placeholder__label,
  92. .wp-block-image.wp-block-image .components-placeholder__instructions,
  93. .wp-block-image.wp-block-image .components-button {
  94. transition: none;
  95. }
  96. figure.wp-block-image:not(.wp-block) {
  97. margin: 0;
  98. }
  99. .wp-block-image {
  100. position: relative;
  101. }
  102. .wp-block-image .is-applying img, .wp-block-image.is-transient img {
  103. opacity: 0.3;
  104. }
  105. .wp-block-image figcaption img {
  106. display: inline;
  107. }
  108. .wp-block-image .components-spinner {
  109. position: absolute;
  110. top: 50%;
  111. left: 50%;
  112. transform: translate(-50%, -50%);
  113. }
  114. .wp-block-image .components-resizable-box__container {
  115. display: inline-block;
  116. }
  117. .wp-block-image .components-resizable-box__container img {
  118. display: block;
  119. width: inherit;
  120. height: inherit;
  121. }
  122. .block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal {
  123. position: absolute;
  124. left: 0;
  125. right: 0;
  126. margin: -1px 0;
  127. }
  128. @media (min-width: 600px) {
  129. .block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal {
  130. margin: -1px;
  131. }
  132. }
  133. [data-align=wide] > .wp-block-image img,
  134. [data-align=full] > .wp-block-image img {
  135. height: auto;
  136. width: 100%;
  137. }
  138. .wp-block[data-align=left] > .wp-block-image,
  139. .wp-block[data-align=center] > .wp-block-image,
  140. .wp-block[data-align=right] > .wp-block-image {
  141. display: table;
  142. }
  143. .wp-block[data-align=left] > .wp-block-image > figcaption,
  144. .wp-block[data-align=center] > .wp-block-image > figcaption,
  145. .wp-block[data-align=right] > .wp-block-image > figcaption {
  146. display: table-caption;
  147. caption-side: bottom;
  148. }
  149. .wp-block[data-align=left] > .wp-block-image {
  150. margin-right: 1em;
  151. margin-left: 0;
  152. margin-top: 0.5em;
  153. margin-bottom: 0.5em;
  154. }
  155. .wp-block[data-align=right] > .wp-block-image {
  156. margin-left: 1em;
  157. margin-right: 0;
  158. margin-top: 0.5em;
  159. margin-bottom: 0.5em;
  160. }
  161. .wp-block[data-align=center] > .wp-block-image {
  162. margin-left: auto;
  163. margin-right: auto;
  164. text-align: center;
  165. }
  166. .wp-block-image__crop-area {
  167. position: relative;
  168. max-width: 100%;
  169. width: 100%;
  170. overflow: hidden;
  171. }
  172. .wp-block-image__crop-area .reactEasyCrop_Container .reactEasyCrop_Image {
  173. border: none;
  174. }
  175. .wp-block-image__crop-icon {
  176. padding: 0 8px;
  177. min-width: 48px;
  178. display: flex;
  179. justify-content: center;
  180. align-items: center;
  181. }
  182. .wp-block-image__crop-icon svg {
  183. fill: currentColor;
  184. }
  185. .wp-block-image__zoom .components-popover__content {
  186. min-width: 260px;
  187. overflow: visible !important;
  188. }
  189. .wp-block-image__zoom .components-range-control {
  190. flex: 1;
  191. }
  192. .wp-block-image__zoom .components-base-control__field {
  193. display: flex;
  194. margin-bottom: 0;
  195. flex-direction: column;
  196. align-items: flex-start;
  197. }
  198. .wp-block-image__aspect-ratio {
  199. height: 46px;
  200. margin-bottom: -8px;
  201. display: flex;
  202. align-items: center;
  203. }
  204. .wp-block-image__aspect-ratio .components-button {
  205. width: 36px;
  206. padding-left: 0;
  207. padding-right: 0;
  208. }