| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415 |
- @import './animation.scss';
- @import './variables.scss';
- $module: #{$prefix}-carousel;
- .#{$module} {
- position: relative;
- overflow: hidden;
- &-content {
- width: 100%;
- height: 100%;
- overflow: hidden;
- position: relative;
- &-item {
- position: absolute;
- left: 0;
- top: 0;
- width: 100%;
- height: 100%;
- overflow: hidden;
- &-current {
- z-index: 1;
- }
- }
- &-fade {
- > * {
- opacity: 0;
- }
- .#{$module}-content-item-current {
- opacity: 1;
- }
- }
- &-slide {
- & > *:not(.#{$module}-content-item-current) {
- visibility: hidden;
- }
- .#{$module}-content-item-slide-out {
- display: block;
- animation: #{$module}-content-item-keyframe-slide-out;
- }
- .#{$module}-content-item-slide-in {
- display: block;
- animation: #{$module}-content-item-keyframe-slide-in;
- }
- }
- &-reverse {
- .#{$module}-content-item-slide-out {
- animation: #{$module}-content-item-keyframe-slide-out-reverse;
- }
- .#{$module}-content-item-slide-in {
- animation: #{$module}-content-item-keyframe-slide-in-reverse;
- }
- }
- }
- &-indicator {
- display: flex;
- align-items: flex-end;
- z-index: 2;
- &-left {
- position: absolute;
- left: $spacing-carousel_indicator-padding;
- bottom: $spacing-carousel_indicator-padding;
- }
- &-center {
- position: absolute;
- left: 50%;
- bottom: $spacing-carousel_indicator-padding;
- transform: translate(-50%);
- }
- &-right {
- position: absolute;
- right: $spacing-carousel_indicator-padding;
- bottom: $spacing-carousel_indicator-padding;
- }
- &-dot {
- .#{$module}-indicator-item {
- border-radius: $radius-carousel_indicator_dot;
- cursor: pointer;
- &:not(:last-child) {
- margin-right: $spacing-carousel_indicator_dot-marginX;
- }
- &-small {
- width: $width-carousel_indicator_dot_small;
- height: $width-carousel_indicator_dot_small;
- }
- &-medium {
- width: $width-carousel_indicator_dot_medium;
- height: $width-carousel_indicator_dot_medium;
- }
- &-primary {
- background-color: $color-carousel_indicator_theme_primary-bg-default;
- transition: background-color $transition_duration-carousel_indicator-bg
- $transition_function-carousel_indicator-bg $transition_delay-carousel_indicator-bg;
- &.#{$module}-indicator-item-active {
- background: $color-carousel_indicator_theme_primary-bg-active;
- }
- &:hover {
- background-color: $color-carousel_indicator_theme_primary-bg-hover;
- }
- &:active {
- background: $color-carousel_indicator_theme_primary-bg-active;
- }
- }
- &-light {
- background-color: $color-carousel_indicator_theme_light-bg-default;
- transition: background-color $transition_duration-carousel_indicator-bg
- $transition_function-carousel_indicator-bg $transition_delay-carousel_indicator-bg;
- &.#{$module}-indicator-item-active {
- background: $color-carousel_indicator_theme_light-bg-active;
- }
- &:hover {
- background-color: $color-carousel_indicator_theme_light-bg-hover;
- }
- &:active {
- background: $color-carousel_indicator_theme_light-bg-active;
- }
- }
- &-dark {
- background-color: $color-carousel_indicator_theme_dark-bg-default;
- transition: background-color $transition_duration-carousel_indicator-bg
- $transition_function-carousel_indicator-bg $transition_delay-carousel_indicator-bg;
- &.#{$module}-indicator-item-active {
- background-color: $color-carousel_indicator_theme_dark-bg-active;
- }
- &:hover {
- background-color: $color-carousel_indicator_theme_dark-bg-hover;
- }
- &:active {
- background: $color-carousel_indicator_theme_dark-bg-active;
- }
- }
- }
- }
- &-line {
- width: $width-carousel_indicator_line;
- .#{$module}-indicator-item {
- flex: 1;
- cursor: pointer;
- &:not(:last-child) {
- margin-right: $spacing-carousel_indicator_line-marginX;
- }
- &-small {
- height: $height-carousel_indicator_line_small;
- }
- &-medium {
- height: $height-carousel_indicator_line_medium;
- }
- &-primary {
- background-color: $color-carousel_indicator_theme_primary-bg-default;
- &.#{$module}-indicator-item-active {
- background: $color-carousel_indicator_theme_primary-bg-active;
- }
- &:hover {
- background-color: $color-carousel_indicator_theme_primary-bg-hover;
- }
- &:active {
- background: $color-carousel_indicator_theme_primary-bg-active;
- }
- }
- &-light {
- background-color: $color-carousel_indicator_theme_light-bg-default;
- &.#{$module}-indicator-item-active {
- background: $color-carousel_indicator_theme_light-bg-active;
- }
- &:hover {
- background-color: $color-carousel_indicator_theme_light-bg-hover;
- }
- &:active {
- background: $color-carousel_indicator_theme_light-bg-active;
- }
- }
- &-dark {
- background-color: $color-carousel_indicator_theme_dark-bg-default;
- &.#{$module}-indicator-item-active {
- background: $color-carousel_indicator_theme_dark-bg-active;
- }
- &:hover {
- background-color: $color-carousel_indicator_theme_dark-bg-hover;
- }
- &:active {
- background: $color-carousel_indicator_theme_dark-bg-active;
- }
- }
- }
- }
- &-columnar {
- .#{$module}-indicator-item {
- cursor: pointer;
- &:not(:last-child) {
- margin-right: $spacing-carousel_indicator_columnar-marginX;
- }
- &-small {
- width: $width-carousel_indicator_columnar_small;
- height: $height-carousel_indicator_columnar_small_default;
- &.#{$module}-indicator-item-active {
- height: $height-carousel_indicator_columnar_small_active;
- }
- }
- &-medium {
- width: $width-carousel_indicator_columnar_medium;
- height: $height-carousel_indicator_columnar_medium_default;
- &.#{$module}-indicator-item-active {
- height: $height-carousel_indicator_columnar_medium_active;
- }
- }
- &-primary {
- background-color: $color-carousel_indicator_theme_primary-bg-default;
- &.#{$module}-indicator-item-active {
- background: $color-carousel_indicator_theme_primary-bg-active;
- }
- &:hover {
- background-color: $color-carousel_indicator_theme_primary-bg-hover;
- }
- &:active {
- background: $color-carousel_indicator_theme_primary-bg-active;
- }
- }
- &-light {
- background-color: $color-carousel_indicator_theme_light-bg-default;
- &.#{$module}-indicator-item-active {
- background: $color-carousel_indicator_theme_light-bg-active;
- }
- &:hover {
- background-color: $color-carousel_indicator_theme_light-bg-hover;
- }
- &:active {
- background: $color-carousel_indicator_theme_light-bg-active;
- }
- }
- &-dark {
- background-color: $color-carousel_indicator_theme_dark-bg-default;
- &.#{$module}-indicator-item-active {
- background: $color-carousel_indicator_theme_dark-bg-active;
- }
- &:hover {
- background-color: $color-carousel_indicator_theme_dark-bg-hover;
- }
- &:active {
- background: $color-carousel_indicator_theme_dark-bg-active;
- }
- }
- }
- }
- }
- &-arrow {
- display: flex;
- font-size: $width-carousel_arrow;
- cursor: pointer;
- &-prev {
- position: absolute;
- top: 50%;
- left: $spacing-carousel_arrow-left;
- transform: translateY(-50%);
- z-index: 2;
- }
- &-next {
- position: absolute;
- top: 50%;
- right: $spacing-carousel_arrow-right;
- transform: translateY(-50%);
- z-index: 2;
- }
- &-light {
- color: $color-carousel_arrow_theme_light-bg-default;
- transition: color $transition_duration-carousel_arrow-bg $transition_funciton_carousel_arrow-bg
- $transition_delay-carousel_arrow-bg;
- &:hover {
- color: $color-carousel_arrow_theme_light-bg-hover;
- }
- }
- &-primary {
- color: $color-carousel_arrow_theme_primary-bg-default;
- transition: color $transition_duration-carousel_arrow-bg $transition_funciton_carousel_arrow-bg
- $transition_delay-carousel_arrow-bg;
- &:hover {
- color: $color-carousel_arrow_theme_primary-bg-hover;
- }
- }
- &-dark {
- color: $color-carousel_arrow_theme_dark-bg-default;
- transition: color $transition_duration-carousel_arrow-bg $transition_funciton_carousel_arrow-bg
- $transition_delay-carousel_arrow-bg;
- &:hover {
- color: $color-carousel_arrow_theme_dark-bg-hover;
- }
- }
- }
- &-arrow-hover div {
- z-index: 2;
- opacity: 0;
- }
- &:hover {
- .#{$module}-arrow-hover div {
- opacity: 1;
- }
- }
- }
- @keyframes #{$module}-content-item-keyframe-slide-in {
- from {
- transform: translateX(100%);
- }
- to {
- transform: translateX(0);
- }
- }
- @keyframes #{$module}-content-item-keyframe-slide-out {
- from {
- transform: translateX(0);
- }
- to {
- transform: translateX(-100%);
- }
- }
- @keyframes #{$module}-content-item-keyframe-slide-in-reverse {
- from {
- transform: translateX(-100%);
- }
- to {
- transform: translateX(0);
- }
- }
- @keyframes #{$module}-content-item-keyframe-slide-out-reverse {
- from {
- transform: translateX(0);
- }
- to {
- transform: translateX(100%);
- }
- }
- @import './rtl.scss';
|