UNPKG

3.36 kBCSSView Raw
1.adm-button {
2 --color: var(--adm-color-text-light-solid);
3 --text-color: var(--adm-button-text-color, var(--adm-color-text));
4 --background-color: var(--adm-button-background-color, var(--adm-color-background));
5 --border-radius: var(--adm-button-border-radius, 4px);
6 --border-width: var(--adm-button-border-width, 1px);
7 --border-style: var(--adm-button-border-style, solid);
8 --border-color: var(--adm-button-border-color, var(--adm-color-border));
9 color: var(--text-color);
10 background-color: var(--background-color);
11 position: relative;
12 display: inline-block;
13 box-sizing: border-box;
14 height: auto;
15 padding: 7px 12px;
16 margin: 0;
17 font-size: var(--adm-font-size-9);
18 line-height: 1.4;
19 text-align: center;
20 border: var(--border-width) var(--border-style) var(--border-color);
21 border-radius: var(--border-radius);
22 cursor: pointer;
23 transition: opacity ease 0.15s;
24 -webkit-user-select: none;
25 user-select: none;
26}
27.adm-button:focus {
28 outline: none;
29}
30.adm-button::before {
31 position: absolute;
32 top: 0;
33 left: 0;
34 transform: translate(calc(var(--border-width) * -1), calc(var(--border-width) * -1));
35 width: 100%;
36 height: 100%;
37 background-color: var(--adm-color-text-dark-solid);
38 border: var(--border-width) var(--border-style) var(--adm-color-text-dark-solid);
39 border-radius: var(--border-radius);
40 opacity: 0;
41 content: ' ';
42 box-sizing: content-box;
43}
44.adm-button:active::before {
45 opacity: 0.08;
46}
47.adm-button-default.adm-button-fill-outline {
48 --background-color: transparent;
49 --border-color: var(--adm-color-text);
50}
51.adm-button-default.adm-button-fill-none {
52 --background-color: transparent;
53 --border-width: 0px;
54}
55.adm-button:not(.adm-button-default) {
56 --text-color: var(--adm-color-text-light-solid);
57 --background-color: var(--color);
58 --border-color: var(--color);
59}
60.adm-button:not(.adm-button-default).adm-button-fill-outline {
61 --text-color: var(--color);
62 --background-color: transparent;
63}
64.adm-button:not(.adm-button-default).adm-button-fill-none {
65 --text-color: var(--color);
66 --background-color: transparent;
67 --border-width: 0px;
68}
69.adm-button-primary {
70 --color: var(--adm-color-primary);
71}
72.adm-button-success {
73 --color: var(--adm-color-success);
74}
75.adm-button-danger {
76 --color: var(--adm-color-danger);
77}
78.adm-button-warning {
79 --color: var(--adm-color-warning);
80}
81.adm-button-block {
82 display: block;
83 width: 100%;
84}
85.adm-button-disabled {
86 cursor: not-allowed;
87 opacity: 0.4;
88}
89.adm-button-disabled:active::before {
90 display: none;
91}
92.adm-button.adm-button-mini {
93 padding-top: 3px;
94 padding-bottom: 3px;
95 font-size: var(--adm-font-size-main);
96}
97.adm-button.adm-button-mini.adm-button-shape-rounded {
98 padding-left: 9px;
99 padding-right: 9px;
100}
101.adm-button.adm-button-small {
102 padding-top: 3px;
103 padding-bottom: 3px;
104 font-size: var(--adm-font-size-7);
105}
106.adm-button.adm-button-large {
107 padding-top: 11px;
108 padding-bottom: 11px;
109 font-size: var(--adm-font-size-10);
110}
111.adm-button.adm-button-shape-rounded {
112 --border-radius: 1000px;
113}
114.adm-button.adm-button-shape-rectangular {
115 --border-radius: 0;
116}
117.adm-button-loading {
118 vertical-align: bottom;
119}
120.adm-button-loading-wrapper {
121 display: flex;
122 height: 1.4em;
123 align-items: center;
124 justify-content: center;
125}
126.adm-button-loading-wrapper > .adm-loading {
127 opacity: 0.6;
128}