2024-02-03 00:34:54 +03:00
|
|
|
@import 'mixins/m3-mixins'
|
|
|
|
|
2024-02-03 22:52:25 +03:00
|
|
|
$padding: 16px
|
|
|
|
|
2024-02-04 01:58:56 +03:00
|
|
|
@function padding-calculating($has-padding)
|
|
|
|
@if($has-padding == true)
|
|
|
|
@return $padding
|
|
|
|
@else
|
|
|
|
@return 0px
|
|
|
|
|
|
|
|
div.m3.m3-card > .m3-card-media:first-child
|
|
|
|
padding: padding-calculating(false)
|
|
|
|
border-radius: 12px !important
|
|
|
|
|
|
|
|
:is(div.m3-card-footer, header.m3-card-header, section.m3-card-body, img.m3-card-media).m3
|
|
|
|
padding: padding-calculating(true)
|
2024-02-03 22:52:25 +03:00
|
|
|
display: block
|
|
|
|
box-sizing: border-box
|
|
|
|
|
|
|
|
.m3.m3-card-media
|
|
|
|
&.m3-rounded
|
2024-02-04 01:58:56 +03:00
|
|
|
border-radius: 12px + padding-calculating(true)
|
2024-02-03 22:52:25 +03:00
|
|
|
|
2024-02-03 00:34:54 +03:00
|
|
|
width: 100%
|
2024-02-03 22:52:25 +03:00
|
|
|
display: block
|
|
|
|
contain: content
|
|
|
|
position: relative
|
|
|
|
box-sizing: border-box
|
|
|
|
|
|
|
|
div.m3.m3-card-action-area
|
|
|
|
display: block
|
2024-02-03 00:34:54 +03:00
|
|
|
cursor: pointer
|
|
|
|
contain: content
|
|
|
|
position: relative
|
|
|
|
border-radius: inherit
|
|
|
|
transition: box-shadow .2s cubic-bezier(0.2, 0, 0, 1)
|
|
|
|
|
|
|
|
& > div.m3.m3-card-action-area-content
|
2024-02-03 22:52:25 +03:00
|
|
|
top: 0
|
|
|
|
width: 100%
|
|
|
|
position: relative
|
2024-02-03 00:34:54 +03:00
|
|
|
|
2024-02-03 22:52:25 +03:00
|
|
|
& > span.m3:is(.m3-card-state-layer, .m3-ripple-domain)
|
|
|
|
top: 0
|
2024-02-03 00:34:54 +03:00
|
|
|
width: 100%
|
|
|
|
height: 100%
|
|
|
|
position: absolute
|
|
|
|
transition: background-color .2s cubic-bezier(0.2, 0, 0, 1)
|
|
|
|
|
|
|
|
&:hover
|
|
|
|
& > span.m3.m3-card-state-layer
|
|
|
|
background-color: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent)
|
|
|
|
|
|
|
|
&:is(&:focus, &:focus-visible, &:focus-within)
|
|
|
|
& > span.m3.m3-card-state-layer
|
|
|
|
background-color: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent)
|
|
|
|
|
|
|
|
&:is(&:focus, &:focus-visible, &:focus-within, &:hover)
|
|
|
|
&:is(.m3-card-outlined, .m3-card-filled)
|
|
|
|
@include elevation-1(false)
|
|
|
|
|
|
|
|
&.m3-card-elevated
|
|
|
|
@include elevation-2(false)
|
|
|
|
|
|
|
|
&:active
|
|
|
|
&:is(.m3-card-outlined, .m3-card-filled)
|
|
|
|
@include elevation-0(true)
|
|
|
|
|
|
|
|
&.m3-card-elevated
|
|
|
|
@include elevation-1(true)
|
|
|
|
|
|
|
|
&:not(&:has(span.m3.m3-ripple-domain))
|
|
|
|
& > span.m3.m3-card-state-layer
|
|
|
|
background-color: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent)
|
|
|
|
|
|
|
|
& > span.m3.m3-card-state-layer
|
|
|
|
background-color: transparent
|
|
|
|
|
|
|
|
& > span.m3.m3-ripple-domain > .m3.ripple
|
|
|
|
background-color: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent)
|