Skip to content
This repository was archived by the owner on Apr 25, 2024. It is now read-only.

Commit 7bb1b7e

Browse files
committed
Add button-base mixin
1 parent a43312d commit 7bb1b7e

File tree

3 files changed

+33
-7
lines changed

3 files changed

+33
-7
lines changed

assets/stylesheets/blocks/_button.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
@import "scss/buttons";
22
@import "scss/utilities";
33

4+
.button,
45
.button-block-small,
56
.button-block,
67
.button-danger-disabled,
@@ -85,6 +86,10 @@
8586
@include button-small;
8687
}
8788

89+
.button-base {
90+
@include button-base;
91+
}
92+
8893
.button-outline {
8994
@include button;
9095
@include button-outline;

scss/_buttons.scss

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,24 @@
1313
}
1414
}
1515

16-
@mixin button {
17-
background-color: #eee;
18-
background-image: linear-gradient(#fcfcfc, #eee);
16+
@mixin button-base {
17+
border: 1px solid transparent;
1918
border-radius: 3px;
20-
border: 1px solid #d5d5d5;
21-
color: #333;
22-
cursor: pointer;
2319
display: inline-block;
2420
font-size: 13px;
25-
font-weight: bold;
2621
line-height: 20px;
2722
padding: 6px 12px;
2823
position: relative;
24+
}
25+
26+
@mixin button {
27+
@include button-base;
28+
background-color: #eee;
29+
background-image: linear-gradient(#fcfcfc, #eee);
30+
border-color: #d5d5d5;
31+
color: #333;
32+
cursor: pointer;
33+
font-weight: bold;
2934
user-select: none;
3035
vertical-align: middle;
3136
white-space: nowrap;

views/docs/buttons.slim

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,22 @@ article.article
6262
@include button;
6363
@include button-outline;
6464
}
65+
.article-section
66+
.article-section-heading
67+
| @mixin button-base
68+
.article-example
69+
.buttons
70+
button.button
71+
| .button
72+
a.button-base[href="#"]
73+
| .button-base
74+
.markdown
75+
pre
76+
code
77+
|
78+
.button-base {
79+
@include button-base;
80+
}
6581
.article-section
6682
.article-section-heading
6783
| @mixin button-small

0 commit comments

Comments
 (0)