Skip to content

Instantly share code, notes, and snippets.

@heroheman
Created November 24, 2015 17:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save heroheman/807c60bc458719a11169 to your computer and use it in GitHub Desktop.
Save heroheman/807c60bc458719a11169 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<div class="teaser">
<div class=teaser__img>
<img src=http://placehold.it/350x100
</div>
<p class=teaser__text>
lorem ipsum
</p>
</div>
<div class="teaser--small no-js">
<div class=teaser__img>
<img src=http://placehold.it/350x100
</div>
<p class=teaser__text>
lorem ipsum
</p>
</div>
// ----
// libsass (v3.2.5)
// ----
.teaser{
max-width: 400px;
display: inline-block;
&--small{
@extend .teaser;
max-width: 200px;
}
&__img{
padding: 1rem;
.no-js &{
padding: 5rem;
}
}
&__text{
color: green;
}
}
.teaser, .teaser--small {
max-width: 400px;
display: inline-block;
}
.teaser--small {
max-width: 200px;
}
.teaser__img {
padding: 1rem;
}
.no-js .teaser__img {
padding: 5rem;
}
.teaser__text {
color: green;
}
<div class="teaser">
<div class=teaser__img>
<img src=http://placehold.it/350x100
</div>
<p class=teaser__text>
lorem ipsum
</p>
</div>
<div class="teaser--small no-js">
<div class=teaser__img>
<img src=http://placehold.it/350x100
</div>
<p class=teaser__text>
lorem ipsum
</p>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment