Skip to content

Commit e799488

Browse files
committed
Move .fa and .svg global classes to btn-fa.styl and btn-svg.styl
1 parent b7beb42 commit e799488

File tree

5 files changed

+74
-28
lines changed

5 files changed

+74
-28
lines changed

src/btn-fa.styl

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
.btn {
2+
&.btn-icon-only {
3+
:global {
4+
.fa {
5+
margin-right: 0;
6+
}
7+
}
8+
}
9+
10+
:global {
11+
& .fa {
12+
font-size: 14px;
13+
margin-right: 8px;
14+
}
15+
& i.fa,
16+
& span.fa {
17+
font-size: 14px;
18+
color: #666;
19+
}
20+
}
21+
}
22+
23+
.btn-primary,
24+
.btn-danger {
25+
:global {
26+
& i.fa,
27+
& span.fa {
28+
color: inherit;
29+
}
30+
}
31+
}
32+
33+
.btn-lg.btn,
34+
.btn-sm.btn,
35+
.btn-xs.btn {
36+
:global {
37+
& i.fa,
38+
& span.fa {
39+
font-size: inherit;
40+
}
41+
}
42+
}

src/btn-style.styl

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,6 @@
5151
background-repeat: repeat-x;
5252
border-color: #0095ce;
5353

54-
:global {
55-
.fa {
56-
color: inherit;
57-
}
58-
}
59-
6054
// Loading class within a primary button
6155
> [class*="loader-container"] > [class*="loader"] {
6256
border-color: rgba(255, 255, 255, 0.4);
@@ -110,12 +104,6 @@
110104
background-repeat: repeat-x;
111105
border-color: #d8262b;
112106

113-
:global {
114-
.fa {
115-
color: inherit;
116-
}
117-
}
118-
119107
&:active,
120108
&.active {
121109
color: #fff;

src/btn-svg.styl

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
.btn-lg.btn {
2+
:global {
3+
& i.svg,
4+
& span.svg {
5+
width: 24px;
6+
height: 24px;
7+
}
8+
}
9+
}
10+
11+
.btn {
12+
:global {
13+
& i.svg,
14+
& span.svg {
15+
width: 16px;
16+
height: 16px;
17+
}
18+
}
19+
}
20+
21+
.btn-sm.btn,
22+
.btn-xs.btn {
23+
:global {
24+
& i.svg,
25+
& span.svg {
26+
width: 12px;
27+
height: 12px;
28+
}
29+
}
30+
}

src/btn.styl

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -60,22 +60,6 @@
6060
margin-left: 8px;
6161
}
6262

63-
:global {
64-
.fa {
65-
font-size: 14px;
66-
margin-right: 8px;
67-
color: #666;
68-
}
69-
}
70-
71-
&.btn-icon-only {
72-
:global {
73-
.fa {
74-
margin-right: 0;
75-
}
76-
}
77-
}
78-
7963
// button with icon
8064
&.btn-icon-only {
8165
min-width: 0;

src/index.styl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@
55
@import "btn-group";
66
@import "dropdown-toggle";
77
@import "btn-form-validation";
8+
@import "btn-fa";
9+
@import "btn-svg";

0 commit comments

Comments
 (0)