Skip to content

Instantly share code, notes, and snippets.

@runa-ichinose
Last active August 29, 2015 14:21
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 runa-ichinose/a281ee14fbf5710ce6c5 to your computer and use it in GitHub Desktop.
Save runa-ichinose/a281ee14fbf5710ce6c5 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// 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;
}
}
@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