_viewer-360.scss 710 B

12345678910111213141516171819202122232425262728293031323334
  1. // 360 Degree Viewer
  2. // Mixin: Viewer slider sizes
  3. @mixin viewer-slider-size($image-number: 36) {
  4. @for $s from 1 through ($image-number) {
  5. .viewer-slider[max='#{$image-number}'][value='#{$s}'] + .viewer-image {
  6. background-position-y: percentage((($s)-1) * 1/(($image-number)-1));
  7. }
  8. }
  9. }
  10. .viewer-360 {
  11. align-items: center;
  12. display: flex;
  13. flex-direction: column;
  14. // Copy and add more numbers if you need
  15. @include viewer-slider-size(36);
  16. .viewer-slider {
  17. cursor: ew-resize;
  18. margin: 1rem;
  19. order: 2;
  20. width: 60%;
  21. }
  22. .viewer-image {
  23. background-position-y: 0;
  24. background-repeat: no-repeat;
  25. background-size: 100%;
  26. max-width: 100%;
  27. order: 1;
  28. }
  29. }