Skip to content

Instantly share code, notes, and snippets.

@scottkellum
Created May 16, 2014 14:46
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 scottkellum/89bf845724a60dc3e8b4 to your computer and use it in GitHub Desktop.
Save scottkellum/89bf845724a60dc3e8b4 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.7)
// Compass (v1.0.0.alpha.18)
// Modular Scale (v2.0.5)
// ----
@import "modular-scale";
// Set default ratio
$ms-ratio: $augmented-fourth;
// Ratios for different sizes
$large-ratio: $augmented-fourth;
$small-ratio: $minor-third;
@mixin ratio($size) {
@if $size == large {
$ms-ratio: $large-ratio;
}
@if $size == small {
$ms-ratio: $small-ratio;
}
@content;
}
foo {
font-size: ms(1);
@media (min-width: 40em) {
@include ratio(small) {
font-size: ms(1);
}
}
}
foo {
font-size: 1.41421em;
}
@media (min-width: 40em) {
foo {
font-size: 1.2em;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment