Skip to content

Commit 41e07bd

Browse files
committed
Make Mixins vs Extend article work better offline
1 parent 421aea0 commit 41e07bd

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

_posts/2016-02-25-mixins-better-for-performance.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ meta: "A look at the performance difference between Sass’ mixins and @extend"
88

99
When it comes to preprocessors, one of the most frequent questions I’m asked is
1010
<q>Mixins or `@extend`?</q> I’ve always been
11-
[quite](http://csswizardry.com/2014/01/extending-silent-classes-in-sass/)
12-
[vocal](http://csswizardry.com/2014/11/when-to-use-extend-when-to-use-a-mixin/)
13-
about this topic, and I firmly believe you should avoid `@extend` for a number
14-
of reasons:
11+
[quite](/2014/01/extending-silent-classes-in-sass/)
12+
[vocal](/2014/11/when-to-use-extend-when-to-use-a-mixin/) about this topic, and
13+
I firmly believe you should avoid `@extend` for a number of reasons:
1514

1615
1. It alters your source order, which is always risky in CSS.
1716
2. It creates awkward groupings in your code, putting unrelated selectors
@@ -88,7 +87,7 @@ Here’s what I did.
8887
font-weight: bold;
8988
line-height: 2;
9089
}
91-
90+
9291
.#{unique-id()}-#{$i} {
9392
@include foo;
9493
content: "ibf#{&}jaslbw";
@@ -100,7 +99,7 @@ Here’s what I did.
10099
font-weight: bold;
101100
line-height: 2;
102101
}
103-
102+
104103
.#{unique-id()}-#{$i} {
105104
@extend %foo;
106105
content: "ibf#{&}jaslbw";

0 commit comments

Comments
 (0)