Skip to content

Instantly share code, notes, and snippets.

@twss
Created April 27, 2015 18:04
Show Gist options
  • Save twss/9f3aab146bde96104818 to your computer and use it in GitHub Desktop.
Save twss/9f3aab146bde96104818 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.6)
// Compass (v1.0.1)
// ----
$primary-3: #ddd;
@function round($val, $factor) {
$rounded: $val;
@if $factor > 1.0 {
$rounded: ceil($base-font-size * $factor);
}
@if $factor < 1.0 {
$rounded: floor($base-font-size * $factor);
}
@return $rounded;
}
$base-font-size: 14px;
$sizes: (
xs: 0.7,
s: 0.8,
m: 1.0,
l: 1.4,
xl: 1.8,
xxl: 2.0
);
input.input {
@each $name, $factor in $sizes {
&-#{$name} {
font-size: round($base-font-size, $factor);
}
}
}
input.input-xs {
font-size: 9px;
}
input.input-s {
font-size: 11px;
}
input.input-m {
font-size: 14px;
}
input.input-l {
font-size: 20px;
}
input.input-xl {
font-size: 26px;
}
input.input-xxl {
font-size: 28px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment