File tree Expand file tree Collapse file tree 3 files changed +45
-4
lines changed
Expand file tree Collapse file tree 3 files changed +45
-4
lines changed Original file line number Diff line number Diff line change 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 }
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
Original file line number Diff line number Diff line change @@ -173,4 +173,15 @@ export class Cards extends Component<CardsOptions> implements Openable {
173173 }
174174 this . _removeRevealCloseEventHandlers ( ) ;
175175 } ;
176+
177+ static Init ( ) {
178+ if ( typeof document !== 'undefined' )
179+ // Handle initialization of static cards.
180+ document . addEventListener ( 'DOMContentLoaded' , ( ) => {
181+ const cards = document . querySelectorAll ( '.card' ) ;
182+ cards . forEach ( ( el ) => {
183+ if ( el && ( el [ 'M_Card' ] == undefined ) ) this . init ( ( el as HTMLElement ) ) ;
184+ } ) ;
185+ } ) ;
186+ }
176187}
Original file line number Diff line number Diff line change @@ -138,3 +138,4 @@ Forms.Init();
138138Chips . Init ( ) ;
139139Waves . Init ( ) ;
140140Range . Init ( ) ;
141+ Cards . Init ( ) ;
You can’t perform that action at this time.
0 commit comments