summaryrefslogtreecommitdiff
path: root/scss/modules/_btn.scss
blob: 29b32640de6ffcde684e8cdd842f7cd5d0e9623e (plain)
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
.btn {
  display: block;
  border: solid var(--border-width) var(--text-color);
  font-weight: 600;
  text-align: center;
  margin-block-start: var(--spacing-block-sm);
  padding-inline: var(--spacing-inline-md);
  padding-block: var(--spacing-block-sm);
  background-color: transparent;
  transition:
    background-color 100ms,
    transform 100ms;
}

.btn:is(:hover, :focus, :focus-visible, :focus-within, :active) {
  box-shadow: none;
  outline: none;
  color: var(--text-highlight-color);
  border-color: var(--background-highlight-color);
  background-color: var(--background-highlight-color);
  transition:
    background-color 300ms,
    transform 300ms;
}

.btn:is(:focus, :focus-visible, :focus-within) {
  border-color: var(--special-text-highlight-color);
  border-style: dotted;
}

.btn:active {
  transform: scale(1.1, 1.1);
}

/* Override anchor styling. */
a.btn {
  color: var(--text-color);
  text-decoration: none;
}