-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathBadge.css
More file actions
128 lines (111 loc) · 2.08 KB
/
Badge.css
File metadata and controls
128 lines (111 loc) · 2.08 KB
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
/*
* Webflow Site Variables Used:
* - --text-primary: Badge text color
* - --border-radius: Badge corner rounding
* - --background-primary: Base background for badges
* - --background-secondary: Hover states
* - --border-color: Badge borders
*/
/* Box sizing reset */
.wf-badge *,
.wf-badge *::before,
.wf-badge *::after {
box-sizing: border-box;
}
/* Root element - inherit Webflow typography */
.wf-badge {
font-family: inherit;
color: inherit;
line-height: inherit;
display: inline-flex;
align-items: center;
gap: 6px;
border-radius: var(--border-radius, 8px);
font-weight: 500;
white-space: nowrap;
border: 1px solid transparent;
}
/* Size variants */
.wf-badge-sm {
padding: 2px 8px;
font-size: 12px;
gap: 4px;
}
.wf-badge-md {
padding: 4px 12px;
font-size: 14px;
gap: 6px;
}
.wf-badge-lg {
padding: 6px 16px;
font-size: 16px;
gap: 8px;
}
/* Color variants - Success */
.wf-badge-success {
background: #dcfce7;
color: #166534;
border-color: #bbf7d0;
}
/* Color variants - Warning */
.wf-badge-warning {
background: #fef3c7;
color: #92400e;
border-color: #fde68a;
}
/* Color variants - Error */
.wf-badge-error {
background: #fee2e2;
color: #991b1b;
border-color: #fecaca;
}
/* Color variants - Info */
.wf-badge-info {
background: #dbeafe;
color: #1e40af;
border-color: #bfdbfe;
}
/* Label */
.wf-badge-label {
display: inline-block;
}
/* Close button */
.wf-badge-close {
display: inline-flex;
align-items: center;
justify-content: center;
background: transparent;
border: none;
padding: 0;
margin: 0;
cursor: pointer;
color: inherit;
opacity: 0.7;
transition: opacity 0.2s;
border-radius: 2px;
}
.wf-badge-close:hover {
opacity: 1;
}
.wf-badge-close:focus-visible {
outline: 2px solid currentColor;
outline-offset: 2px;
opacity: 1;
}
.wf-badge-close:active {
opacity: 0.8;
}
/* Close icon */
.wf-badge-close-icon {
display: block;
width: 12px;
height: 12px;
}
.wf-badge-sm .wf-badge-close-icon {
width: 10px;
height: 10px;
}
.wf-badge-lg .wf-badge-close-icon {
width: 14px;
height: 14px;
}