diff --git a/index.html b/index.html index f098a340e521958118dadd4872dc0ef32386f647..74fa9668244f2fb3e5ddfddd7b6329a09c90401f 100644 --- a/index.html +++ b/index.html @@ -45,6 +45,12 @@
4
+
+ 512 +
+
+ 2048 +
diff --git a/style/main.css b/style/main.css index 0a5b1ec96727b87f48429c2a00739eabf2e503d4..e05c4fe848392dd9a0ad6481901211924e5b6e32 100644 --- a/style/main.css +++ b/style/main.css @@ -129,3 +129,30 @@ h1 { position: absolute; left: 363.75px; top: 363.75px; } + .tile.tile-2 { + background: #eee4da; } + .tile.tile-4 { + background: #ede0ca; } + .tile.tile-8 { + background: #edddba; } + .tile.tile-16 { + background: #eddaab; } + .tile.tile-32 { + background: #edd79b; } + .tile.tile-64 { + background: #edd48b; } + .tile.tile-128 { + background: #edd17c; + font-size: 45px; } + .tile.tile-256 { + background: #edce6c; + font-size: 45px; } + .tile.tile-512 { + background: #edcb5c; + font-size: 45px; } + .tile.tile-1024 { + background: #edc84d; + font-size: 35px; } + .tile.tile-2048 { + background: #edc53d; + font-size: 35px; } diff --git a/style/main.scss b/style/main.scss index 951f3718ef50439ea368efcc9dab706433d5ebaa..bae5889028f7d011d6c1cfe86c194d485677d754 100644 --- a/style/main.scss +++ b/style/main.scss @@ -1,3 +1,4 @@ +@import "helpers"; @import "fonts/clear-sans.css"; $field-width: 500px; @@ -7,6 +8,7 @@ $tile-size: ($field-width - $grid-spacing * ($grid-row-cells + 1)) / $grid-row-c $tile-border-radius: 3px; $tile-color: #eee4da; +$tile-gold-color: #edc22e; html, body { margin: 0; @@ -104,6 +106,27 @@ h1 { } } } + + $base: 2; + $exponent: 1; + $limit: 11; + + @while $exponent <= $limit { + $power: pow($base, $exponent); + $percent: (($exponent - 1) / $limit) * 100; + + &.tile-#{$power} { + background: mix($tile-gold-color, $tile-color, $percent); + + @if $power >= 100 and $power < 1000 { + font-size: 45px; + } @else if $power >= 1000 { + font-size: 35px; + } + } + + $exponent: $exponent + 1; + } }