-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Expand file tree
/
Copy pathbadge.common.scss
More file actions
47 lines (36 loc) · 1.25 KB
/
badge.common.scss
File metadata and controls
47 lines (36 loc) · 1.25 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
@use "../../themes/functions.color" as color;
@import "../../themes/mixins";
// Badge
// --------------------------------------------------
:host {
/**
* @prop --background: Background of the badge
* @prop --color: Text color of the badge
*
* @prop --padding-top: Top padding of the badge
* @prop --padding-end: Right padding if direction is left-to-right, and left padding if direction is right-to-left of the badge
* @prop --padding-bottom: Bottom padding of the badge
* @prop --padding-start: Left padding if direction is left-to-right, and right padding if direction is right-to-left of the badge
*/
@include font-smoothing();
@include padding(var(--padding-top), var(--padding-end), var(--padding-bottom), var(--padding-start));
display: inline-block;
background: var(--background);
color: var(--color);
text-align: center;
white-space: nowrap;
contain: content;
vertical-align: baseline;
}
// Badge (hint)
// --------------------------------------------------
:host([vertical]:not(.in-tab-button)) {
@include position(null, 0, null, null);
position: absolute;
}
:host(:not(.in-tab-button)[vertical].badge-vertical-top) {
top: 0;
}
:host(:not(.in-tab-button)[vertical].badge-vertical-bottom) {
bottom: 0;
}