guff-compass 0.7.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +14 -2
- data/demo/index.html +22 -1
- data/demo/styles/main.css +9 -2
- data/docs/guff.html +46 -17
- data/guff.gemspec +1 -1
- data/guff.scss +28 -11
- data/lib/stylesheets/_guff.scss +28 -11
- data/package.json +1 -1
- data/sache.json +5 -0
- data/src/_mixins.scss +1 -1
- data/src/_typography.scss +27 -10
- metadata +3 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7191c95bdd3dd35be6f59fbe563b079b9d706a44
|
4
|
+
data.tar.gz: 75b0ccfd3787ead16371733563f99f8d69ea2fee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6321222d9055dc402320f7f19a00e5ef495713e6d3fd4e40bcc88b69cc1ea382101bcc76c318ac891db1b24451b349f972b8f4177f067d96dcb32f25afeba7a
|
7
|
+
data.tar.gz: 8364be125aea6e3d683ff66839556222dce56f408375377ad16ee0e35cc64b439ba1fec4e60bc92c8ba3457b60e2f2c8c4405c1c80cb937a5bee462c0132a55e
|
data/README.md
CHANGED
@@ -10,12 +10,24 @@ It is the most helpful, most used functions,mixins and helpers, for use in actua
|
|
10
10
|
|
11
11
|
### Installation
|
12
12
|
|
13
|
-
You can either manually use the guff.scss file or use
|
13
|
+
You can either manually use the guff.scss file, use bower, or use compass.
|
14
|
+
|
15
|
+
####Using Bower
|
14
16
|
|
15
17
|
bower install guff
|
16
18
|
|
17
|
-
In your
|
19
|
+
In your Sass file:
|
18
20
|
|
19
21
|
@import "guff"
|
20
22
|
|
23
|
+
####Using Compass:
|
24
|
+
|
25
|
+
gem install guff-compass
|
26
|
+
|
27
|
+
In your config.rb
|
28
|
+
|
29
|
+
require "guff"
|
30
|
+
|
31
|
+
In your Sass file:
|
21
32
|
|
33
|
+
@import "guff"
|
data/demo/index.html
CHANGED
@@ -174,11 +174,32 @@ div {
|
|
174
174
|
<h2>rem-calc()</h2>
|
175
175
|
</header>
|
176
176
|
<code class="prettyprint">
|
177
|
+
// rem-calc(int)
|
177
178
|
// Calculates rem value for px value
|
178
179
|
|
179
180
|
font-size: rem-calc(14);
|
180
181
|
</code>
|
181
182
|
</section>
|
183
|
+
<section>
|
184
|
+
<header>
|
185
|
+
<h2>safe-rem()</h2>
|
186
|
+
</header>
|
187
|
+
<code class="prettyprint">
|
188
|
+
// property : string
|
189
|
+
// num : int
|
190
|
+
|
191
|
+
@include safe-rem(property, num);
|
192
|
+
|
193
|
+
// Calculates rem value for px value and renders both for compatibility fallback
|
194
|
+
|
195
|
+
@include safe-rem(font-size, 14);
|
196
|
+
|
197
|
+
// Outputs:
|
198
|
+
|
199
|
+
font-size: 14px;
|
200
|
+
font-size: 0.875rem;
|
201
|
+
</code>
|
202
|
+
</section>
|
182
203
|
<section>
|
183
204
|
<header>
|
184
205
|
<h2>Helper Mixins</h2>
|
@@ -289,7 +310,7 @@ gem install guff-compass
|
|
289
310
|
|
290
311
|
// In your config.rb file
|
291
312
|
|
292
|
-
require "guff
|
313
|
+
require "guff"
|
293
314
|
|
294
315
|
// In your SCSS file
|
295
316
|
|
data/demo/styles/main.css
CHANGED
@@ -41,25 +41,32 @@ body {
|
|
41
41
|
line-height: 1.625; }
|
42
42
|
|
43
43
|
h1 {
|
44
|
+
font-size: 35px;
|
44
45
|
font-size: 2.1875rem; }
|
45
46
|
|
46
47
|
h2 {
|
48
|
+
font-size: 31px;
|
47
49
|
font-size: 1.9375rem; }
|
48
50
|
|
49
51
|
h3 {
|
52
|
+
font-size: 27px;
|
50
53
|
font-size: 1.6875rem; }
|
51
54
|
|
52
55
|
h4 {
|
56
|
+
font-size: 24px;
|
53
57
|
font-size: 1.5rem; }
|
54
58
|
|
55
59
|
h5 {
|
60
|
+
font-size: 21px;
|
56
61
|
font-size: 1.3125rem; }
|
57
62
|
|
58
63
|
h6 {
|
64
|
+
font-size: 18px;
|
59
65
|
font-size: 1.125rem; }
|
60
66
|
|
61
67
|
p {
|
62
|
-
font-size: 16px;
|
68
|
+
font-size: 16px;
|
69
|
+
font-size: 1rem; }
|
63
70
|
|
64
71
|
body {
|
65
72
|
font-family: "Lucida Grande", Tahoma, Verdana, Arial, sans-serif; }
|
@@ -185,7 +192,7 @@ main {
|
|
185
192
|
margin-bottom: 20px; }
|
186
193
|
main section .col-container > * {
|
187
194
|
text-align: left;
|
188
|
-
font-
|
195
|
+
font-size: 1rem; }
|
189
196
|
main section .col-container:after {
|
190
197
|
content: '';
|
191
198
|
display: inline-block;
|
data/docs/guff.html
CHANGED
@@ -559,7 +559,7 @@
|
|
559
559
|
<span class="hljs-attribute">max-width</span><span class="hljs-value">: $grid-max-width;</span>
|
560
560
|
& > * {
|
561
561
|
<span class="hljs-attribute">text-align</span><span class="hljs-value">: left;</span>
|
562
|
-
<span class="hljs-attribute">font</span
|
562
|
+
<span class="hljs-attribute">font-size</span><span class="hljs-value">: rem-calc($rem-base);</span>
|
563
563
|
}
|
564
564
|
&<span class="hljs-pseudo">:after</span> {
|
565
565
|
<span class="hljs-attribute">content</span><span class="hljs-value">: <span class="hljs-string">''</span>;</span>
|
@@ -1012,6 +1012,35 @@
|
|
1012
1012
|
<div class="pilwrap ">
|
1013
1013
|
<a class="pilcrow" href="#section-45">¶</a>
|
1014
1014
|
</div>
|
1015
|
+
<p>Safe Rem</p>
|
1016
|
+
|
1017
|
+
</div>
|
1018
|
+
|
1019
|
+
<div class="content"><div class='highlight'><pre><span class="hljs-at_rule">@<span class="hljs-keyword">mixin</span><span class="hljs-preprocessor"> safe-rem</span>($property:<span class="hljs-preprocessor"> font-size</span>, $num:<span class="hljs-preprocessor"> 14</span>){</span>
|
1020
|
+
$valid<span class="hljs-value">: true;</span>
|
1021
|
+
<span class="hljs-at_rule">@<span class="hljs-keyword">if</span><span class="hljs-preprocessor"> type-of</span>($property) != <span class="hljs-string">"string"</span> {</span>
|
1022
|
+
<span class="hljs-at_rule">@<span class="hljs-keyword">warn</span> <span class="hljs-string">"property: #{$property} is not a string"</span>;</span>
|
1023
|
+
$valid<span class="hljs-value">: false;</span>
|
1024
|
+
}
|
1025
|
+
<span class="hljs-at_rule">@<span class="hljs-keyword">if</span><span class="hljs-preprocessor"> type-of</span>($num) != <span class="hljs-string">"number"</span> {</span>
|
1026
|
+
<span class="hljs-at_rule">@<span class="hljs-keyword">warn</span> <span class="hljs-string">"num: #{$num} is not a number"</span>;</span>
|
1027
|
+
$valid<span class="hljs-value">: false;</span>
|
1028
|
+
}
|
1029
|
+
<span class="hljs-at_rule">@<span class="hljs-keyword">if</span> $valid ==<span class="hljs-preprocessor"> true</span> {</span>
|
1030
|
+
#{$property}<span class="hljs-value">: #{_strip-unit($num)}px;</span>
|
1031
|
+
#{$property}<span class="hljs-value">: rem-calc($num);</span>
|
1032
|
+
}
|
1033
|
+
}</pre></div></div>
|
1034
|
+
|
1035
|
+
</li>
|
1036
|
+
|
1037
|
+
|
1038
|
+
<li id="section-46">
|
1039
|
+
<div class="annotation">
|
1040
|
+
|
1041
|
+
<div class="pilwrap ">
|
1042
|
+
<a class="pilcrow" href="#section-46">¶</a>
|
1043
|
+
</div>
|
1015
1044
|
<p>Typographic Rhythm Mixin</p>
|
1016
1045
|
|
1017
1046
|
</div>
|
@@ -1019,15 +1048,15 @@
|
|
1019
1048
|
<div class="content"><div class='highlight'><pre><span class="hljs-at_rule">@<span class="hljs-keyword">mixin</span><span class="hljs-preprocessor"> type</span>($rem-base: $rem-base,$line-height-base: $line-height-base, $type-rhythm-ratio: $type-rhythm-ratio){</span>
|
1020
1049
|
$valid<span class="hljs-value">: true;</span>
|
1021
1050
|
<span class="hljs-at_rule">@<span class="hljs-keyword">if</span><span class="hljs-preprocessor"> type-of</span>($rem-base) != <span class="hljs-string">"number"</span> {</span>
|
1022
|
-
<span class="hljs-at_rule">@<span class="hljs-keyword">warn</span> <span class="hljs-string">"#{$rem-base} is not a number"</span>;</span>
|
1051
|
+
<span class="hljs-at_rule">@<span class="hljs-keyword">warn</span> <span class="hljs-string">"rem-base: #{$rem-base} is not a number"</span>;</span>
|
1023
1052
|
$valid<span class="hljs-value">: false;</span>
|
1024
1053
|
}
|
1025
1054
|
<span class="hljs-at_rule">@<span class="hljs-keyword">if</span><span class="hljs-preprocessor"> type-of</span>($line-height-base) != <span class="hljs-string">"number"</span> {</span>
|
1026
|
-
<span class="hljs-at_rule">@<span class="hljs-keyword">warn</span> <span class="hljs-string">"#{$line-height-base} is not a number"</span>;</span>
|
1055
|
+
<span class="hljs-at_rule">@<span class="hljs-keyword">warn</span> <span class="hljs-string">"line-height: #{$line-height-base} is not a number"</span>;</span>
|
1027
1056
|
$valid<span class="hljs-value">: false;</span>
|
1028
1057
|
}
|
1029
1058
|
<span class="hljs-at_rule">@<span class="hljs-keyword">if</span><span class="hljs-preprocessor"> type-of</span>($type-rhythm-ratio) != <span class="hljs-string">"number"</span> {</span>
|
1030
|
-
<span class="hljs-at_rule">@<span class="hljs-keyword">warn</span> <span class="hljs-string">"#{$type-rhythm-ratio} is not a number"</span>;</span>
|
1059
|
+
<span class="hljs-at_rule">@<span class="hljs-keyword">warn</span> <span class="hljs-string">"type-rhythm-ratio: #{$type-rhythm-ratio} is not a number"</span>;</span>
|
1031
1060
|
$valid<span class="hljs-value">: false;</span>
|
1032
1061
|
}
|
1033
1062
|
<span class="hljs-at_rule">@<span class="hljs-keyword">if</span> $valid ==<span class="hljs-preprocessor"> true</span> {</span></pre></div></div>
|
@@ -1035,11 +1064,11 @@
|
|
1035
1064
|
</li>
|
1036
1065
|
|
1037
1066
|
|
1038
|
-
<li id="section-
|
1067
|
+
<li id="section-47">
|
1039
1068
|
<div class="annotation">
|
1040
1069
|
|
1041
1070
|
<div class="pilwrap ">
|
1042
|
-
<a class="pilcrow" href="#section-
|
1071
|
+
<a class="pilcrow" href="#section-47">¶</a>
|
1043
1072
|
</div>
|
1044
1073
|
<p>Scale type at $type-rhythm-ratio</p>
|
1045
1074
|
|
@@ -1057,11 +1086,11 @@
|
|
1057
1086
|
</li>
|
1058
1087
|
|
1059
1088
|
|
1060
|
-
<li id="section-
|
1089
|
+
<li id="section-48">
|
1061
1090
|
<div class="annotation">
|
1062
1091
|
|
1063
1092
|
<div class="pilwrap ">
|
1064
|
-
<a class="pilcrow" href="#section-
|
1093
|
+
<a class="pilcrow" href="#section-48">¶</a>
|
1065
1094
|
</div>
|
1066
1095
|
<p>Set line-height</p>
|
1067
1096
|
|
@@ -1079,42 +1108,42 @@
|
|
1079
1108
|
</li>
|
1080
1109
|
|
1081
1110
|
|
1082
|
-
<li id="section-
|
1111
|
+
<li id="section-49">
|
1083
1112
|
<div class="annotation">
|
1084
1113
|
|
1085
1114
|
<div class="pilwrap ">
|
1086
|
-
<a class="pilcrow" href="#section-
|
1115
|
+
<a class="pilcrow" href="#section-49">¶</a>
|
1087
1116
|
</div>
|
1088
1117
|
<p>Set heading sizes to size variables</p>
|
1089
1118
|
|
1090
1119
|
</div>
|
1091
1120
|
|
1092
1121
|
<div class="content"><div class='highlight'><pre> <span class="hljs-tag">h1</span> {
|
1093
|
-
<span class="hljs-
|
1122
|
+
<span class="hljs-at_rule">@<span class="hljs-keyword">include</span><span class="hljs-preprocessor"> safe-rem</span>(font-size, $h1-size);</span>
|
1094
1123
|
}
|
1095
1124
|
|
1096
1125
|
<span class="hljs-tag">h2</span> {
|
1097
|
-
<span class="hljs-
|
1126
|
+
<span class="hljs-at_rule">@<span class="hljs-keyword">include</span><span class="hljs-preprocessor"> safe-rem</span>(font-size, $h2-size);</span>
|
1098
1127
|
}
|
1099
1128
|
|
1100
1129
|
<span class="hljs-tag">h3</span> {
|
1101
|
-
<span class="hljs-
|
1130
|
+
<span class="hljs-at_rule">@<span class="hljs-keyword">include</span><span class="hljs-preprocessor"> safe-rem</span>(font-size, $h3-size);</span>
|
1102
1131
|
}
|
1103
1132
|
|
1104
1133
|
<span class="hljs-tag">h4</span> {
|
1105
|
-
<span class="hljs-
|
1134
|
+
<span class="hljs-at_rule">@<span class="hljs-keyword">include</span><span class="hljs-preprocessor"> safe-rem</span>(font-size, $h4-size);</span>
|
1106
1135
|
}
|
1107
1136
|
|
1108
1137
|
<span class="hljs-tag">h5</span> {
|
1109
|
-
<span class="hljs-
|
1138
|
+
<span class="hljs-at_rule">@<span class="hljs-keyword">include</span><span class="hljs-preprocessor"> safe-rem</span>(font-size, $h5-size);</span>
|
1110
1139
|
}
|
1111
1140
|
|
1112
1141
|
<span class="hljs-tag">h6</span> {
|
1113
|
-
<span class="hljs-
|
1142
|
+
<span class="hljs-at_rule">@<span class="hljs-keyword">include</span><span class="hljs-preprocessor"> safe-rem</span>(font-size, $h6-size);</span>
|
1114
1143
|
}
|
1115
1144
|
|
1116
1145
|
<span class="hljs-tag">p</span> {
|
1117
|
-
<span class="hljs-
|
1146
|
+
<span class="hljs-at_rule">@<span class="hljs-keyword">include</span><span class="hljs-preprocessor"> safe-rem</span>(font-size, $rem-base);</span>
|
1118
1147
|
}
|
1119
1148
|
}
|
1120
1149
|
}</pre></div></div>
|
data/guff.gemspec
CHANGED
data/guff.scss
CHANGED
@@ -183,7 +183,7 @@ $grid-max-width: 1024px !default;
|
|
183
183
|
max-width: $grid-max-width;
|
184
184
|
& > * {
|
185
185
|
text-align: left;
|
186
|
-
font-
|
186
|
+
font-size: rem-calc($rem-base);
|
187
187
|
}
|
188
188
|
&:after {
|
189
189
|
content: '';
|
@@ -447,19 +447,36 @@ $grid-max-width: 1024px !default;
|
|
447
447
|
}
|
448
448
|
// ###Typography
|
449
449
|
|
450
|
+
// Safe Rem
|
451
|
+
@mixin safe-rem($property: font-size, $num: 14){
|
452
|
+
$valid: true;
|
453
|
+
@if type-of($property) != "string" {
|
454
|
+
@warn "property: #{$property} is not a string";
|
455
|
+
$valid: false;
|
456
|
+
}
|
457
|
+
@if type-of($num) != "number" {
|
458
|
+
@warn "num: #{$num} is not a number";
|
459
|
+
$valid: false;
|
460
|
+
}
|
461
|
+
@if $valid == true {
|
462
|
+
#{$property}: #{_strip-unit($num)}px;
|
463
|
+
#{$property}: rem-calc($num);
|
464
|
+
}
|
465
|
+
}
|
466
|
+
|
450
467
|
// Typographic Rhythm Mixin
|
451
468
|
@mixin type($rem-base: $rem-base,$line-height-base: $line-height-base, $type-rhythm-ratio: $type-rhythm-ratio){
|
452
469
|
$valid: true;
|
453
470
|
@if type-of($rem-base) != "number" {
|
454
|
-
@warn "#{$rem-base} is not a number";
|
471
|
+
@warn "rem-base: #{$rem-base} is not a number";
|
455
472
|
$valid: false;
|
456
473
|
}
|
457
474
|
@if type-of($line-height-base) != "number" {
|
458
|
-
@warn "#{$line-height-base} is not a number";
|
475
|
+
@warn "line-height: #{$line-height-base} is not a number";
|
459
476
|
$valid: false;
|
460
477
|
}
|
461
478
|
@if type-of($type-rhythm-ratio) != "number" {
|
462
|
-
@warn "#{$type-rhythm-ratio} is not a number";
|
479
|
+
@warn "type-rhythm-ratio: #{$type-rhythm-ratio} is not a number";
|
463
480
|
$valid: false;
|
464
481
|
}
|
465
482
|
@if $valid == true {
|
@@ -484,31 +501,31 @@ $grid-max-width: 1024px !default;
|
|
484
501
|
|
485
502
|
// Set heading sizes to size variables
|
486
503
|
h1 {
|
487
|
-
font-size
|
504
|
+
@include safe-rem(font-size, $h1-size);
|
488
505
|
}
|
489
506
|
|
490
507
|
h2 {
|
491
|
-
font-size
|
508
|
+
@include safe-rem(font-size, $h2-size);
|
492
509
|
}
|
493
510
|
|
494
511
|
h3 {
|
495
|
-
font-size
|
512
|
+
@include safe-rem(font-size, $h3-size);
|
496
513
|
}
|
497
514
|
|
498
515
|
h4 {
|
499
|
-
font-size
|
516
|
+
@include safe-rem(font-size, $h4-size);
|
500
517
|
}
|
501
518
|
|
502
519
|
h5 {
|
503
|
-
font-size
|
520
|
+
@include safe-rem(font-size, $h5-size);
|
504
521
|
}
|
505
522
|
|
506
523
|
h6 {
|
507
|
-
font-size
|
524
|
+
@include safe-rem(font-size, $h6-size);
|
508
525
|
}
|
509
526
|
|
510
527
|
p {
|
511
|
-
font-size
|
528
|
+
@include safe-rem(font-size, $rem-base);
|
512
529
|
}
|
513
530
|
}
|
514
531
|
}
|
data/lib/stylesheets/_guff.scss
CHANGED
@@ -183,7 +183,7 @@ $grid-max-width: 1024px !default;
|
|
183
183
|
max-width: $grid-max-width;
|
184
184
|
& > * {
|
185
185
|
text-align: left;
|
186
|
-
font-
|
186
|
+
font-size: rem-calc($rem-base);
|
187
187
|
}
|
188
188
|
&:after {
|
189
189
|
content: '';
|
@@ -447,19 +447,36 @@ $grid-max-width: 1024px !default;
|
|
447
447
|
}
|
448
448
|
// ###Typography
|
449
449
|
|
450
|
+
// Safe Rem
|
451
|
+
@mixin safe-rem($property: font-size, $num: 14){
|
452
|
+
$valid: true;
|
453
|
+
@if type-of($property) != "string" {
|
454
|
+
@warn "property: #{$property} is not a string";
|
455
|
+
$valid: false;
|
456
|
+
}
|
457
|
+
@if type-of($num) != "number" {
|
458
|
+
@warn "num: #{$num} is not a number";
|
459
|
+
$valid: false;
|
460
|
+
}
|
461
|
+
@if $valid == true {
|
462
|
+
#{$property}: #{_strip-unit($num)}px;
|
463
|
+
#{$property}: rem-calc($num);
|
464
|
+
}
|
465
|
+
}
|
466
|
+
|
450
467
|
// Typographic Rhythm Mixin
|
451
468
|
@mixin type($rem-base: $rem-base,$line-height-base: $line-height-base, $type-rhythm-ratio: $type-rhythm-ratio){
|
452
469
|
$valid: true;
|
453
470
|
@if type-of($rem-base) != "number" {
|
454
|
-
@warn "#{$rem-base} is not a number";
|
471
|
+
@warn "rem-base: #{$rem-base} is not a number";
|
455
472
|
$valid: false;
|
456
473
|
}
|
457
474
|
@if type-of($line-height-base) != "number" {
|
458
|
-
@warn "#{$line-height-base} is not a number";
|
475
|
+
@warn "line-height: #{$line-height-base} is not a number";
|
459
476
|
$valid: false;
|
460
477
|
}
|
461
478
|
@if type-of($type-rhythm-ratio) != "number" {
|
462
|
-
@warn "#{$type-rhythm-ratio} is not a number";
|
479
|
+
@warn "type-rhythm-ratio: #{$type-rhythm-ratio} is not a number";
|
463
480
|
$valid: false;
|
464
481
|
}
|
465
482
|
@if $valid == true {
|
@@ -484,31 +501,31 @@ $grid-max-width: 1024px !default;
|
|
484
501
|
|
485
502
|
// Set heading sizes to size variables
|
486
503
|
h1 {
|
487
|
-
font-size
|
504
|
+
@include safe-rem(font-size, $h1-size);
|
488
505
|
}
|
489
506
|
|
490
507
|
h2 {
|
491
|
-
font-size
|
508
|
+
@include safe-rem(font-size, $h2-size);
|
492
509
|
}
|
493
510
|
|
494
511
|
h3 {
|
495
|
-
font-size
|
512
|
+
@include safe-rem(font-size, $h3-size);
|
496
513
|
}
|
497
514
|
|
498
515
|
h4 {
|
499
|
-
font-size
|
516
|
+
@include safe-rem(font-size, $h4-size);
|
500
517
|
}
|
501
518
|
|
502
519
|
h5 {
|
503
|
-
font-size
|
520
|
+
@include safe-rem(font-size, $h5-size);
|
504
521
|
}
|
505
522
|
|
506
523
|
h6 {
|
507
|
-
font-size
|
524
|
+
@include safe-rem(font-size, $h6-size);
|
508
525
|
}
|
509
526
|
|
510
527
|
p {
|
511
|
-
font-size
|
528
|
+
@include safe-rem(font-size, $rem-base);
|
512
529
|
}
|
513
530
|
}
|
514
531
|
}
|
data/package.json
CHANGED
data/sache.json
ADDED
data/src/_mixins.scss
CHANGED
data/src/_typography.scss
CHANGED
@@ -1,18 +1,35 @@
|
|
1
1
|
// ###Typography
|
2
2
|
|
3
|
+
// Safe Rem
|
4
|
+
@mixin safe-rem($property: font-size, $num: 14){
|
5
|
+
$valid: true;
|
6
|
+
@if type-of($property) != "string" {
|
7
|
+
@warn "property: #{$property} is not a string";
|
8
|
+
$valid: false;
|
9
|
+
}
|
10
|
+
@if type-of($num) != "number" {
|
11
|
+
@warn "num: #{$num} is not a number";
|
12
|
+
$valid: false;
|
13
|
+
}
|
14
|
+
@if $valid == true {
|
15
|
+
#{$property}: #{_strip-unit($num)}px;
|
16
|
+
#{$property}: rem-calc($num);
|
17
|
+
}
|
18
|
+
}
|
19
|
+
|
3
20
|
// Typographic Rhythm Mixin
|
4
21
|
@mixin type($rem-base: $rem-base,$line-height-base: $line-height-base, $type-rhythm-ratio: $type-rhythm-ratio){
|
5
22
|
$valid: true;
|
6
23
|
@if type-of($rem-base) != "number" {
|
7
|
-
@warn "#{$rem-base} is not a number";
|
24
|
+
@warn "rem-base: #{$rem-base} is not a number";
|
8
25
|
$valid: false;
|
9
26
|
}
|
10
27
|
@if type-of($line-height-base) != "number" {
|
11
|
-
@warn "#{$line-height-base} is not a number";
|
28
|
+
@warn "line-height: #{$line-height-base} is not a number";
|
12
29
|
$valid: false;
|
13
30
|
}
|
14
31
|
@if type-of($type-rhythm-ratio) != "number" {
|
15
|
-
@warn "#{$type-rhythm-ratio} is not a number";
|
32
|
+
@warn "type-rhythm-ratio: #{$type-rhythm-ratio} is not a number";
|
16
33
|
$valid: false;
|
17
34
|
}
|
18
35
|
@if $valid == true {
|
@@ -37,31 +54,31 @@
|
|
37
54
|
|
38
55
|
// Set heading sizes to size variables
|
39
56
|
h1 {
|
40
|
-
font-size
|
57
|
+
@include safe-rem(font-size, $h1-size);
|
41
58
|
}
|
42
59
|
|
43
60
|
h2 {
|
44
|
-
font-size
|
61
|
+
@include safe-rem(font-size, $h2-size);
|
45
62
|
}
|
46
63
|
|
47
64
|
h3 {
|
48
|
-
font-size
|
65
|
+
@include safe-rem(font-size, $h3-size);
|
49
66
|
}
|
50
67
|
|
51
68
|
h4 {
|
52
|
-
font-size
|
69
|
+
@include safe-rem(font-size, $h4-size);
|
53
70
|
}
|
54
71
|
|
55
72
|
h5 {
|
56
|
-
font-size
|
73
|
+
@include safe-rem(font-size, $h5-size);
|
57
74
|
}
|
58
75
|
|
59
76
|
h6 {
|
60
|
-
font-size
|
77
|
+
@include safe-rem(font-size, $h6-size);
|
61
78
|
}
|
62
79
|
|
63
80
|
p {
|
64
|
-
font-size
|
81
|
+
@include safe-rem(font-size, $rem-base);
|
65
82
|
}
|
66
83
|
}
|
67
84
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guff-compass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ken Wheeler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sass
|
@@ -47,10 +47,8 @@ extra_rdoc_files: []
|
|
47
47
|
files:
|
48
48
|
- .editorconfig
|
49
49
|
- .gitignore
|
50
|
-
- Gemfile
|
51
50
|
- LICENSE.txt
|
52
51
|
- README.md
|
53
|
-
- Rakefile
|
54
52
|
- demo/bower_components/jquery/.bower.json
|
55
53
|
- demo/bower_components/jquery/.editorconfig
|
56
54
|
- demo/bower_components/jquery/.gitattributes
|
@@ -226,7 +224,7 @@ files:
|
|
226
224
|
- lib/guff.rb
|
227
225
|
- lib/stylesheets/_guff.scss
|
228
226
|
- package.json
|
229
|
-
-
|
227
|
+
- sache.json
|
230
228
|
- src/_functions.scss
|
231
229
|
- src/_mixins.scss
|
232
230
|
- src/_reset.scss
|