Skip to content

Commit e73618b

Browse files
Merge pull request #1 from CastleCSS/develop
Release 1.0
2 parents 1ed564f + 3107798 commit e73618b

File tree

4 files changed

+92
-47
lines changed

4 files changed

+92
-47
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# CastleCSS Icons Files
2-
CastleCSS basic button module
1+
# CastleCSS Buttons
2+
This is a subpackage for CastleCSS with example buttons to help you get started.
33

44
![CastleCSS logo @CastleCss.com](https://www.doordarius.nl/castlecss-logo-250.png)
55

@@ -17,7 +17,7 @@ Even easier: Download the [CastleCSS Boilerplate](https://www.github.com/CastleC
1717
- Download or clone the package
1818

1919
## Updating files
20-
CastleCSS is built so it's easy to update, you can just download make it your own as long as you don't ovewrite the core files.
20+
CastleCSS is built so it's easy to update, you can just download make it your own as long as you don't ovewrite the core files.
2121

2222
```npm update castlecss-buttons```
2323

@@ -31,12 +31,12 @@ With this you make sure your own variables overwrite the castle-core variables a
3131
```
3232
| Your project/
3333
|
34-
|-- scss/
34+
|-- scss/
3535
| |-- /* Custom project specific scss files here */
3636
| |-- Main.scss
3737
| |
3838
|-- node_modules/
39-
| |
39+
| |
4040
| | /* CastleCSS files included automatically here */
4141
| | castlecss-core/
4242
| | castlecss-buttons/
@@ -57,7 +57,7 @@ Your main.scss should have a setup similair to this (included in the [CastleCSS
5757
@import "node_modules/castlecss-core/sass/main";
5858
@import "node_modules/castlecss-buttons/sass/main";
5959
60-
60+
6161
/* Include your own files below this line
6262
--------------------------------------
6363
*/

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: 72 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,82 @@
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+
color: $color01;
12+
background-color: $theme01;
13+
border: none; /* necessary for type button */
1414
transition: all .2s ease-out;
15-
border-radius: $radius;
15+
border-radius: 3px;
1616

1717
&:hover {
18-
background: $color02;
19-
color: $color01;
18+
color: $color01;
19+
background-color: darken($theme01, 20);
2020
}
2121
}
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%;
22+
23+
.btn {
24+
@extend %btn;
25+
26+
&-theme01 {
27+
@extend %btn;
28+
background-color: $theme01;
29+
color: $color01;
30+
31+
&:hover {
32+
background-color: darken($theme01, 20);
33+
}
34+
}
35+
36+
&-theme02 {
37+
@extend %btn;
38+
background-color: $theme02;
39+
color: $color01;
40+
41+
&:hover {
42+
background-color: darken($theme02, 20);
43+
}
44+
}
45+
46+
&-theme03 {
47+
@extend %btn;
48+
background-color: $theme03;
49+
color: $color01;
50+
51+
&:hover {
52+
background-color: darken($theme03, 20);
53+
}
54+
}
55+
56+
&-theme04 {
57+
@extend %btn;
58+
background-color: $theme04;
59+
color: $color02;
60+
61+
&:hover {
62+
background-color: darken($theme04, 20);
63+
}
64+
}
65+
66+
&-theme05 {
67+
@extend %btn;
68+
color: $color02;
69+
background-color: $theme05;
70+
71+
&:hover {
72+
background-color: darken($theme05, 20);
73+
}
74+
75+
}
76+
77+
// extra utility class to make buttons full width
78+
&-full {
79+
clear: both;
80+
width: 100%;
81+
}
5082
}

0 commit comments

Comments
 (0)