Skip to content

Instantly share code, notes, and snippets.

@hidoos
Created November 25, 2013 09:43
Show Gist options
  • Save hidoos/7638909 to your computer and use it in GitHub Desktop.
Save hidoos/7638909 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<button class="btn">
btn
</button>
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
@charset "utf-8";
$res:480px;
@mixin media-screen($res:480px){
@media only screen and (max-width:$res){
@content;
}
}
/**
* 使用mixin 配合 @content
*/
@include media-screen($res){
body{
width:200px;
}
.btn{
height:200px;
}
}
@charset "UTF-8";
/**
* 使用mixin 配合 @content
*/
@media only screen and (max-width: 480px) {
body {
width: 200px;
}
.btn {
height: 200px;
}
}
<button class="btn">
btn
</button>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment