|
140 | 140 | } |
141 | 141 | } |
142 | 142 |
|
| 143 | +.pub-button { |
| 144 | + display: inline-flex; |
| 145 | + align-items: center; |
| 146 | + justify-content: center; |
| 147 | + box-sizing: border-box; |
| 148 | + min-width: 64px; |
| 149 | + height: 36px; |
| 150 | + padding: 0 8px; |
| 151 | + border: none; |
| 152 | + border-radius: 4px; |
| 153 | + background: transparent; |
| 154 | + color: var(--pub-link-text-color); |
| 155 | + font-family: inherit; |
| 156 | + font-size: 14px; |
| 157 | + font-weight: 500; |
| 158 | + letter-spacing: 0.089em; |
| 159 | + text-transform: uppercase; |
| 160 | + cursor: pointer; |
| 161 | + user-select: none; |
| 162 | + transition: background-color 0.3s, box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1); |
| 163 | + |
| 164 | + // TODO: figure out a simpler rule composition for hovering |
| 165 | + &:not(.pub-button--raised):not(.pub-button--unelevated):hover { |
| 166 | + background-color: color-mix(in srgb, var(--pub-link-text-color) 8%, transparent); |
| 167 | + } |
| 168 | + |
| 169 | + &:focus { |
| 170 | + outline: none; |
| 171 | + } |
| 172 | + |
| 173 | + .pub-button-icon { |
| 174 | + width: 18px; |
| 175 | + height: 18px; |
| 176 | + margin-right: 8px; |
| 177 | + } |
| 178 | + |
| 179 | + &.pub-button--raised, |
| 180 | + &.pub-button--unelevated { |
| 181 | + padding: 0 16px; |
| 182 | + background-color: var(--pub-button-primary-background); |
| 183 | + color: var(--pub-color-white); |
| 184 | + } |
| 185 | + |
| 186 | + &.pub-button--raised { |
| 187 | + box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), |
| 188 | + 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12); |
| 189 | + |
| 190 | + &:hover { |
| 191 | + box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.2), |
| 192 | + 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12); |
| 193 | + } |
| 194 | + |
| 195 | + &:active { |
| 196 | + box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2), |
| 197 | + 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12); |
| 198 | + } |
| 199 | + } |
| 200 | + |
| 201 | + // Note: these must follow the --raised / --unelevated rules. |
| 202 | + &.pub-button-danger { |
| 203 | + background-color: var(--pub-button-danger-background); |
| 204 | + color: var(--pub-color-white); |
| 205 | + } |
| 206 | + |
| 207 | + &.pub-button-cancel { |
| 208 | + background-color: var(--pub-button-cancel-background); |
| 209 | + color: var(--pub-button-cancel-text-color); |
| 210 | + } |
| 211 | +} |
| 212 | + |
143 | 213 | .pub-fab { |
144 | 214 | display: inline-flex; |
145 | 215 | align-items: center; |
|
0 commit comments