Last active
August 29, 2015 14:21
-
-
Save runa-ichinose/a281ee14fbf5710ce6c5 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.4.13) | |
// Compass (v1.0.3) | |
// ---- | |
//ブレイクポイントを設定 | |
$bp-table: 1024px; | |
$bp-sp: 640px; | |
$bp-iphone: 320px; | |
// メディアクエリ用のミックスイン | |
@mixiin media($media-width) { | |
@if $media-width == sp { | |
@media only screen and (max-width: $bp-sp) { | |
@content; | |
} | |
} | |
@else if $media-width == iphone { | |
@media only screen and (max-width: $bp-iphone) { | |
@content; | |
} | |
} | |
@else if $media-width == tablet { | |
@media only screen and (max-width: $bp-tablet) { | |
@content; | |
} | |
} | |
} | |
/************************ | |
**********************/ | |
#main { | |
float: left; | |
width: 610px; | |
padding: 15px; | |
background: #f1f1f1; | |
@include media(tablet) { | |
float: none; | |
margin: 0 auto; | |
} | |
@include media(sp) { | |
width: auto; | |
margin: 0 10px; | |
} | |
@include media(iphone) { | |
width: 100%; | |
margin: 0; | |
} | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@content may only be used within a mixin. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment