image-preview.css

Same filename in other branches
  1. 9 core/themes/claro/css/components/image-preview.css
  2. 8.9.x core/themes/claro/css/components/image-preview.css
  3. 10 core/themes/claro/css/components/image-preview.css

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 {
  22. background-image: linear-gradient(-45deg, var(--color-pattern) 25%, transparent 26%), linear-gradient(-45deg, var(--color-pattern) 25%, transparent 26%), linear-gradient(135deg, var(--color-pattern) 25%, transparent 26%), linear-gradient(135deg, var(--color-pattern) 25%, transparent 26%);
  23. background-position:
  24. 0 0,
  25. var(--size-pattern-square) var(--size-pattern-square),
  26. var(--size-pattern-square) var(--size-pattern-square),
  27. 0 0;
  28. background-size: calc(var(--size-pattern-square) * 2) calc(var(--size-pattern-square) * 2);
  29. }
  30. .image-preview__img-wrapper {
  31. display: inline-block;
  32. max-width: 100%;
  33. background-color: var(--color-white);
  34. box-shadow: inset 0 0 var(--size-pattern-square) var(--color-pattern);
  35. }
  36. /**
  37. * Don't display file icon in image widgets.
  38. */
  39. .image-widget .file.file {
  40. padding: 0;
  41. background: none;
  42. }

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.