summaryrefslogtreecommitdiff
blob: 38c256e8976cd883e9677d8ebccaf3d59dd3e119 (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
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
.components-button {
	&.is-default {
		color: $muriel-gray-700;
		border-color: $muriel-gray-100;
		background: $white;
		box-shadow: none;
		border-width: 1px 1px 2px;

		&:hover {
			background: $white;
			border-color: $muriel-gray-200;
			box-shadow: none;
			color: $muriel-gray-700;
		}

		&:focus:enabled {
			background: $white;
			color: $muriel-gray-700;
			border-color: $color-primary;
			box-shadow: 0 0 0 2px $color-primary-light;
		}

		&:active:enabled {
			background: $white;
			border-color: $muriel-gray-100;
			border-width: 2px 1px 1px;
			box-shadow: none;
		}

		&:disabled,
		&[aria-disabled='true'] {
			color: $muriel-gray-50;
			background-color: $white;
			border-color: $muriel-gray-50;
			text-shadow: none;
		}
	}

	&.is-primary {
		background: $color-accent;
		border-color: $color-accent-dark;
		box-shadow: none;
		color: $white;
		text-shadow: none;

		&:focus:enabled {
			background: $muriel-hot-pink-400;
			border-color: $color-accent;
			color: $white;
			box-shadow: 0 0 0 2px $color-accent-light;
		}

		&:hover {
			box-shadow: none;
			background: $muriel-hot-pink-400;
			border-color: $color-accent-dark;
			color: $white;
		}

		&:focus:enabled {
			box-shadow: 0 0 0 2px $color-accent-light;
		}

		&:active:enabled {
			background: $muriel-hot-pink-400;
			border-color: $color-accent-dark;
			box-shadow: inset 0 1px 0 $color-accent-dark;
		}

		&:disabled,
		&[aria-disabled='true'] {
			color: $muriel-gray-50;
			background: $white;
			border-color: $muriel-gray-50;
			text-shadow: none;

			&:hover,
			&:focus,
			&:active {
				color: $muriel-gray-50;
				background-color: $white;
				border-color: $muriel-gray-50;
				box-shadow: none;
			}
		}

		&.is-busy,
		&.is-busy:disabled,
		&.is-busy[aria-disabled='true'] {
			background-image: linear-gradient(
				-45deg,
				$color-accent 28%,
				$muriel-hot-pink-600 28%,
				$muriel-hot-pink-600 72%,
				$color-accent 72%
			);
			border-color: $color-accent-dark;
		}
	}

	/* Buttons that look like links, for a cross of good semantics with the visual */
	&.is-link {
		color: $color-link;

		&:hover,
		&:active {
			color: $color-link-dark;
		}

		&:focus {
			color: $color-link-dark;
			box-shadow: 0 0 0 2px $color-primary-light;
		}
	}

	/* Link buttons that are red to indicate destructive behavior. */
	&.is-link.is-destructive {
		color: $alert-red;
	}

	&:focus:enabled {
		// @include button-style__focus-active;
	}

	&.is-busy {
		background-image: repeating-linear-gradient(
			-45deg,
			$muriel-gray-500,
			$white 11px,
			$white 10px,
			$muriel-gray-500 20px
		);
	}

	// Buttons that are text-based.
	&.is-tertiary {
		color: $color-link;

		&:not( :disabled ):not( [aria-disabled='true'] ):not( .is-default ):hover {
			color: $color-link-dark;
		}
	}
}