You are here

image-preview.css in Drupal 10

Image preview component.

File

core/themes/claro/css/components/image-preview.css
View source
  1. /*
  2. * DO NOT EDIT THIS FILE.
  3. * See the following change record for more information,
  4. * https://www.drupal.org/node/3084859
  5. * @preserve
  6. */
  7. /**
  8. * @file
  9. * Image preview component.
  10. */
  11. :root {
  12. --color-pattern: var(--color-gray-200);
  13. --size-pattern-square: calc(7rem / 16);
  14. }
  15. /**
  16. * Image preview.
  17. */
  18. .image-preview {
  19. line-height: 0;
  20. }
  21. .image-preview__img-wrapper {
  22. display: inline-block;
  23. max-width: 100%;
  24. background-color: var(--color-white);
  25. box-shadow: inset 0 0 var(--size-pattern-square) var(--color-pattern);
  26. }
  27. .image-preview img {
  28. background-image:
  29. linear-gradient(-45deg, var(--color-pattern) 25%, transparent 26%),
  30. linear-gradient(-45deg, var(--color-pattern) 25%, transparent 26%),
  31. linear-gradient(135deg, var(--color-pattern) 25%, transparent 26%),
  32. linear-gradient(135deg, var(--color-pattern) 25%, transparent 26%);
  33. background-position:
  34. 0 0,
  35. var(--size-pattern-square) var(--size-pattern-square),
  36. var(--size-pattern-square) var(--size-pattern-square),
  37. 0 0;
  38. background-size: calc(var(--size-pattern-square) * 2) calc(var(--size-pattern-square) * 2);
  39. }
  40. @media screen and (-ms-high-contrast: active) {
  41. .image-preview img {
  42. background: none;
  43. }
  44. }
  45. /**
  46. * Don't display file icon in image widgets.
  47. */
  48. .image-widget .file.file {
  49. padding: 0; /* LTR and RTL */
  50. background: none;
  51. }