Skip to content

Commit d0276c2

Browse files
committed
refactor(Cards) implemented buttons scss styling mixin materializecss#565
1 parent 7c9bf1f commit d0276c2

File tree

1 file changed

+33
-4
lines changed

1 file changed

+33
-4
lines changed

sass/components/_cards.scss

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,13 @@
171171
border-radius: 0 0 2px 2px;
172172
}
173173

174-
border-top: 1px solid var(--md-sys-color-outline-variant);
175-
position: relative;
176-
background-color: inherit;
174+
// position: relative;
175+
padding: 0 1.6rem;
176+
// border-top: 1px solid var(--md-sys-color-outline-variant);
177+
// background-color: inherit;
177178

178-
a {
179+
// Replaced card links with buttons (Accessibility, @see https://github.com/materializecss/materialize/issues/565)
180+
/*a {
179181
padding: 16px 24px;
180182
display: inline-block;
181183
}
@@ -187,6 +189,33 @@
187189
&:hover {
188190
background-color: rgba(var(--md-sys-color-primary-numeric), 0.06);
189191
}
192+
}*/
193+
194+
a {
195+
@include btn(
196+
var(--btn-height),
197+
var(--btn-border-radius),
198+
var(--btn-padding),
199+
var(--btn-padding),
200+
var(--btn-font-size)
201+
);
202+
203+
&:first-child {
204+
margin-left: -1.6rem;
205+
}
206+
207+
&:last-child {
208+
margin-right: -1.6rem;
209+
}
210+
}
211+
212+
.btn {
213+
&.filled,
214+
&.tonal,
215+
&.elevated,
216+
&.outlined {
217+
margin: 0 .26rem 1.6rem 0;
218+
}
190219
}
191220
}
192221

0 commit comments

Comments
 (0)