1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | @import '../../globals/scss/vars';
|
9 | @import '../../globals/scss/helper-mixins';
|
10 | @import '../../globals/scss/functions';
|
11 | @import '../../globals/scss/vendor/@carbon/elements/scss/import-once/import-once';
|
12 | @import '../../globals/scss/css--reset';
|
13 | @import '../../globals/scss/css--typography';
|
14 |
|
15 | @mixin carousel {
|
16 | @include deprecate(
|
17 | 'The `carousel` component in `carbon-components` has been deprecated. ' + 'It will be removed in the next major release.'
|
18 | ) {
|
19 | .#{$prefix}--carousel {
|
20 | display: flex;
|
21 | align-items: center;
|
22 | }
|
23 | .#{$prefix}--carousel-container {
|
24 | max-width: rem(810px);
|
25 | overflow: hidden;
|
26 | padding: 0 1px;
|
27 | }
|
28 | .#{$prefix}--filmstrip {
|
29 | display: flex;
|
30 | justify-content: space-between;
|
31 | transition: transform 100ms $carbon--ease-in;
|
32 | padding: rem(24px) 0;
|
33 | width: auto;
|
34 | }
|
35 | .#{$prefix}--filmstrip-btn {
|
36 | @include button-reset;
|
37 | height: rem(20px);
|
38 | width: rem(20px);
|
39 | margin-bottom: 1rem;
|
40 | margin-right: rem(3px);
|
41 | margin-left: rem(3px);
|
42 |
|
43 | &:hover {
|
44 | cursor: pointer;
|
45 | }
|
46 |
|
47 | &:focus {
|
48 | @include focus-outline;
|
49 | }
|
50 | }
|
51 |
|
52 | .#{$prefix}--carousel__btn {
|
53 | @include button-reset(false);
|
54 | cursor: pointer;
|
55 | padding: 0;
|
56 |
|
57 | &:first-child {
|
58 | margin-right: 1.25rem;
|
59 | }
|
60 |
|
61 | &:last-child {
|
62 | margin-left: 1.25rem;
|
63 | }
|
64 |
|
65 | &:focus {
|
66 | @include focus-outline;
|
67 | }
|
68 |
|
69 | &:last-of-type {
|
70 | transform: rotate(180deg);
|
71 | }
|
72 |
|
73 | svg {
|
74 | height: rem(24px);
|
75 | width: rem(16px);
|
76 | fill: $brand-01;
|
77 | }
|
78 | }
|
79 | .#{$prefix}--carousel__item {
|
80 | @include button-reset;
|
81 | padding: 0;
|
82 | line-height: 0;
|
83 | margin-right: rem(20px);
|
84 | cursor: pointer;
|
85 |
|
86 | &:hover,
|
87 | &:focus {
|
88 | @include focus-outline;
|
89 | }
|
90 | }
|
91 | .#{$prefix}--carousel__item--active {
|
92 | @include focus-outline;
|
93 | }
|
94 | }
|
95 | }
|
96 |
|
97 | @include exports('carousel') {
|
98 | @if not(feature-flag-enabled('breaking-changes-x')) {
|
99 | @include carousel;
|
100 | }
|
101 | }
|