You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.2 KiB

3 months ago
  1. @use 'mixins/mixins' as *;
  2. @use 'common/var' as *;
  3. @include b(carousel) {
  4. @include e(item) {
  5. position: absolute;
  6. top: 0;
  7. left: 0;
  8. width: 100%;
  9. height: 100%;
  10. display: inline-block;
  11. overflow: hidden;
  12. z-index: calc(getCssVar('index', 'normal') - 1);
  13. @include when(active) {
  14. z-index: calc(getCssVar('index', 'normal') - 1);
  15. }
  16. @include when(animating) {
  17. transition: transform 0.4s ease-in-out;
  18. }
  19. @include m(card) {
  20. width: 50%;
  21. transition: transform 0.4s ease-in-out;
  22. &.is-in-stage {
  23. cursor: pointer;
  24. z-index: getCssVar('index', 'normal');
  25. &:hover .#{$namespace}-carousel__mask,
  26. &.is-hover .#{$namespace}-carousel__mask {
  27. opacity: 0.12;
  28. }
  29. }
  30. &.is-active {
  31. z-index: calc(getCssVar('index', 'normal') + 1);
  32. }
  33. }
  34. @include m(card-vertical) {
  35. width: 100%;
  36. height: 50%;
  37. }
  38. }
  39. @include e(mask) {
  40. position: absolute;
  41. width: 100%;
  42. height: 100%;
  43. top: 0;
  44. left: 0;
  45. background-color: getCssVar('color', 'white');
  46. opacity: 0.24;
  47. transition: getCssVar('transition-duration', 'fast');
  48. }
  49. }