-
Notifications
You must be signed in to change notification settings - Fork 447
/
Copy path_card.scss
90 lines (80 loc) · 2.75 KB
/
_card.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
@use "sass:map";
@use "../settings" as *;
@if map.get($modules, "components/card") or map.get($modules, "components/modal") {
/**
* Card (<article>, role="article")
*/
#{$parent-selector} article:not(:has(> form:first-child)),
#{$parent-selector} [role="article"]:not(:has(> form:first-child)),
#{$parent-selector} article > form,
#{$parent-selector} [role="article"] > form {
margin-bottom: var(#{$css-var-prefix}block-spacing-vertical);
padding: var(#{$css-var-prefix}block-spacing-vertical)
var(#{$css-var-prefix}block-spacing-horizontal);
border-radius: var(#{$css-var-prefix}border-radius);
background: var(#{$css-var-prefix}card-background-color);
box-shadow: var(#{$css-var-prefix}card-box-shadow);
> header,
> footer {
margin-right: calc(var(#{$css-var-prefix}block-spacing-horizontal) * -1);
margin-left: calc(var(#{$css-var-prefix}block-spacing-horizontal) * -1);
padding: calc(var(#{$css-var-prefix}block-spacing-vertical) * 0.66)
var(#{$css-var-prefix}block-spacing-horizontal);
background-color: var(#{$css-var-prefix}card-sectioning-background-color);
}
> header {
margin-top: calc(var(#{$css-var-prefix}block-spacing-vertical) * -1);
margin-bottom: var(#{$css-var-prefix}block-spacing-vertical);
border-bottom: var(#{$css-var-prefix}border-width)
solid
var(#{$css-var-prefix}card-border-color);
border-top-right-radius: var(#{$css-var-prefix}border-radius);
border-top-left-radius: var(#{$css-var-prefix}border-radius);
> h1,
> h2,
> h3,
> h4,
> h5,
> h6 {
margin-bottom: 0;
}
> hgroup {
> h1,
> h2,
> h3,
> h4,
> h5,
> h6 {
margin-bottom: 0;
}
}
}
> footer {
margin-top: var(#{$css-var-prefix}block-spacing-vertical);
margin-bottom: calc(var(#{$css-var-prefix}block-spacing-vertical) * -1);
border-top: var(#{$css-var-prefix}border-width)
solid
var(#{$css-var-prefix}card-border-color);
border-bottom-right-radius: var(#{$css-var-prefix}border-radius);
border-bottom-left-radius: var(#{$css-var-prefix}border-radius);
// https://github.com/picocss/pico/issues/557#issuecomment-2393213110
[type="submit"],
[type="reset"],
[type="button"],
[role="group"],
p,
nav,
ul,
ol {
margin-bottom: 0px;
&:last-child {
margin-bottom: 0px;
}
/* Also remove if next input after button is a hidden input */
&:has(+ [type="hidden"]) {
margin-bottom: 0px;
}
}
}
}
}