sane-scale 0.1 → 0.1.1

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +23 -11
  3. data/lib/sane-scale.rb +1 -1
  4. metadata +9 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f1c3c844f2da6800cc3529504aeb55450d04b506
4
- data.tar.gz: b19e2024fc6edf08ae908ebbb754d55a9ad9bf5b
3
+ metadata.gz: c5734fde33fb8a03d19b896e40a7bfe4d74666a5
4
+ data.tar.gz: d2d5e9bdb9d31bdb78728f943d05d0a29955d01c
5
5
  SHA512:
6
- metadata.gz: 351aeacda072ea1ee1ef212703139bdbe357beb3090a041d529b1aafd30c0fa05f84c45604b3699570ce7f168c86f9d5c6b0fb2848407865d03fc03c92f387a7
7
- data.tar.gz: 1c28ba05d43e6ebefd652160702160ee808a5a8c56a0c0003df65a48f89f11349137796db58270ddc6a7c6c0d6df17baa21ed424a95e17377e72b1c277480c97
6
+ metadata.gz: 6a9a2ed2c1a1335f6337d3b52dca1463d8eadc276f034f61a891924480b3d6990111ac0c9ef7d5e241ce40300acd68b2f7fc50d186198ddaf29bec7c429f0518
7
+ data.tar.gz: a2475167ce92d286c5f204199ff19a2faf30ff51db99cf018162e71ffbf706ece68ea08c198b6b4c492fe29856e7976cd427f7c05bd4910e8c4fa4a061dfd665
data/README.md CHANGED
@@ -2,18 +2,24 @@
2
2
 
3
3
  Sane Scale is a framework for defining and applying typographic styles. Its goal is to generate a complex, nuanced typographic system from only a few key variables.
4
4
 
5
+
6
+
5
7
  ## Features
6
8
 
7
9
  1. Modular. Typographic measurements are based on proportional lists of values.
8
10
  2. Responsive. Typography adjusts to the constraints of each breakpoint.
9
11
  3. Font rebalancing. Different fonts set to the same size often don't appear to be. Fonts are normalized, so every font appears to be exactly the size you intend.
10
12
 
13
+
14
+
11
15
  ## Install
12
16
 
13
17
  * Terminal: `gem install sane-scale`
14
18
  * Compass config.rb: `require 'sane-scale'`
15
19
  * SCSS: `@import 'sane-scale';`
16
20
 
21
+
22
+
17
23
  ## Usage
18
24
 
19
25
  ### Declare your fonts
@@ -41,13 +47,15 @@ $font-feather: (
41
47
  );
42
48
  ```
43
49
 
44
- Oftentimes two fonts set to different sizes do not appear to be the same size. This is because the height of their lowercase letters is not equal. The `normalize-ratio` is the ratio we'll use to adjust the size of anything set in this font.
50
+ Oftentimes two fonts set to the same size do not appear to be. This is because the heights of their lowercase letters are not equal. By using the `normalize-ratio` property, additional fonts can be normalized to the default font. This will ensure they align to the modular scale.
51
+
52
+ As an example, Verdana appears 11% larger than Georgia. To normalize it with Georgia, we can set a `normalize-ratio: 0.89`. This will cause Verdana to be 11% smaller than Georgia when both are set to the same size.
53
+
45
54
 
46
- For example, Verdana appears 11% larger than Georgia. To normalize it with Georgia, we need to decrease size by 11% (normalize-ratio: 0.89). The normalized sizes of Verdana will appear to be the same size as Georgia.
47
55
 
48
56
  ### Define your breakpoints
49
57
 
50
- Sane scale uses a SASS map of breakpoints (with relevant parameters) in the following format:
58
+ Sane Scale uses a SASS map of breakpoints (with relevant parameters) in the following format:
51
59
 
52
60
  ```scss
53
61
  $breakpoints: (
@@ -72,9 +80,11 @@ $breakpoints: (
72
80
  )
73
81
  );
74
82
  ```
75
- For each breakpoint, you'll need to specify a font-size and line-height for both the base size and the max size. Additional sizes and line-heights will be interpolated from these constraints.
83
+ For each breakpoint, you'll need to specify a font-size and line-height for both the base size and the max size. Additional font-sizes and line-heights will be interpolated from these constraints.
84
+
85
+ A `media-query` property should also be set for each, exluding the default breakpoint. Feel free to name the other breakpoints whatever you like.
86
+
76
87
 
77
- You'll also need to specify a `media-query` for all breakpoints, excluding your `default` breakpoint. Feel free to name the other breakpoints whatever you like.
78
88
 
79
89
  ### Build the scale
80
90
 
@@ -86,28 +96,30 @@ $numb-larger-sizes: 4;
86
96
 
87
97
  $sane-scale: ss-make-responsive-font-scale($breakpoints, $numb-smaller-sizes, $numb-larger-sizes);
88
98
  ```
89
- That's it! Note that `sane-scale` is a key variable. This map will be used by the following mixins to lookup and apply sizes.
99
+ That's it! Note that `$sane-scale` is a key variable. This map will be used by the following mixins to lookup and apply sizes.
100
+
101
+
90
102
 
91
103
  ### Apply responsize sizing
92
104
 
93
105
  Use `@include ss-set-responsive-font-size($font, $size)` to apply a responsive size. The sizes available to you are based on your parameters:
94
106
  * 0 is your base size.
95
- * 1, 2, 3... are your increasingly large sizes.
96
- * -1, -2, -3... are your increasingly small sizes.
107
+ * 1, 2, 3... are your increasingly larger sizes.
108
+ * -1, -2, -3... are your increasingly smaller sizes.
97
109
 
98
110
  ```scss
99
- p.lead {
111
+ .lead {
100
112
  @include ss-set-responsive-font-size($font-georgia, 1);
101
113
  }
102
114
  ```
103
- We just created a responsive lead paragraph style. It will use `$font-georgia` at size 1 for each breakpoint: 20.1px by default, and then resizing to 24.1px for tablets and larger.
115
+ We just applied responsive styling to a lead paragraph style. It will use `$font-georgia` at size 1 for each breakpoint: 20.1px by default, and then resizing to 24.1px for tablets and larger.
104
116
 
105
117
  ```scss
106
118
  .h4 {
107
119
  @include ss-set-responsive-font-size($font-verdana, 1);
108
120
  }
109
121
  ```
110
- We justed used the same size `.h4` heading, but with `$font-verdana`. That will result in a font-size of 17.9px by default and 21.4px for tablets and larger. Mathematically different, but visually equal.
122
+ We used the same size for the `.h4` heading, but with `$font-verdana`. That will result in a font-size of 17.9px by default and 21.4px for tablets and larger. Mathematically different, but visually equal.
111
123
 
112
124
 
113
125
 
@@ -16,7 +16,7 @@ Compass::Frameworks.register('sane-scale', :path => extension_path)
16
16
  # version contains alphas, it will be created as a
17
17
  # prerelease version. Date is in the form of YYYY-MM-DD
18
18
  module SaneScale
19
- VERSION = "0.1"
19
+ VERSION = "0.1.1"
20
20
  DATE = "2016-05-09"
21
21
  end
22
22
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sane-scale
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Fusilier
@@ -14,28 +14,28 @@ dependencies:
14
14
  name: sass
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '3.3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '3.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: compass
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: 1.0.3
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: 1.0.3
41
41
  description: Modular, responsive, scalable typography
@@ -53,7 +53,7 @@ files:
53
53
  - stylesheets/sane-scale/_make-scale.scss
54
54
  - stylesheets/sane-scale/_map-deep-get.scss
55
55
  - stylesheets/sane-scale/_set-font-size.scss
56
- homepage: http://www.davidfusilier.com
56
+ homepage: https://github.com/dfusilier/sane-scale.git
57
57
  licenses: []
58
58
  metadata: {}
59
59
  post_install_message:
@@ -62,17 +62,17 @@ require_paths:
62
62
  - lib
63
63
  required_ruby_version: !ruby/object:Gem::Requirement
64
64
  requirements:
65
- - - '>='
65
+ - - ">="
66
66
  - !ruby/object:Gem::Version
67
67
  version: '0'
68
68
  required_rubygems_version: !ruby/object:Gem::Requirement
69
69
  requirements:
70
- - - '>='
70
+ - - ">="
71
71
  - !ruby/object:Gem::Version
72
72
  version: 1.3.6
73
73
  requirements: []
74
74
  rubyforge_project: sane-scale
75
- rubygems_version: 2.6.4
75
+ rubygems_version: 2.2.2
76
76
  signing_key:
77
77
  specification_version: 4
78
78
  summary: A SASS framework for defining and applying typographic styles. Generate a