|
13 | 13 |
|
14 | 14 | @mixin card {
|
15 | 15 | .#{$prefix}--card,
|
16 |
| - :host(#{$dds-prefix}-card) { |
| 16 | + :host(#{$dds-prefix}-card), |
| 17 | + :host(#{$dds-prefix}-card-cta) { |
17 | 18 | background-color: $ui-01;
|
18 | 19 | text-decoration: none;
|
19 | 20 | display: flex;
|
|
54 | 55 | margin-bottom: $carbon--spacing-03;
|
55 | 56 | color: $text-02;
|
56 | 57 | }
|
57 |
| - ::slotted(svg[slot='footer']), |
58 |
| - .#{$prefix}--card__cta, |
59 |
| - .#{$prefix}--card__cta a, |
60 |
| - .#{$prefix}--card__cta a:visited { |
61 |
| - color: $interactive-04; |
62 |
| - } |
63 |
| - |
64 |
| - .#{$prefix}--card__cta__copy { |
65 |
| - margin-right: $carbon--spacing-03; |
66 |
| - color: $interactive-04; |
67 |
| - @include carbon--type-style('body-short-02'); |
68 |
| - } |
69 |
| - |
70 |
| - .#{$prefix}--card__footer, |
71 |
| - :host(#{$dds-prefix}-feature-card-footer) { |
72 |
| - display: flex; |
73 |
| - margin-top: auto; |
74 |
| - |
75 |
| - .#{$prefix}--card__footer__copy { |
76 |
| - margin-bottom: -$carbon--spacing-01; |
77 |
| - } |
78 |
| - |
79 |
| - svg { |
80 |
| - fill: currentColor; |
81 |
| - display: block; |
82 |
| - align-self: center; |
83 |
| - min-width: 20px; |
84 |
| - } |
85 |
| - } |
86 |
| - |
87 |
| - .#{$prefix}--card__footer__icon-left { |
88 |
| - justify-content: flex-end; |
89 |
| - flex-direction: row-reverse; |
90 |
| - |
91 |
| - .#{$prefix}--card__cta { |
92 |
| - margin-right: $carbon--spacing-03; |
93 |
| - } |
94 |
| - |
95 |
| - .#{$prefix}--card__cta__copy { |
96 |
| - margin-right: 0; |
97 |
| - } |
98 |
| - } |
99 | 58 |
|
100 | 59 | .#{$prefix}--card:focus,
|
101 | 60 | .#{$prefix}--card:visited,
|
|
146 | 105 | }
|
147 | 106 | }
|
148 | 107 |
|
| 108 | + .#{$prefix}--card .#{$prefix}--card__cta, |
| 109 | + .#{$prefix}--card .#{$prefix}--card__cta a, |
| 110 | + .#{$prefix}--card .#{$prefix}--card__cta a:visited, |
| 111 | + .#{$prefix}--card ::slotted(svg[slot='footer']), |
| 112 | + :host(#{$dds-prefix}-card-footer) |
| 113 | + .#{$dds-prefix}-ce--card__footer |
| 114 | + ::slotted(svg[slot='icon']), |
| 115 | + :host(#{$dds-prefix}-card-cta-footer) |
| 116 | + .#{$dds-prefix}-ce--card__footer |
| 117 | + ::slotted(svg[slot='icon']) { |
| 118 | + color: $interactive-04; |
| 119 | + } |
| 120 | + |
| 121 | + .#{$prefix}--card .#{$prefix}--card__footer, |
| 122 | + :host(#{$dds-prefix}-card-footer), |
| 123 | + :host(#{$dds-prefix}-card-cta-footer), |
| 124 | + :host(#{$dds-prefix}-feature-card-footer), |
| 125 | + :host(#{$dds-prefix}-feature-cta-footer) { |
| 126 | + margin-top: auto; /* Moves the footer down to the bottom in the card */ |
| 127 | + |
| 128 | + .#{$prefix}--card__cta__copy { |
| 129 | + margin-right: $carbon--spacing-03; |
| 130 | + color: $interactive-04; |
| 131 | + @include carbon--type-style('body-short-02'); |
| 132 | + } |
| 133 | + |
| 134 | + .#{$prefix}--card__footer__copy { |
| 135 | + margin-bottom: -$carbon--spacing-01; |
| 136 | + } |
| 137 | + |
| 138 | + svg, |
| 139 | + ::slotted(svg[slot='icon']) { |
| 140 | + display: block; |
| 141 | + min-width: 20px; |
| 142 | + } |
| 143 | + |
| 144 | + .#{$prefix}--card__footer__icon-left { |
| 145 | + justify-content: flex-end; |
| 146 | + flex-direction: row-reverse; |
| 147 | + |
| 148 | + svg.#{$prefix}--card__cta, |
| 149 | + ::slotted(svg[slot='icon']) { |
| 150 | + margin-right: $carbon--spacing-03; |
| 151 | + } |
| 152 | + |
| 153 | + .#{$prefix}--card__cta__copy { |
| 154 | + margin-right: 0; |
| 155 | + } |
| 156 | + } |
| 157 | + } |
| 158 | + |
| 159 | + .#{$prefix}--card .#{$prefix}--card__footer, |
| 160 | + .#{$dds-prefix}-ce--card__footer { |
| 161 | + display: flex; |
| 162 | + } |
| 163 | + |
| 164 | + .#{$prefix}--card .#{$prefix}--card__footer svg, |
| 165 | + .#{$dds-prefix}-ce--card__footer ::slotted(svg[slot='icon']) { |
| 166 | + fill: currentColor; |
| 167 | + align-self: center; |
| 168 | + } |
| 169 | + |
149 | 170 | .#{$prefix}--card--inverse,
|
150 | 171 | :host(#{$dds-prefix}-card)[color-scheme='inverse'] {
|
151 | 172 | background-color: $inverse-02;
|
|
162 | 183 | &:hover {
|
163 | 184 | background-color: $inverse-hover-ui;
|
164 | 185 | }
|
| 186 | + } |
165 | 187 |
|
166 |
| - .#{$prefix}--card__cta, |
167 |
| - .#{$prefix}--card__cta a, |
168 |
| - .#{$prefix}--card__cta a:visited, |
169 |
| - .#{$prefix}--card__cta__copy { |
170 |
| - color: $inverse-link; |
171 |
| - } |
| 188 | + .#{$prefix}--card--inverse .#{$prefix}--card__cta, |
| 189 | + .#{$prefix}--card--inverse .#{$prefix}--card__cta a, |
| 190 | + .#{$prefix}--card--inverse .#{$prefix}--card__cta a:visited, |
| 191 | + .#{$prefix}--card--inverse .#{$prefix}--card__cta__copy, |
| 192 | + :host(#{$dds-prefix}-feature-card-footer) |
| 193 | + .#{$dds-prefix}-ce--card__footer |
| 194 | + ::slotted(svg[slot='icon']), |
| 195 | + :host(#{$dds-prefix}-feature-cta-footer) |
| 196 | + .#{$dds-prefix}-ce--card__footer |
| 197 | + ::slotted(svg[slot='icon']) { |
| 198 | + color: $inverse-link; |
172 | 199 | }
|
173 | 200 | }
|
174 | 201 |
|
|
0 commit comments