image-preview.css 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. [data-component="image-preview"] {
  2. position: fixed;
  3. inset: 0;
  4. z-index: 50;
  5. display: flex;
  6. align-items: center;
  7. justify-content: center;
  8. [data-slot="image-preview-container"] {
  9. position: relative;
  10. z-index: 50;
  11. width: min(calc(100vw - 32px), 90vw);
  12. max-width: 1200px;
  13. height: min(calc(100vh - 32px), 90vh);
  14. display: flex;
  15. flex-direction: column;
  16. align-items: center;
  17. justify-content: center;
  18. [data-slot="image-preview-content"] {
  19. display: flex;
  20. flex-direction: column;
  21. align-items: center;
  22. width: 100%;
  23. max-height: 100%;
  24. border-radius: var(--radius-lg);
  25. background: var(--surface-raised-stronger-non-alpha);
  26. box-shadow:
  27. 0 15px 45px 0 rgba(19, 16, 16, 0.35),
  28. 0 3.35px 10.051px 0 rgba(19, 16, 16, 0.25),
  29. 0 0.998px 2.993px 0 rgba(19, 16, 16, 0.2);
  30. overflow: hidden;
  31. &:focus-visible {
  32. outline: none;
  33. }
  34. [data-slot="image-preview-header"] {
  35. display: flex;
  36. padding: 8px 8px 0;
  37. justify-content: flex-end;
  38. align-items: center;
  39. align-self: stretch;
  40. }
  41. [data-slot="image-preview-body"] {
  42. width: 100%;
  43. display: flex;
  44. align-items: center;
  45. justify-content: center;
  46. padding: 16px;
  47. overflow: auto;
  48. }
  49. [data-slot="image-preview-image"] {
  50. max-width: 100%;
  51. max-height: calc(90vh - 100px);
  52. object-fit: contain;
  53. border-radius: var(--radius-md);
  54. }
  55. }
  56. }
  57. }