Skip to content

Commit

Permalink
turning targeting computer off - finished refactoring font-size
Browse files Browse the repository at this point in the history
  • Loading branch information
polymetis committed Oct 16, 2012
1 parent badb557 commit ee47b4b
Showing 1 changed file with 12 additions and 92 deletions.
104 changes: 12 additions & 92 deletions app/assets/stylesheets/addons/_modular-scale-font-size.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,118 +44,40 @@ $root-font-multiplier: ($root-font-size / ($root-font-size * 0 + 1))/100;
}

@else if $ratio == minor-seventh {
@if $increment > 0 {
@for $i from 1 through $increment {
$value: ($value * 1.778);
}
}
@if $increment < 0 {
$increment: abs($increment);
@for $i from 1 through $increment {
$value: ($value / 1.778);
}
}
$ratio: 1.778;
}

@else if $ratio == major-seventh {
@if $increment > 0 {
@for $i from 1 through $increment {
$value: ($value * 1.875);
}
}
@if $increment < 0 {
$increment: abs($increment);
@for $i from 1 through $increment {
$value: ($value / 1.875);
}
}
$ratio: 1.875;
}

@else if $ratio == octave {
@if $increment > 0 {
@for $i from 1 through $increment {
$value: ($value * 2);
}
}
@if $increment < 0 {
$increment: abs($increment);
@for $i from 1 through $increment {
$value: ($value / 2);
}
}
$ratio: 2;
}

@else if $ratio == major-tenth {
@if $increment > 0 {
@for $i from 1 through $increment {
$value: ($value * 2.5);
}
}
@if $increment < 0 {
$increment: abs($increment);
@for $i from 1 through $increment {
$value: ($value / 2.5);
}
}
$ratio: 2.5;
}

@else if $ratio == major-eleventh {
@if $increment > 0 {
@for $i from 1 through $increment {
$value: ($value * 2.667);
}
}
@if $increment < 0 {
$increment: abs($increment);
@for $i from 1 through $increment {
$value: ($value / 2.667);
}
}
$ratio: 2.667;
}

@else if $ratio == major-twelfth {
@if $increment > 0 {
@for $i from 1 through $increment {
$value: ($value * 3);
}
}
@if $increment < 0 {
$increment: abs($increment);
@for $i from 1 through $increment {
$value: ($value / 3);
}
}
$ratio: 3;
}

@else if $ratio == double-octave {
@if $increment > 0 {
@for $i from 1 through $increment {
$value: ($value * 4);
}
}
@if $increment < 0 {
$increment: abs($increment);
@for $i from 1 through $increment {
$value: ($value / 4);
}
}
$ratio: 4;
}

@else if $ratio == golden {
@if $increment > 0 {
@for $i from 1 through $increment {
$value: ($value * 1.618);
}
}
@if $increment < 0 {
$increment: abs($increment);
@for $i from 1 through $increment {
$value: ($value / 1.618);
}
}
$ratio: 1.618;
}
@else {
@if $increment > 0 {
$ratio: $ratio;
}
@if $increment > 0 {
@for $i from 1 through $increment {
$value: ($value * $ratio);
}
Expand All @@ -165,10 +87,8 @@ $root-font-multiplier: ($root-font-size / ($root-font-size * 0 + 1))/100;
@for $i from 1 through $increment {
$value: ($value / $ratio);
}
}
}
}

font-size: $value * $root-font-multiplier * 16px;
font-size: $value * 1rem;
}

0 comments on commit ee47b4b

Please sign in to comment.