Skip to content

Commit efceec4

Browse files
author
Darius Rosendahl
committed
default buttons will now use min-height instead of height so they can grow, version bumb to 1.0
1 parent 0e7c720 commit efceec4

File tree

3 files changed

+79
-41
lines changed

3 files changed

+79
-41
lines changed

package-lock.json

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "castlecss-buttons",
3-
"version": "0.5.0",
3+
"version": "1.0.0",
44
"description": "Buttons module for CastleCSS",
55
"main": "index.js",
66
"scripts": {

sass/components/buttons.scss

Lines changed: 65 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,75 @@
11
/* Buttons */
2-
3-
.btn {
4-
display: inline-block;
5-
padding: 1rem 1.5rem;
6-
height: 4rem; /* same as form element height */
2+
%btn {
3+
display: inline-block;
4+
padding: 1rem 1.5rem;
5+
min-height: 4rem; /* same as form element height */
76
font-family: $font-sec;
8-
line-height: 1.3;
7+
line-height: 1.3;
98
text-align: center;
10-
text-decoration: none;
9+
text-decoration: none;
1110
cursor: pointer;
12-
background-color: $theme01; color: $color01;
13-
border: none; /* necessary for type button */
11+
background-color: $theme01; color: $color01;
12+
border: none; /* necessary for type button */
1413
transition: all .2s ease-out;
15-
border-radius: $radius;
14+
border-radius: $btn-radius;
1615

1716
&:hover {
18-
background: $color02;
19-
color: $color01;
17+
color: $color01;
18+
background-color: darken($theme01, 20);
2019
}
2120
}
22-
.btn-theme01 {
23-
@extend .btn;
24-
background-color: $theme01;
25-
color: $color01;
26-
}
27-
.btn-theme02 {
28-
@extend .btn;
29-
background-color: $theme02;
30-
color: $color01;
31-
}
32-
.btn-theme03 {
33-
@extend .btn;
34-
background-color: $theme03;
35-
color: $color01;
36-
}
37-
.btn-theme04 {
38-
@extend .btn;
39-
background-color: $theme04;
40-
color: $color02;
41-
}
42-
.btn-theme05 {
43-
@extend .btn;
44-
background-color: $theme05;
45-
color: $color02;
46-
}
47-
.btn-full {
48-
clear: both;
49-
width: 100%;
21+
.btn {
22+
@extend %btn;
23+
24+
&-theme01 {
25+
@extend %btn;
26+
background-color: $theme01;
27+
color: $color01;
28+
29+
&:hover {
30+
background-color: darken($theme01, 20);
31+
}
32+
}
33+
34+
&-theme02 {
35+
@extend %btn;
36+
background-color: $theme02;
37+
color: $color01;
38+
39+
&:hover {
40+
background-color: darken($theme02, 20);
41+
}
42+
}
43+
44+
&-theme03 {
45+
@extend %btn;
46+
background-color: $theme03;
47+
color: $color01;
48+
49+
&:hover {
50+
background-color: darken($theme03, 20);
51+
}
52+
}
53+
54+
&-theme04 {
55+
@extend %btn;
56+
background-color: $theme04;
57+
color: $color02;
58+
59+
&:hover {
60+
background-color: darken($theme04, 20);
61+
}
62+
}
63+
64+
&-theme05 {
65+
@extend %btn;
66+
background-color: $theme05;
67+
color: $color02;
68+
}
69+
70+
// extra utility class to make buttons full width
71+
&-full {
72+
clear: both;
73+
width: 100%;
74+
}
5075
}

0 commit comments

Comments
 (0)