Skip to content

Commit e2d9933

Browse files
authored
Merge pull request #9 from mohouyizme/develop
Add buttons sizing classes
2 parents ff9e408 + c6837bc commit e2d9933

File tree

6 files changed

+506
-426
lines changed

6 files changed

+506
-426
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ Unnamed is a simple colorful css framework that is recommended to be used while
77
[![Package Version](https://img.shields.io/npm/v/unnamed.svg?style=flat-square)](https://www.npmjs.com/package/unnamed)
88
[![Package Downloads](https://img.shields.io/npm/dt/unnamed.svg?style=flat-square)](https://www.npmjs.com/package/unnamed)
99

10+
[![Support me on Patreon](https://c5.patreon.com/external/logo/become_a_patron_button.png)](https://www.patreon.com/smakosh)
11+
1012
Npm
1113

1214
npm install --save unnamed

source/app/index.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,27 @@ <h3 class="title">Disabled buttons</h3>
7171
<button href="#" class="btn btn-rounded" disabled>btn-rounded</button>
7272
<button href="#" class="btn btn-rounded btn-outlined" disabled>btn-outlined</button>
7373
</div>
74+
75+
<h3 class="title">Buttons Sizes</h3>
76+
<div class="divider"></div>
77+
78+
<div class="type-buttons">
79+
<button href="#" class="btn btn-primary gradient-green btn-small">btn-small</button>
80+
<button href="#" class="btn btn-primary gradient-purple">default size</button>
81+
<button href="#" class="btn btn-primary gradient-orange btn-large">btn-large</button>
82+
</div>
83+
84+
<div class="type-buttons">
85+
<button href="#" class="btn btn-rounded gradient-green btn-small">btn-small</button>
86+
<button href="#" class="btn btn-rounded gradient-purple">default size</button>
87+
<button href="#" class="btn btn-rounded gradient-orange btn-large">btn-large</button>
88+
</div>
89+
90+
<div class="type-buttons">
91+
<button href="#" class="btn btn-rounded btn-outlined green-btn btn-small">btn-small</button>
92+
<button href="#" class="btn btn-rounded btn-outlined purple-btn">default size</button>
93+
<button href="#" class="btn btn-rounded btn-outlined orange-btn btn-large">btn-large</button>
94+
</div>
7495
</div>
7596
<div class="container">
7697
<h3 class="title">Forms</h3>

source/app/styles/buttons.scss

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
@import "colors";
22

3-
.btn {
3+
.btn {
44
padding: 1rem 1.5rem;
55
color: #fff;
66
cursor: pointer;
77
text-transform: uppercase;
88
font-weight: bold;
99
}
1010

11-
.btn-primary {
11+
.btn-primary {
1212
border-radius: 5px;
1313
}
1414

15-
.btn-rounded {
16-
border-radius: 30px;
15+
.btn-rounded {
16+
border-radius: 60px;
1717
}
1818

19-
.btn-outlined {
19+
.btn-outlined {
2020
border-width: 3px;
2121
border-style: solid;
2222
transition: all 0.5s;
@@ -31,7 +31,7 @@
3131
background: $black !important;
3232
}
3333

34-
.black-btn {
34+
.black-btn {
3535
border-color: $black;
3636
color: $black;
3737

@@ -40,7 +40,7 @@
4040
}
4141
}
4242

43-
.green-btn {
43+
.green-btn {
4444
border-color: $green;
4545
color: $green;
4646

@@ -49,7 +49,7 @@
4949
}
5050
}
5151

52-
.orange-btn {
52+
.orange-btn {
5353
border-color: $orange-btn;
5454
color: $orange-btn;
5555

@@ -58,7 +58,7 @@
5858
}
5959
}
6060

61-
.purple-btn {
61+
.purple-btn {
6262
border-color: $purple-btn;
6363
color: $purple-btn;
6464

@@ -67,15 +67,23 @@
6767
}
6868
}
6969

70-
button:disabled {
70+
.btn-small {
71+
padding: 0.5rem 1rem;
72+
}
73+
74+
.btn-large {
75+
padding: 1.5rem 2rem;
76+
}
77+
78+
button:disabled {
7179
box-shadow: unset;
72-
opacity: .8;
80+
opacity: 0.8;
7381
background: $disabled;
7482
color: #fff;
7583
border: unset;
7684

77-
&:hover {
85+
&:hover {
7886
box-shadow: unset;
7987
background: $disabled;
8088
}
81-
}
89+
}

source/yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3506,8 +3506,8 @@ lodash.memoize@^4.1.2:
35063506
resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe"
35073507

35083508
lodash.mergewith@^4.6.0:
3509-
version "4.6.0"
3510-
resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.0.tgz#150cf0a16791f5903b8891eab154609274bdea55"
3509+
version "4.6.2"
3510+
resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz#617121f89ac55f59047c7aec1ccd6654c6590f55"
35113511

35123512
lodash.restparam@^3.0.0:
35133513
version "3.6.1"
@@ -5283,8 +5283,8 @@ string_decoder@~1.0.3:
52835283
safe-buffer "~5.1.0"
52845284

52855285
stringstream@~0.0.4:
5286-
version "0.0.5"
5287-
resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878"
5286+
version "0.0.6"
5287+
resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.6.tgz#7880225b0d4ad10e30927d167a1d6f2fd3b33a72"
52885288

52895289
strip-ansi@^3.0.0, strip-ansi@^3.0.1:
52905290
version "3.0.1"

0 commit comments

Comments
 (0)