moda-themes 0.0.4 → 0.0.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b5fd9dcd48a4f9963ba744985b6b095036c28521a03e9ab6f43440bfc336e52c
4
- data.tar.gz: 284771f09e7fbd2ea15cfc3fe489b1225c7b7f4ea8944d575e7d9ea556291f00
3
+ metadata.gz: 441d448880cf0904aa6cbf4e40506afdf3d8c5ed58bdba4a6684cc6aa6a3e78e
4
+ data.tar.gz: 3c49a3eb3c311faa26171c5dacd7b8820d8284df5773e4e231c9b558e27aa225
5
5
  SHA512:
6
- metadata.gz: fb9a3510eb876fb3fab17b3507ae7515fe80738a3b714a7cca1850a1e50ff2947cfd54ff4e643059a2856acc2290320b31214b3c7a924ee2c55a6581cfefc20b
7
- data.tar.gz: addb5e21406458b0d75716ea4c5a646bde46ac224af7ae28e966126d3b1d845e8f23cf2fe741d2779f7afd3022940ada341c9a30a8392b555fb8ce48ac3eef97
6
+ metadata.gz: 443c9cc63ebf113da439c4dc1132d8a85ebe3488be2075340688311ea2adc87f953582c67b5b5f0923f3ee5ee0844006941bfbb05e25938da09dba4665cbb7f1
7
+ data.tar.gz: fefbebc42aeca9017e1eb007ff1e3d9c413dacab99672a01a36574e196f5db6a979dca2146d7703869192fe55f01c720113f2e3ee089e4a37eef83e8d56b13a8
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # moda-themes
2
2
 
3
+ [![CircleCI](https://img.shields.io/circleci/build/github/ModaOperandi/moda-themes?token=51b1595bd3dac6aa321b052adfc4595cc79910d6)](https://circleci.com/gh/ModaOperandi/moda-themes)
4
+
3
5
  ## Meta
4
6
 
5
7
  - **State**: production
@@ -117,10 +119,26 @@ See [REBRAND](REBRAND.md).
117
119
 
118
120
  ### Functions
119
121
 
122
+ #### `color($name)`
123
+
124
+ Returns a color variable.
125
+
120
126
  #### `font-family($name)`
121
127
 
122
128
  Returns a font-family variable.
123
129
 
130
+ #### `font-size($name)`
131
+
132
+ Returns a font-size variable.
133
+
134
+ #### `line-height($name)`
135
+
136
+ Returns a line-height variable.
137
+
138
+ #### `letter-spacing($name)`
139
+
140
+ Returns a letter-spacing variable.
141
+
124
142
  #### `get-from-theme($theme-name, $keys...)`
125
143
 
126
144
  Undocumented.
@@ -143,10 +161,16 @@ Inlcudes the full set of themes under `[data-theme="name"]` selectors. (include
143
161
 
144
162
  Allows you to pull in a set of themed variables manually.
145
163
 
164
+ #### `type-treatment($name, $important: false)`
165
+
166
+ Pulls in a fixed configuration of styles for specific type treatments.
167
+
146
168
  ## Releasing
147
169
 
148
170
  [Increment the versions](https://semver.org/) in [package.json](package.json) and [lib/moda-themes/version.rb](lib/moda-themes/version.rb).
149
171
 
172
+ Run `yarn build` to rebuild the exported data.
173
+
150
174
  Run `rake release` to release the Ruby gem.
151
175
 
152
176
  Run `yarn publish` to publish the NPM package.
@@ -57,3 +57,21 @@
57
57
  @function letter-spacing($key) {
58
58
  @return __fetch__($letter-spacing, $key);
59
59
  }
60
+
61
+ @function line-height($key) {
62
+ @return __fetch__($line-heights, $key);
63
+ }
64
+
65
+ @function font-size($key) {
66
+ @return __fetch__($font-sizes, $key);
67
+ }
68
+
69
+ @mixin type-treatment($name, $important: false) {
70
+ @each $property, $value in __fetch__($type-treatments, $name) {
71
+ @if ($important) {
72
+ #{$property}: $value !important;
73
+ } @else {
74
+ #{$property}: $value;
75
+ }
76
+ }
77
+ }
@@ -20,8 +20,49 @@ $fonts: (
20
20
  )
21
21
  );
22
22
 
23
+ $line-heights: (
24
+ base: 1.25,
25
+ sm: 1.33,
26
+ md: 1.5
27
+ );
28
+
29
+ // TODO: Remove deprecated aliases: [wide, wider]
23
30
  $letter-spacing: (
24
31
  base: 0,
32
+ sm: 0.02em,
33
+ md: 0.04em,
34
+ lg: 0.1em,
25
35
  wide: 0.04em,
26
36
  wider: 0.1em
27
37
  );
38
+
39
+ $font-sizes: (
40
+ sm: 12px,
41
+ md: 13px
42
+ );
43
+
44
+ $type-treatments: (
45
+ secondary-title: (
46
+ font-family: font-family("sans"),
47
+ font-size: font-size("sm"),
48
+ letter-spacing: letter-spacing("md"),
49
+ line-height: line-height("base"),
50
+ text-transform: uppercase,
51
+ color: color("black")
52
+ ),
53
+ body-copy-sans: (
54
+ font-family: font-family("sans"),
55
+ font-size: font-size("md"),
56
+ letter-spacing: letter-spacing("sm"),
57
+ line-height: line-height("base"),
58
+ color: color("black")
59
+ )
60
+ );
61
+
62
+ $typography: (
63
+ fonts: $fonts,
64
+ line-heights: $line-heights,
65
+ letter-spacing: $letter-spacing,
66
+ font-sizes: $font-sizes,
67
+ type-treatments: $type-treatments
68
+ );
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ModaThemes
4
- VERSION = '0.0.4'
4
+ VERSION = "0.0.5"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moda-themes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - dzucconi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-23 00:00:00.000000000 Z
11
+ date: 2019-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass