/
_button.scss
124 lines (101 loc) · 2.43 KB
/
_button.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
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
@use "sass:math";
@use "variables" as *;
@import "mixins";
@import "common";
// Shared all buttons
.p-button {
border: none;
color: $white;
.p-button-label {
color: inherit;
font-size: inherit;
text-transform: capitalize;
}
.p-button-icon,
.pi {
color: inherit;
font-size: $icon-md;
}
// Shared but not icon only
&:not(.p-button-icon-only) {
border-radius: $border-radius-md;
font-size: $font-size-md;
gap: $spacing-1;
height: $field-height-md;
padding: 0 $spacing-3;
text-transform: capitalize;
&.p-button-lg,
.p-button-lg & {
@extend #large;
}
&.p-button-sm,
.p-button-sm & {
@extend #small;
}
}
}
// Shared disabled styles
.p-button:disabled:not(.p-splitbutton-defaultbutton, .p-splitbutton-menubutton) {
@extend #button-disabled;
&.p-button-outlined {
@extend #button-disabled-outlined;
}
}
// Severity for basic button
.p-button.p-element:enabled {
@extend #main-primary-severity;
&.p-button-secondary {
@extend #main-secondary-severity;
}
}
// Severity for outlined button
.p-button-outlined:enabled:not(.p-splitbutton-defaultbutton, .p-splitbutton-menubutton) {
@extend #outlined-primary-severity;
&.p-button-sm {
@extend #outlined-primary-severity-sm;
}
&.p-button-secondary {
@extend #outlined-secondary-severity;
&.p-button-sm {
@extend #outlined-secondary-severity-sm;
}
}
}
// Severity for text button
.p-button-text:enabled:not(.p-splitbutton-defaultbutton, .p-splitbutton-menubutton),
a.p-button.p-button-text {
@extend #text-primary-severity;
&.p-button-secondary {
@extend #text-secondary-severity;
}
&.p-button-danger {
@extend #text-danger-severity;
}
}
// Icon Only Sizes
.p-button-icon-only:not(.p-splitbutton-menubutton) {
height: $field-height-md;
width: $field-height-md;
border: none;
.p-button-icon,
.pi {
font-size: $icon-lg;
}
&.p-button-sm {
height: $field-height-sm;
width: $field-height-sm;
.p-button-icon {
font-size: $icon-md;
}
}
}
// Misc
.p-button.p-button-vertical {
height: 100%;
gap: $spacing-0;
margin-bottom: 0;
padding: $spacing-1;
}
.p-button-rounded {
border-radius: 50%;
}