[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/blocks/image/ -> style.css (source)

   1  /**
   2   * Typography
   3   */
   4  /**
   5   * SCSS Variables.
   6   *
   7   * Please use variables from this sheet to ensure consistency across the UI.
   8   * Don't add to this sheet unless you're pretty sure the value will be reused in many places.
   9   * For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
  10   */
  11  /**
  12   * Colors
  13   */
  14  /**
  15   * Fonts & basic variables.
  16   */
  17  /**
  18   * Typography
  19   */
  20  /**
  21   * Grid System.
  22   * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
  23   */
  24  /**
  25   * Radius scale.
  26   */
  27  /**
  28   * Elevation scale.
  29   */
  30  /**
  31   * Dimensions.
  32   */
  33  /**
  34   * Mobile specific styles
  35   */
  36  /**
  37   * Editor styles.
  38   */
  39  /**
  40   * Block & Editor UI.
  41   */
  42  /**
  43   * Block paddings.
  44   */
  45  /**
  46   * React Native specific.
  47   * These variables do not appear to be used anywhere else.
  48   */
  49  /**
  50   * Breakpoints & Media Queries
  51   */
  52  /**
  53  *  Converts a hex value into the rgb equivalent.
  54  *
  55  * @param {string} hex - the hexadecimal value to convert
  56  * @return {string} comma separated rgb values
  57  */
  58  /**
  59   * Long content fade mixin
  60   *
  61   * Creates a fading overlay to signify that the content is longer
  62   * than the space allows.
  63   */
  64  /**
  65   * Breakpoint mixins
  66   */
  67  /**
  68   * Focus styles.
  69   */
  70  /**
  71   * Standard focus rings for the WordPress Design System.
  72   *
  73   * Apply `outset-ring__focus` inside the relevant pseudo-class at the call site,
  74   * e.g. `&:focus { @include outset-ring__focus(); }`.
  75   */
  76  /**
  77   * Applies editor left position to the selector passed as argument
  78   */
  79  /**
  80   * Styles that are reused verbatim in a few places
  81   */
  82  /**
  83   * Allows users to opt-out of animations via OS-level preferences.
  84   */
  85  /**
  86   * Reset default styles for JavaScript UI based pages.
  87   * This is a WP-admin agnostic reset
  88   */
  89  /**
  90   * Reset the WP Admin page styles for Gutenberg-like pages.
  91   */
  92  /**
  93   * Creates a checkerboard pattern background to indicate transparency.
  94   * @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
  95   */
  96  .wp-block-image > a,
  97  .wp-block-image > figure > a {
  98    display: inline-block;
  99    color: inherit;
 100  }
 101  .wp-block-image img {
 102    height: auto;
 103    max-width: 100%;
 104    vertical-align: bottom;
 105    box-sizing: border-box;
 106  }
 107  @media not (prefers-reduced-motion) {
 108    .wp-block-image img.hide {
 109      visibility: hidden;
 110    }
 111    .wp-block-image img.show {
 112      animation: show-content-image 0.4s;
 113    }
 114  }
 115  .wp-block-image[style*=border-radius] > a,
 116  .wp-block-image[style*=border-radius] img {
 117    border-radius: inherit;
 118  }
 119  .wp-block-image.has-custom-border img {
 120    box-sizing: border-box;
 121  }
 122  .wp-block-image.aligncenter {
 123    text-align: center;
 124  }
 125  .wp-block-image.alignfull > a, .wp-block-image.alignwide > a {
 126    width: 100%;
 127  }
 128  .wp-block-image.alignfull img, .wp-block-image.alignwide img {
 129    height: auto;
 130    width: 100%;
 131  }
 132  .wp-block-image.alignleft, .wp-block-image.alignright, .wp-block-image.aligncenter,
 133  .wp-block-image .alignleft,
 134  .wp-block-image .alignright,
 135  .wp-block-image .aligncenter {
 136    display: table;
 137  }
 138  .wp-block-image.alignleft > figcaption, .wp-block-image.alignright > figcaption, .wp-block-image.aligncenter > figcaption,
 139  .wp-block-image .alignleft > figcaption,
 140  .wp-block-image .alignright > figcaption,
 141  .wp-block-image .aligncenter > figcaption {
 142    display: table-caption;
 143    caption-side: bottom;
 144  }
 145  .wp-block-image .alignleft {
 146    /*rtl:ignore*/
 147    float: left;
 148    /*rtl:ignore*/
 149    margin-left: 0;
 150    /*rtl:ignore*/
 151    margin-right: 1em;
 152    margin-top: 0.5em;
 153    margin-bottom: 0.5em;
 154  }
 155  .wp-block-image .alignright {
 156    /*rtl:ignore*/
 157    float: right;
 158    /*rtl:ignore*/
 159    margin-right: 0;
 160    /*rtl:ignore*/
 161    margin-left: 1em;
 162    margin-top: 0.5em;
 163    margin-bottom: 0.5em;
 164  }
 165  .wp-block-image .aligncenter {
 166    margin-left: auto;
 167    margin-right: auto;
 168  }
 169  .wp-block-image :where(figcaption) {
 170    margin-top: 0.5em;
 171    margin-bottom: 1em;
 172  }
 173  .wp-block-image.is-style-circle-mask img {
 174    border-radius: 9999px;
 175  }
 176  @supports (mask-image: none) or (-webkit-mask-image: none) {
 177    .wp-block-image.is-style-circle-mask img {
 178      mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='50' cy='50' r='50'/%3E%3C/svg%3E");
 179      mask-mode: alpha;
 180      mask-repeat: no-repeat;
 181      mask-size: contain;
 182      mask-position: center;
 183      border-radius: 0;
 184    }
 185  }
 186  
 187  :root :where(.wp-block-image.is-style-rounded img, .wp-block-image .is-style-rounded img) {
 188    border-radius: 9999px;
 189  }
 190  
 191  .wp-block-image figure {
 192    margin: 0;
 193  }
 194  
 195  .wp-lightbox-container {
 196    position: relative;
 197    display: flex;
 198    flex-direction: column;
 199  }
 200  .wp-lightbox-container img {
 201    cursor: zoom-in;
 202  }
 203  .wp-lightbox-container:has(img:hover) button {
 204    opacity: 1;
 205  }
 206  .wp-lightbox-container button {
 207    opacity: 0;
 208    border: none;
 209    background-color: rgba(90, 90, 90, 0.25);
 210    backdrop-filter: blur(16px) saturate(180%);
 211    cursor: zoom-in;
 212    display: flex;
 213    justify-content: center;
 214    align-items: center;
 215    width: 20px;
 216    height: 20px;
 217    position: absolute;
 218    z-index: 100;
 219    top: 16px;
 220    right: 16px;
 221    text-align: center;
 222    padding: 0;
 223    border-radius: 4px;
 224  }
 225  @media not (prefers-reduced-motion) {
 226    .wp-lightbox-container button {
 227      transition: opacity 0.2s ease;
 228    }
 229  }
 230  .wp-lightbox-container button:focus-visible {
 231    outline: 3px auto rgba(90, 90, 90, 0.25);
 232    outline: 3px auto -webkit-focus-ring-color;
 233    outline-offset: 3px;
 234  }
 235  .wp-lightbox-container button:hover {
 236    cursor: pointer;
 237    opacity: 1;
 238  }
 239  .wp-lightbox-container button:focus {
 240    opacity: 1;
 241  }
 242  .wp-lightbox-container button:hover, .wp-lightbox-container button:focus, .wp-lightbox-container button:not(:hover):not(:active):not(.has-background) {
 243    background-color: rgba(90, 90, 90, 0.25);
 244    border: none;
 245  }
 246  
 247  .wp-lightbox-overlay {
 248    position: fixed;
 249    top: 0;
 250    left: 0;
 251    z-index: 100000;
 252    overflow: hidden;
 253    width: 100%;
 254    height: 100vh;
 255    box-sizing: border-box;
 256    visibility: hidden;
 257    cursor: zoom-out;
 258  }
 259  .wp-lightbox-overlay .wp-lightbox-close-button {
 260    font-family: inherit;
 261    position: absolute;
 262    top: calc(env(safe-area-inset-top) + 16px);
 263    right: calc(env(safe-area-inset-right) + 16px);
 264    padding: 0 4px;
 265    cursor: pointer;
 266    z-index: 5000000;
 267    min-width: 40px;
 268    min-height: 40px;
 269    display: flex;
 270    gap: 8px;
 271    align-items: center;
 272    justify-content: center;
 273    line-height: 1;
 274  }
 275  .wp-lightbox-overlay .wp-lightbox-close-button:hover, .wp-lightbox-overlay .wp-lightbox-close-button:focus, .wp-lightbox-overlay .wp-lightbox-close-button:not(:hover):not(:active):not(.has-background) {
 276    background: none;
 277    border: none;
 278  }
 279  .wp-lightbox-overlay .wp-lightbox-close-button:has(.wp-lightbox-close-text:not([hidden])) .wp-lightbox-close-icon svg {
 280    height: 1em;
 281    width: 1em;
 282  }
 283  .wp-lightbox-overlay .wp-lightbox-close-icon svg {
 284    display: block;
 285  }
 286  .wp-lightbox-overlay .wp-lightbox-navigation-button-prev,
 287  .wp-lightbox-overlay .wp-lightbox-navigation-button-next {
 288    position: absolute;
 289    padding: 0 8px;
 290    z-index: 2000002;
 291    font-family: inherit;
 292    min-width: 40px;
 293    min-height: 40px;
 294    gap: 4px;
 295    display: flex;
 296    cursor: pointer;
 297    align-items: center;
 298    justify-content: center;
 299    bottom: 16px;
 300    line-height: 1;
 301  }
 302  .wp-lightbox-overlay .wp-lightbox-navigation-button-prev[hidden],
 303  .wp-lightbox-overlay .wp-lightbox-navigation-button-next[hidden] {
 304    display: none;
 305  }
 306  @media (min-width: 960px) {
 307    .wp-lightbox-overlay .wp-lightbox-navigation-button-prev,
 308    .wp-lightbox-overlay .wp-lightbox-navigation-button-next {
 309      bottom: 50%;
 310      transform: translateY(-50%);
 311    }
 312  }
 313  .wp-lightbox-overlay .wp-lightbox-navigation-button-prev:hover, .wp-lightbox-overlay .wp-lightbox-navigation-button-prev:focus, .wp-lightbox-overlay .wp-lightbox-navigation-button-prev:not(:hover):not(:active):not(.has-background),
 314  .wp-lightbox-overlay .wp-lightbox-navigation-button-next:hover,
 315  .wp-lightbox-overlay .wp-lightbox-navigation-button-next:focus,
 316  .wp-lightbox-overlay .wp-lightbox-navigation-button-next:not(:hover):not(:active):not(.has-background) {
 317    background: none;
 318    border: none;
 319    padding: 0 8px;
 320  }
 321  .wp-lightbox-overlay .wp-lightbox-navigation-button-prev:has(.wp-lightbox-navigation-text:not([hidden])) .wp-lightbox-navigation-icon svg,
 322  .wp-lightbox-overlay .wp-lightbox-navigation-button-next:has(.wp-lightbox-navigation-text:not([hidden])) .wp-lightbox-navigation-icon svg {
 323    width: 1.5em;
 324    height: 1.5em;
 325    display: block;
 326  }
 327  .wp-lightbox-overlay .wp-lightbox-navigation-button-prev {
 328    left: calc(env(safe-area-inset-left) + 16px);
 329  }
 330  .wp-lightbox-overlay .wp-lightbox-navigation-button-next {
 331    right: calc(env(safe-area-inset-right) + 16px);
 332  }
 333  .wp-lightbox-overlay .wp-lightbox-navigation-icon svg {
 334    vertical-align: middle;
 335  }
 336  .wp-lightbox-overlay .lightbox-image-container {
 337    position: absolute;
 338    overflow: hidden;
 339    top: 50%;
 340    left: 50%;
 341    transform-origin: top left;
 342    transform: translate(calc(-50% + var(--wp--lightbox-drag-offset, 0px)), -50%);
 343    width: var(--wp--lightbox-container-width);
 344    height: var(--wp--lightbox-container-height);
 345    z-index: 2000001;
 346    cursor: default;
 347  }
 348  .wp-lightbox-overlay .wp-block-image {
 349    position: relative;
 350    transform-origin: 0 0;
 351    display: flex;
 352    width: 100%;
 353    height: 100%;
 354    justify-content: center;
 355    align-items: center;
 356    box-sizing: border-box;
 357    z-index: 3000000;
 358    margin: 0;
 359  }
 360  .wp-lightbox-overlay .wp-block-image img {
 361    min-width: var(--wp--lightbox-image-width);
 362    min-height: var(--wp--lightbox-image-height);
 363    width: var(--wp--lightbox-image-width);
 364    height: var(--wp--lightbox-image-height);
 365  }
 366  .wp-lightbox-overlay .wp-block-image figcaption {
 367    display: none;
 368  }
 369  .wp-lightbox-overlay .lightbox-thumbnail-container {
 370    --wp--lightbox-image-width: var(--wp--lightbox-thumbnail-width);
 371    --wp--lightbox-image-height: var(--wp--lightbox-thumbnail-height);
 372  }
 373  .wp-lightbox-overlay button {
 374    border: none;
 375    background: none;
 376  }
 377  .wp-lightbox-overlay .scrim {
 378    width: 100%;
 379    height: 100%;
 380    position: absolute;
 381    z-index: 2000000;
 382    background-color: rgb(255, 255, 255);
 383    opacity: 0.9;
 384  }
 385  .wp-lightbox-overlay.active {
 386    visibility: visible;
 387  }
 388  @media not (prefers-reduced-motion) {
 389    .wp-lightbox-overlay.active {
 390      animation: both turn-on-visibility 0.25s;
 391    }
 392  }
 393  @media not (prefers-reduced-motion) {
 394    .wp-lightbox-overlay.active img {
 395      animation: both turn-on-visibility 0.35s;
 396    }
 397  }
 398  @media not (prefers-reduced-motion) {
 399    .wp-lightbox-overlay.show-closing-animation:not(.active) {
 400      animation: both turn-off-visibility 0.35s;
 401    }
 402  }
 403  @media not (prefers-reduced-motion) {
 404    .wp-lightbox-overlay.show-closing-animation:not(.active) img {
 405      animation: both turn-off-visibility 0.25s;
 406    }
 407  }
 408  @media not (prefers-reduced-motion) {
 409    .wp-lightbox-overlay.zoom.active {
 410      opacity: 1;
 411      visibility: visible;
 412      animation: none;
 413    }
 414    .wp-lightbox-overlay.zoom.active .lightbox-image-container {
 415      animation: lightbox-zoom-in 0.4s;
 416    }
 417    .wp-lightbox-overlay.zoom.active .lightbox-image-container img {
 418      animation: none;
 419    }
 420    .wp-lightbox-overlay.zoom.active .scrim {
 421      animation: turn-on-visibility 0.4s forwards;
 422    }
 423    .wp-lightbox-overlay.zoom.show-closing-animation:not(.active) {
 424      animation: none;
 425    }
 426    .wp-lightbox-overlay.zoom.show-closing-animation:not(.active) .lightbox-image-container {
 427      animation: lightbox-zoom-out 0.4s;
 428    }
 429    .wp-lightbox-overlay.zoom.show-closing-animation:not(.active) .lightbox-image-container img {
 430      animation: none;
 431    }
 432    .wp-lightbox-overlay.zoom.show-closing-animation:not(.active) .scrim {
 433      animation: turn-off-visibility 0.4s forwards;
 434    }
 435  }
 436  
 437  @keyframes show-content-image {
 438    0% {
 439      visibility: hidden;
 440    }
 441    99% {
 442      visibility: hidden;
 443    }
 444    100% {
 445      visibility: visible;
 446    }
 447  }
 448  @keyframes turn-on-visibility {
 449    0% {
 450      opacity: 0;
 451    }
 452    100% {
 453      opacity: 1;
 454    }
 455  }
 456  @keyframes turn-off-visibility {
 457    0% {
 458      opacity: 1;
 459      visibility: visible;
 460    }
 461    99% {
 462      opacity: 0;
 463      visibility: visible;
 464    }
 465    100% {
 466      opacity: 0;
 467      visibility: hidden;
 468    }
 469  }
 470  @keyframes lightbox-zoom-in {
 471    0% {
 472      clip-path: var(--wp--lightbox-initial-clip);
 473      transform: translate(calc((-100vw + var(--wp--lightbox-scrollbar-width)) / 2 + var(--wp--lightbox-initial-left-position)), calc(-50vh + var(--wp--lightbox-initial-top-position))) scale(var(--wp--lightbox-scale));
 474    }
 475    100% {
 476      clip-path: inset(0);
 477      transform: translate(-50%, -50%) scale(1, 1);
 478    }
 479  }
 480  @keyframes lightbox-zoom-out {
 481    0% {
 482      visibility: visible;
 483      clip-path: inset(0);
 484      transform: translate(-50%, -50%) scale(1, 1);
 485    }
 486    99% {
 487      visibility: visible;
 488    }
 489    100% {
 490      visibility: hidden;
 491      clip-path: var(--wp--lightbox-initial-clip);
 492      transform: translate(calc((-100vw + var(--wp--lightbox-scrollbar-width)) / 2 + var(--wp--lightbox-initial-left-position)), calc(-50vh + var(--wp--lightbox-initial-top-position))) scale(var(--wp--lightbox-scale));
 493    }
 494  }


Generated : Wed Nov 4 08:20:38 2026 Cross-referenced by PHPXref