Github Buttons

1.1

Classy buttons are big clickable buttons, great for form actions and primary page actions. This is used extensively around the site.

  • :hover - Buttons love hover states.
  • :disabled - For when you shouldn't be able to click on it.
  • .disabled - Same as the disabled pseudo-class.
  • .primary - For the main form action, use whenever creating something.
  • .primary:hover - Hover state fo primary buttons.
  • .mousedown - A brief moment of polish when the button is pressed.
  • .primary.mousedown - Even primary buttons have a down state.
  • .danger - This button is going to do something potentially bad or destructive.
  • .danger:hover - Hover state for danger buttons.
  • .danger.mousedown - Depressed danger button.
  • .danger:disabled - Disabled danger button.
Example Button Link
:hover Example Button Link
:disabled Example Button Link
.disabled Example Button Link
.primary Example Button Link
.primary:hover Example Button Link
.mousedown Example Button Link
.primary.mousedown Example Button Link
.danger Example Button Link
.danger:hover Example Button Link
.danger.mousedown Example Button Link
.danger:disabled Example Button Link
1
2
    <button class="classy">Example Button</button>
    <a class="button classy" href="#">Example Button Link</a>
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
  /*
  Classy buttons are big clickable buttons, great for form actions and primary page actions. This is used extensively around the site.

  :hover              - Buttons love hover states.
  :disabled           - For when you shouldn't be able to click on it.
  .disabled           - Same as the disabled pseudo-class.
  .primary            - For the main form action, use whenever creating something.
  .primary:hover      - Hover state fo primary buttons.
  .mousedown          - A brief moment of polish when the button is pressed.
  .primary.mousedown  - Even primary buttons have a down state.
  .danger             - This button is going to do something potentially bad or destructive.
  .danger:hover       - Hover state for danger buttons.
  .danger.mousedown   - Depressed danger button.
  .danger:disabled    - Disabled danger button.

  Styleguide 1.1
  */
  button.classy,
  a.button.classy {
    position: relative;
    display: inline-block;
    padding: 8px 15px;
    font-family: Helvetica, arial, freesans, clean, sans-serif;
    font-size: 12px;
    font-weight: bold;
    line-height: normal;
    color: #666;
    text-shadow: 0 1px rgba(255, 255, 255, 0.9);
    cursor: pointer;
    background-color: #e5e5e5;
    background-image: -webkit-linear-gradient(#f5f5f5, #e5e5e5);
    background-image: -moz-linear-gradient(#f5f5f5, #e5e5e5);
    background-image: linear-gradient(#f5f5f5, #e5e5e5);
    background-repeat: repeat-x;
    border: 1px solid #ddd;
    border-bottom-color: #bbb;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
  }

  button.classy.primary,
  a.button.classy.primary {
    color: #fff;
    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4);
    background-color: #60b044;
    background-image: -webkit-linear-gradient(#8add6d, #60b044);
    background-image: -moz-linear-gradient(#8add6d, #60b044);
    background-image: linear-gradient(#8add6d, #60b044);
    background-repeat: repeat-x;
    border-color: #74bb5a;
    border-bottom-color: #509338;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  }

  button.classy.primary:hover,
  a.button.classy.primary:hover {
    color: #fff;
    background-color: #4c8b36;
    background-image: -webkit-linear-gradient(#69d344, #4c8b36);
    background-image: -moz-linear-gradient(#69d344, #4c8b36);
    background-image: linear-gradient(#69d344, #4c8b36);
    background-repeat: repeat-x;
    border-color: #4a993e;
  }

  button.classy.primary.mousedown,
  a.button.classy.primary.mousedown {
    background-color: #69d344;
    background-image: -webkit-linear-gradient(#4c8b36, #69d344);
    background-image: -moz-linear-gradient(#4c8b36, #69d344);
    background-image: linear-gradient(#4c8b36, #69d344);
    background-repeat: repeat-x;
    border-bottom-color: #69d344;
  }

  button.classy.primary:disabled,
  button.classy.primary.disabled,
  a.button.classy.primary:disabled,
  a.button.classy.primary.disabled {
    color: #fff;
    background-color: #60b044;
    background-image: -webkit-linear-gradient(#8add6d, #60b044);
    background-image: -moz-linear-gradient(#8add6d, #60b044);
    background-image: linear-gradient(#8add6d, #60b044);
    background-repeat: repeat-x;
    border-color: #74bb5a;
    border-bottom-color: #509338;
  }

  button.classy.danger,
  a.button.classy.danger {
    color: #990000;
  }

  button.classy.danger:hover,
  a.button.classy.danger:hover {
    color: #fff;
    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
    background-color: #b33630;
    background-image: -webkit-linear-gradient(#dc5f59, #b33630);
    background-image: -moz-linear-gradient(#dc5f59, #b33630);
    background-image: linear-gradient(#dc5f59, #b33630);
    background-repeat: repeat-x;
    border-bottom-color: #cd504a;
  }

  button.classy.danger:disabled,
  button.classy.danger.disabled,
  a.danger.button.classy:disabled,
  a.danger.button.classy.disabled {
    color: #990000;
    text-shadow: 0 1px 0 #fff;
    background-color: #e1e1e1;
    background-image: -webkit-linear-gradient(#fff, #e1e1e1);
    background-image: -moz-linear-gradient(#fff, #e1e1e1);
    background-image: linear-gradient(#fff, #e1e1e1);
    background-repeat: repeat-x;
  }

  button.classy.danger.mousedown,
  a.button.classy.danger.mousedown {
    background-color: #dc5f59;
    background-image: -webkit-linear-gradient(#b33630, #dc5f59);
    background-image: -moz-linear-gradient(#b33630, #dc5f59);
    background-image: linear-gradient(#b33630, #dc5f59);
    background-repeat: repeat-x;
    border-bottom-color: #dc5f59;
  }

  button.classy:hover,
  a.button.classy:hover {
    color: #337797;
    text-decoration: none;
    background-color: #d8eaf2;
    background-image: -webkit-linear-gradient(#f0f7fa, #d8eaf2);
    background-image:    -moz-linear-gradient(#f0f7fa, #d8eaf2);
    background-image:         linear-gradient(#f0f7fa, #d8eaf2);
    background-repeat: repeat-x;
    border-color: #cbe3ee;
    border-bottom-color: #97c7dd;
  }

  button.classy:disabled,
  a.button.classy:disabled {
    opacity: 0.5;
  }

  button.classy:disabled:hover,
  button.classy.disabled:hover,
  a.button.classy:disabled:hover,
  a.button.classy.disabled:hover {
    color: #666;
    cursor: default;
    background-color: #e5e5e5;
    background-image: -webkit-linear-gradient(#f5f5f5, #e5e5e5);
    background-image:    -moz-linear-gradient(#f5f5f5, #e5e5e5);
    background-image:         linear-gradient(#f5f5f5, #e5e5e5);
    background-repeat: repeat-x;
    border: 1px solid #ddd;
    border-bottom-color: #bbb;
  }

  button.classy.mousedown,
  a.button.classy.mousedown {
    color: #fff;
    text-shadow: 0 -1px 0 rgba(0,0,0,.3);
    background-color: #0ca6dd;
    background-image: -webkit-linear-gradient(#0770a0, #0ca6dd);
    background-image:    -moz-linear-gradient(#0770a0, #0ca6dd);
    background-image:         linear-gradient(#0770a0, #0ca6dd);
    background-repeat: repeat-x;
    border-color: #2a65a0;
    border-bottom-color: #0770a0;
  }

  button.classy::-moz-focus-inner {
    margin: -1px -3px;
  }

  a.button.classy {
    display: inline-block;
  }

  button.classy img,
  a.button.classy img {
    position: relative;
    top: -1px;
    margin-right: 3px;
    vertical-align: middle;
  }

Element selectors should not be overqualified (20: button.classy,   a.button.classy)
Unknown property name: -webkit-touch-callout (45: -webkit-touch-callout: none)
Element selectors should not be overqualified (49: button.classy.primary,   a.button.classy.primary)
Element selectors should not be overqualified (63: button.classy.primary:hover,   a.button.classy.primary:hover)
Element selectors should not be overqualified (74: button.classy.primary.mousedown,   a.button.classy.primary.mousedown)
Element selectors should not be overqualified (86: button.classy.primary:disabled,   button.classy.primary.disabled,   a.button.classy.primary:disabled,   a.button.classy.primary.disabled)
Element selectors should not be overqualified (98: button.classy.danger,   a.button.classy.danger)
Element selectors should not be overqualified (103: button.classy.danger:hover,   a.button.classy.danger:hover)
Element selectors should not be overqualified (117: button.classy.danger:disabled,   button.classy.danger.disabled,   a.danger.button.classy:disabled,   a.danger.button.classy.disabled)
Element selectors should not be overqualified (128: button.classy.danger.mousedown,   a.button.classy.danger.mousedown)
Element selectors should not be overqualified (138: button.classy:hover,   a.button.classy:hover)
Element selectors should not be overqualified (151: button.classy:disabled,   a.button.classy:disabled)
Element selectors should not be overqualified (158: button.classy:disabled:hover,   button.classy.disabled:hover,   a.button.classy:disabled:hover,   a.button.classy.disabled:hover)
Element selectors should not be overqualified (171: button.classy.mousedown,   a.button.classy.mousedown)
Element selectors should not be overqualified (183: button.classy::-moz-focus-inner)
Element selectors should not be overqualified (187: a.button.classy)
Element selectors should not be overqualified (192: button.classy img,   a.button.classy img)