|
57 | 57 | <a href="https://raw.github.com/typeplate/starter-kit/master/css/typeplate.css" data-name="CSS Port" class="dl-item btn"> |
58 | 58 | <i class="icon-download"></i>CSS |
59 | 59 | <hr> |
60 | | - <small>v1.1.3 | 11kb</small> |
| 60 | + <small>v1.1.4 | 10kb</small> |
61 | 61 | </a> |
| 62 | + |
62 | 63 | <a href="https://raw.github.com/typeplate/starter-kit/master/scss/typeplate-scss.zip" data-name="Sass Port" class="dl-item btn"> |
63 | 64 | <i class="icon-download"></i>Sass |
64 | 65 | <hr> |
65 | | - <small>v1.1.3 | 3kb</small> |
| 66 | + <small>v1.1.4 | 3kb</small> |
66 | 67 | </a> |
67 | 68 |
|
68 | 69 | <a href="https://github.com/typeplate/starter-kit" data-name="Bower Package" class="dl-item btn"> |
69 | 70 | <i class="icon-download"></i>Bower Pkg. |
70 | 71 | <hr> |
71 | | - <small>v1.1.3</small> |
| 72 | + <small>v1.1.4</small> |
72 | 73 | </a> |
73 | 74 | </div> |
74 | 75 | </nav> |
@@ -244,27 +245,40 @@ <h1 class="gamma section-title"><a class="perma-anchor" href="#base-type">§</a> |
244 | 245 | // divide 1 unit of measure by given font-size & return a relative em value |
245 | 246 |
|
246 | 247 | @function measure-margin($scale, $measure, $value) { |
247 | | - @return ($measure/$scale)#{$value}; |
| 248 | + $pixelValue: $measure/$scale; |
| 249 | + $remValue: $pixelValue * $font-base; |
| 250 | + |
| 251 | + @if $value == rem { |
| 252 | + @return $pixelValue#{$value}; |
| 253 | + } @else if $value == em { |
| 254 | + @return ($remValue/$scale)#{$value}; |
| 255 | + } @else { |
| 256 | + @return $remValue#{$value}; |
| 257 | + } |
248 | 258 | } |
249 | 259 |
|
250 | 260 | // $Mixin $Type-Scale |
251 | 261 | // -------------------------------------// |
252 | 262 |
|
253 | 263 | @mixin type-scale($scale, $base, $value, $measure:"") { |
254 | | - |
255 | 264 | @if $value == rem { |
256 | 265 | font-size: $scale#{px}; |
| 266 | + font-size: context-calc($scale, $base, $value); |
| 267 | + } @else if $value == em { |
| 268 | + font-size: context-calc($scale, $base, $value); |
| 269 | + } @else { |
| 270 | + font-size: $scale#{px}; |
257 | 271 | } |
258 | 272 |
|
259 | | - font-size: context-calc($scale, $base, $value); |
260 | | - |
261 | 273 | @if $measure != "" { |
262 | | - |
263 | 274 | @if $value == rem { |
264 | 275 | margin-bottom: measure-margin($scale, $measure, $value: px); |
| 276 | + margin-bottom: measure-margin($scale, $measure, $value); |
| 277 | + } @else if $value == em { |
| 278 | + margin-bottom: measure-margin($scale, $measure, $value: em); |
| 279 | + } @else { |
| 280 | + margin-bottom: measure-margin($scale, $measure, $value); |
265 | 281 | } |
266 | | - |
267 | | - margin-bottom: measure-margin($scale, $measure, $value); |
268 | 282 | } |
269 | 283 | } |
270 | 284 |
|
|
0 commit comments