@import "../tokens/shadows"; @import "../tokens/border_radius"; @import "../tokens/spacing"; @import "../tokens/colors"; @import "../tokens/transition"; @import "../tokens/animation-curves"; @import "../tokens/display"; $pb_card_border_width: 1px; $pb_card_border_radius: $border_rad_heavier; $pb_card_highlight_colors: map-merge(map-merge($status_colors, $product_colors), $category_colors); $pb_card_highlight_size: 4px; $pb_card_header_border_radius: $border_rad_heavy; $additional_colors: ( "dark": $bg_dark, "light": $bg_light, "white": $white, "none": none, "success_subtle": $success_subtle, "warning_subtle": $warning_subtle, "error_subtle": $error_subtle, "info_subtle": $info_subtle, "neutral_subtle": $neutral_subtle, ); $background_colors: map-merge($product_colors, $additional_colors); $pb_card_header_colors: map-merge(map-merge(map-merge($product_colors, $additional_colors), $category_colors), $status_colors); @mixin pb_card_selected($border_color: $primary) { border-color: $border_color; border-width: $pb_card_border_width * 2; } @mixin pb_card_selected_dark { @include pb_card_selected($primary_action_dark); } @mixin pb_card($background: $card_light, $border_color: $border_light) { position: relative; display: flex; flex-direction: column; min-width: 0; word-wrap: break-word; background-clip: border-box; border-width: $pb_card_border_width; border-style: solid; border-color: $border_color; border-radius: $pb_card_border_radius; transition-property: all; transition-duration: $transition_short; transition-timing-function: $easeIn; background-color: $white; @each $name, $color in $background_colors { &[class*=background_#{$name}] { background-color: $color; } }; @each $name, $shadow in $box_shadows { &[class^=_#{$name}] { box-shadow: $shadow; } } @each $name, $radius in $border_radius { &[class*=_#{$name}] { border-radius: $radius; } } } @mixin pb_card_dark { color: $white; @include pb_card($card_dark, $border_dark); background-color: $card_dark; border-color: $border_dark; } @mixin pb_card_highlight($width, $height, $background){ content: ""; position: absolute; top: 0; left: 0; width: $width; height: $height; background: $background; } @mixin pb_card_header_color($header_color) { background: $header_color; }