]> BookStack Code Mirror - bookstack/blob - resources/sass/_buttons.scss
Fixed permission row permission check
[bookstack] / resources / sass / _buttons.scss
1 button {
2   background-color: transparent;
3   border: 0;
4   font-size: 100%;
5 }
6
7 .button  {
8   text-decoration: none;
9   font-size: 0.85rem;
10   line-height: 1.4em;
11   padding: $-xs*1.3 $-m;
12   margin-top: $-xs;
13   margin-bottom: $-xs;
14   display: inline-block;
15   font-weight: 400;
16   outline: 0;
17   border-radius: 2px;
18   cursor: pointer;
19   transition: background-color ease-in-out 120ms,
20     filter ease-in-out 120ms,
21     box-shadow ease-in-out 120ms;
22   box-shadow: none;
23   background-color: var(--color-primary);
24   color: #FFF;
25   text-transform: uppercase;
26   border: 1px solid var(--color-primary);
27   vertical-align: top;
28   @include lightDark(filter, none, saturate(0.8) brightness(0.8));
29   &:hover, &:focus, &:active {
30     background-color: var(--color-primary);
31     text-decoration: none;
32     color: #FFFFFF;
33   }
34   &:hover {
35     @include lightDark(box-shadow, $bs-light, $bs-dark);
36     filter: brightness(110%);
37   }
38   &:focus {
39     outline: 1px dotted currentColor;
40     outline-offset: -$-xs;
41     box-shadow: none;
42     filter: brightness(90%);
43   }
44   &:active {
45     outline: 0;
46   }
47 }
48
49 .button.outline {
50   background-color: transparent;
51   @include lightDark(color, #666, #AAA);
52   fill: currentColor;
53   border: 1px solid;
54   @include lightDark(border-color, #CCC, #666);
55   &:hover, &:focus, &:active {
56     border: 1px solid #CCC;
57     box-shadow: none;
58     background-color: #F2F2F2;
59     @include lightDark(background-color, #f2f2f2, #555);
60     filter: none;
61   }
62   &:active {
63     border-color: #BBB;
64     background-color: #DDD;
65     color: #666;
66     box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.1);
67   }
68 }
69
70 .button + .button {
71   margin-inline-start: $-s;
72 }
73
74 .button.small {
75   font-size: 0.75rem;
76   padding: $-xs*1.2 $-s;
77 }
78
79 .text-button {
80   cursor: pointer;
81   background-color: transparent;
82   padding: 0;
83   margin: 0;
84   border: none;
85   user-select: none;
86   font-size: 0.75rem;
87   line-height: 1.4em;
88   color: var(--color-primary);
89   @include whenDark {
90     color: #AAA;
91   }
92   &:active {
93     outline: 0;
94   }
95   &:hover {
96     text-decoration: none;
97   }
98   &:hover, &:focus {
99     color: var(--color-primary);
100     fill: var(--color-primary);
101   }
102 }
103 .text-button.hover-underline:hover {
104   text-decoration: underline;
105 }
106
107 .button.block {
108   width: 100%;
109   text-align: start;
110   display: block;
111 }
112
113 .button.icon, .icon-button {
114   .svg-icon {
115     margin-inline-end: 0;
116   }
117 }
118
119 .icon-button {
120   text-align: center;
121   border: 1px solid transparent;
122 }
123 .icon-button:hover {
124   background-color: rgba(0, 0, 0, 0.05);
125   border-radius: 4px;
126   @include lightDark(border-color, #DDD, #444);
127   cursor: pointer;
128 }
129
130 .button.svg {
131   display: flex;
132   align-items: center;
133   padding: $-s $-m;
134   padding-bottom: ($-s - 2px);
135   width: 100%;
136   svg {
137     display: inline-block;
138     width: 24px;
139     height: 24px;
140     bottom: auto;
141     margin-inline-end: $-m;
142   }
143 }
144
145 .button[disabled] {
146   background-color: #BBB;
147   cursor: default;
148   border-color: #CCC;
149   &:hover {
150     background-color: #BBB;
151     cursor: default;
152     box-shadow: none;
153   }
154 }