moda-themes 4.4.1 → 5.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 93d472fb15287eebe7efa70ea06bbe5858274bd531081fdf17ab2e4f2c9d3db1
4
- data.tar.gz: 2293af2a594f2a725e74a74f1e9a1bb7b0e97796ebe47ce1aea2b7b7476652e5
2
+ SHA1:
3
+ metadata.gz: 373e56f0da21acac33d184e7969a16765623eaeb
4
+ data.tar.gz: e73d172da0b4e8e7673a4663463efd9674c6c87e
5
5
  SHA512:
6
- metadata.gz: 0f88ca15cff534f462ee45933ca1a26429eae45ea7ca6729fb16660b4cf318205e5decd9e003900f86dafa197efc99c14ff86050779dfc62b9d3c31bf74f800d
7
- data.tar.gz: b0f39efb312633934fd2a7c5f489c228f662500d9045bb1d9cda9e76373c3b784d6ed64efc4bf2d0e55eed639ee32244ae8d0d4956d9e6387a13eb961f4458f4
6
+ metadata.gz: feba0c162b73d5195b8de901bf006e2052ec25c161c530b0f6b82b1195a08a70667af4453702fa322b58a4d539ecfa80ccedd26f77c97e0452a779fbe78dea14
7
+ data.tar.gz: 2f85537a0cb7aa5b8c93e125e73811fd4f640264488d6ffe07121137f700d7e2a9c51cf113257a049331831fc81466fe76b95a15f36ef36271e42f473ae3cb6f
data/README.md CHANGED
@@ -1,6 +1,17 @@
1
+ # DEPRECATED
2
+
3
+ **`moda-themes` should no longer be used. However, it is currently still in production, used by both [Mojo](https://github.com/ModaOperandi/mojo) and [https://github.com/ModaOperandi/website](website).**
4
+
5
+ ***You are probably looking for [@moda/tokens](https://github.com/ModaOperandi/tokens), which replaces this library.***
6
+
7
+ ## History
8
+
9
+ This package existed largely to aid in the brand transition. It was set up in such a way that sets of tokens were stored in CSS variables and allowed you to swap out those variables at the root, in order to switch "themes." This was useful in consolidating a large swath of variables and toggling them out with a feature flag. It was also set up to publish both a Ruby gem and NPM package. [@moda/tokens](https://github.com/ModaOperandi/tokens) replaces this library, dropping the dynamic themeing functionality and simplifying the build: only publishing an NPM package.
10
+
1
11
  # moda-themes
2
12
 
3
- [![CircleCI](https://img.shields.io/circleci/build/github/ModaOperandi/moda-themes?token=51b1595bd3dac6aa321b052adfc4595cc79910d6)](https://circleci.com/gh/ModaOperandi/moda-themes) [![npm](https://img.shields.io/npm/v/moda-themes)](https://www.npmjs.com/package/moda-themes) [![Gem](https://img.shields.io/gem/v/moda-themes)](https://rubygems.org/gems/moda-themes)
13
+ [![CircleCI](https://img.shields.io/circleci/build/github/ModaOperandi/moda-themes?token=51b1595bd3dac6aa321b052adfc4595cc79910d6)](https://circleci.com/gh/ModaOperandi/moda-themes) [![npm](https://img.shields.io/npm/v/moda-themes)](https://www.npmjs.com/package/moda-themes) [![Gem](https://img.shields.io/gem/v/moda-themes)](https://rubygems.org/gems/moda-themes) [![No Maintenance Intended](http://unmaintained.tech/badge.svg)](http://unmaintained.tech/)
14
+
4
15
 
5
16
  ## Meta
6
17
 
@@ -24,30 +35,63 @@ bundle install
24
35
  Use the functions + mixins in your SASS/SCSS files:
25
36
 
26
37
  ```scss
27
- @import "moda-themes";
38
+ @import 'moda-themes';
28
39
 
29
40
  // Include this once to generate the `data-theme` attr styling. This is not auto-included
30
41
  // to prevent duplicate imports.
31
42
  @include data-themes; /* Outputs =>
32
- [data-theme=legacy] {
33
- --theme-font-families-title: Miller Headline, Georgia, Times New Roman, Times, serif;
34
- --theme-font-families-sans: Gotham, Helvetica Neue, Helvetica, Arial, sans-serif;
35
- --theme-font-families-serif: Miller Headline, Georgia, Times New Roman, Times, serif;
36
- --theme-font-families-body: Miller Headline, Georgia, Times New Roman, Times, serif;
37
- // ...
38
- }
39
- [data-theme=global] {
43
+ [data-theme="global"] {
40
44
  --theme-font-families-title: Moda Operandi Serif, Times New Roman, Times, serif;
41
45
  --theme-font-families-sans: Moda Operandi Sans, Arial, sans-serif;
42
46
  --theme-font-families-serif: Moda Operandi Serif, Times New Roman, Times, serif;
43
47
  --theme-font-families-body: Caslon, Times New Roman, Times, serif;
44
- // ...
45
- }
48
+ --theme-colors-primary: #263078;
49
+ --theme-colors-primary-alt: #933a20;
50
+ --theme-colors-secondary: #ba912e;
51
+ --theme-colors-background: #b1bfaa;
52
+ --theme-colors-background-alt: #f8f5ee;
53
+ --theme-colors-accent: #ff9279; }
54
+
55
+ [data-theme="mens"] {
56
+ --theme-font-families-title: Moda Operandi Serif, Times New Roman, Times, serif;
57
+ --theme-font-families-sans: Moda Operandi Sans, Arial, sans-serif;
58
+ --theme-font-families-serif: Moda Operandi Serif, Times New Roman, Times, serif;
59
+ --theme-font-families-body: Caslon, Times New Roman, Times, serif;
60
+ --theme-colors-primary: #7f9acf;
61
+ --theme-colors-primary-alt: #68683b;
62
+ --theme-colors-secondary: #f3ded9;
63
+ --theme-colors-background: #f2f3f5;
64
+ --theme-colors-background-alt: #f2f3f5;
65
+ --theme-colors-accent: #f0f659; }
66
+
67
+ [data-theme="womens"] {
68
+ --theme-font-families-title: Moda Operandi Serif, Times New Roman, Times, serif;
69
+ --theme-font-families-sans: Moda Operandi Sans, Arial, sans-serif;
70
+ --theme-font-families-serif: Moda Operandi Serif, Times New Roman, Times, serif;
71
+ --theme-font-families-body: Caslon, Times New Roman, Times, serif;
72
+ --theme-colors-primary: #d56b27;
73
+ --theme-colors-primary-alt: #d7b3d0;
74
+ --theme-colors-secondary: #003728;
75
+ --theme-colors-background: #f8f5ee;
76
+ --theme-colors-background-alt: #f8f5ee;
77
+ --theme-colors-accent: #c44cb0; }
78
+
79
+ :root {
80
+ --theme-font-families-title: Moda Operandi Serif, Times New Roman, Times, serif;
81
+ --theme-font-families-sans: Moda Operandi Sans, Arial, sans-serif;
82
+ --theme-font-families-serif: Moda Operandi Serif, Times New Roman, Times, serif;
83
+ --theme-font-families-body: Caslon, Times New Roman, Times, serif;
84
+ --theme-colors-primary: #263078;
85
+ --theme-colors-primary-alt: #933a20;
86
+ --theme-colors-secondary: #ba912e;
87
+ --theme-colors-background: #b1bfaa;
88
+ --theme-colors-background-alt: #f8f5ee;
89
+ --theme-colors-accent: #ff9279; }
46
90
  */
47
91
 
48
92
  // Use the functions to access themed values:
49
93
  p {
50
- font-family: font-family("sans");
94
+ font-family: font-family('sans');
51
95
  // font-family: var(--theme-font-families-sans);
52
96
  }
53
97
  ```
@@ -65,17 +109,17 @@ Configure node-sass `includePaths`:
65
109
  For Parcel: Create a .sassrc.js:
66
110
 
67
111
  ```javascript
68
- const modaThemes = require("moda-themes");
112
+ const modaThemes = require('moda-themes');
69
113
 
70
114
  module.exports = {
71
- includePaths: [...modaThemes.includePaths]
115
+ includePaths: [...modaThemes.includePaths],
72
116
  };
73
117
  ```
74
118
 
75
119
  For Webpack: Configure sass-loader:
76
120
 
77
121
  ```javascript
78
- const modaThemes = require("moda-themes");
122
+ const modaThemes = require('moda-themes');
79
123
 
80
124
  const config = {
81
125
  // ...
@@ -84,16 +128,16 @@ const config = {
84
128
  {
85
129
  test: /\.scss$/,
86
130
  use: [
87
- "style-loader",
88
- "css-loader",
131
+ 'style-loader',
132
+ 'css-loader',
89
133
  {
90
- loader: "sass-loader",
91
- options: { includePaths: [...modaThemes.includePaths] }
92
- }
93
- ]
94
- }
95
- ]
96
- }
134
+ loader: 'sass-loader',
135
+ options: { includePaths: [...modaThemes.includePaths] },
136
+ },
137
+ ],
138
+ },
139
+ ],
140
+ },
97
141
  };
98
142
 
99
143
  module.exports = config;
@@ -102,7 +146,7 @@ module.exports = config;
102
146
  Use the functions + mixins in your SASS/SCSS files:
103
147
 
104
148
  ```scss
105
- @import "moda-themes/all";
149
+ @import 'moda-themes/all';
106
150
 
107
151
  // ...
108
152
  ```
@@ -111,10 +155,6 @@ Use the functions + mixins in your SASS/SCSS files:
111
155
 
112
156
  See [USAGE](USAGE.md).
113
157
 
114
- ## Transitioning
115
-
116
- See [REBRAND](REBRAND.md).
117
-
118
158
  ## API
119
159
 
120
160
  ### Functions
@@ -163,7 +203,7 @@ Sets theme variables at the `:root` (include this once)
163
203
 
164
204
  #### `data-themes()`
165
205
 
166
- Inlcudes the full set of themes under `[data-theme="name"]` selectors. (include this once)
206
+ Includes the full set of themes under `[data-theme="name"]` selectors. (include this once)
167
207
 
168
208
  #### `theme-variables-for($theme)`
169
209
 
@@ -179,8 +219,8 @@ Pulls in any global styles.
179
219
 
180
220
  Run `yarn build` to rebuild the exported data.
181
221
 
182
- <strike>Run `rake release` to release the Ruby gem.</strike>
222
+ Run `rake release` to release the Ruby gem.
183
223
 
184
- <strike>Run `yarn publish` to publish the NPM package.</strike>
224
+ Run `yarn publish` to publish the NPM package.
185
225
 
186
- [Create a new release](https://github.com/ModaOperandi/moda-themes/releases/new). Github Actions should publish it to RubyGems & NPM.
226
+ [Create a new release](https://github.com/ModaOperandi/moda-themes/releases/new).
@@ -1,6 +1,7 @@
1
1
  @mixin global-styles() {
2
2
  html {
3
3
  box-sizing: border-box;
4
+ font-size: 16px;
4
5
  }
5
6
 
6
7
  *,
@@ -8,8 +9,4 @@
8
9
  *::after {
9
10
  box-sizing: inherit;
10
11
  }
11
-
12
- :focus {
13
- outline: none;
14
- }
15
12
  }
@@ -4,68 +4,37 @@
4
4
  @import 'variables/breakpoints';
5
5
 
6
6
  $themes: (
7
- legacy: (
8
- font-families: map-get($fonts, legacy),
7
+ global: (
8
+ font-families: map-get($fonts, global),
9
9
  colors: (
10
- transition-gold-to-black: map-get($colors-legacy, "legacy-gold"),
11
- transition-gold-to-burnt-orange: map-get($colors-legacy, "legacy-gold"),
12
- transition-burgundy-nav-to-black:
13
- map-get($colors-legacy, "legacy-burgundy-nav"),
14
- transition-burgundy-red-to-black:
15
- map-get($colors-legacy, "legacy-burgundy-red"),
16
- transition-burgundy-red-to-burnt-orange:
17
- map-get($colors-legacy, "legacy-burgundy-red"),
18
- transition-red-to-black: map-get($colors-legacy, "legacy-red"),
19
- transition-blue-to-burnt-orange: map-get($colors-legacy, "legacy-blue"),
20
- transition-error-red-to-fuchsia:
21
- map-get($colors-legacy, "legacy-error-red")
22
- )
10
+ primary: map-get($colors-global, 'klein-blue'),
11
+ primary-alt: map-get($colors-global, 'brick'),
12
+ secondary: map-get($colors-global, 'goldenrod'),
13
+ background: map-get($colors-global, 'seafoam'),
14
+ background-alt: map-get($colors-global, 'cream'),
15
+ accent: map-get($colors-global, 'coral'),
16
+ ),
23
17
  ),
24
- global: (
18
+ mens: (
19
+ font-families: map-get($fonts, global),
20
+ colors: (
21
+ primary: map-get($colors-global, 'cornflower-blue'),
22
+ primary-alt: map-get($colors-global, 'moss-green'),
23
+ secondary: map-get($colors-global, 'blush'),
24
+ background: map-get($colors-global, 'light-grey'),
25
+ background-alt: map-get($colors-global, 'light-grey'),
26
+ accent: map-get($colors-global, 'canary'),
27
+ ),
28
+ ),
29
+ womens: (
25
30
  font-families: map-get($fonts, global),
26
31
  colors: (
27
- transition-gold-to-black: map-get($colors-global, "black"),
28
- transition-gold-to-burnt-orange: map-get($colors-global, "burnt-orange"),
29
- transition-burgundy-nav-to-black: map-get($colors-global, "black"),
30
- transition-burgundy-red-to-black: map-get($colors-global, "black"),
31
- transition-burgundy-red-to-burnt-orange:
32
- map-get($colors-global, "burnt-orange"),
33
- transition-red-to-black: map-get($colors-global, "black"),
34
- transition-blue-to-burnt-orange: map-get($colors-global, "burnt-orange"),
35
- transition-error-red-to-fuchsia: map-get($colors-global, "fuchsia")
36
- )
32
+ primary: map-get($colors-global, 'burnt-orange'),
33
+ primary-alt: map-get($colors-global, 'lilac'),
34
+ secondary: map-get($colors-global, 'forest-green'),
35
+ background: map-get($colors-global, 'cream'),
36
+ background-alt: map-get($colors-global, 'cream'),
37
+ accent: map-get($colors-global, 'fuchsia'),
38
+ ),
37
39
  ),
38
- // global: (
39
- // font-families: map-get($fonts, global),
40
- // colors: (
41
- // primary: map-get($colors-global, "klein-blue"),
42
- // primary-alt: map-get($colors-global, "brick"),
43
- // secondary: map-get($colors-global, "goldenrod"),
44
- // background: map-get($colors-global, "seafoam"),
45
- // background-alt: map-get($colors-global, "cream"),
46
- // accent: map-get($colors-global, "coral")
47
- // )
48
- // ),
49
- // mens: (
50
- // font-families: map-get($fonts, global),
51
- // colors: (
52
- // primary: map-get($colors-global, "cornflower-blue"),
53
- // primary-alt: map-get($colors-global, "moss-green"),
54
- // secondary: map-get($colors-global, "blush"),
55
- // background: map-get($colors-global, "light-grey"),
56
- // background-alt: map-get($colors-global, "light-grey"),
57
- // accent: map-get($colors-global, "canary")
58
- // )
59
- // ),
60
- // womens: (
61
- // font-families: map-get($fonts, global),
62
- // colors: (
63
- // primary: map-get($colors-global, "burnt-orange"),
64
- // primary-alt: map-get($colors-global, "lilac"),
65
- // secondary: map-get($colors-global, "forest-green"),
66
- // background: map-get($colors-global, "cream"),
67
- // background-alt: map-get($colors-global, "cream"),
68
- // accent: map-get($colors-global, "fuchsia")
69
- // )
70
- // )
71
40
  );
@@ -1,37 +1,24 @@
1
1
  $colors-ui: (
2
- "strawberry": #fadedd,
3
- "code-red": #ee0700,
4
- "lime": #e3fbe2,
5
- "money-good": #046c00
2
+ 'strawberry': #fadedd,
3
+ 'code-red': #ee0700,
4
+ 'lime': #e3fbe2,
5
+ 'money-good': #046c00,
6
6
  );
7
7
 
8
8
  $colors-universal: (
9
- "white": #ffffff,
10
- "black": #000000
9
+ 'white': #ffffff,
10
+ 'black': #000000,
11
11
  );
12
12
 
13
13
  $colors-greyscale: map-merge(
14
14
  $colors-universal,
15
15
  (
16
- "cement": #646464,
17
- "nokia": #969696,
18
- "sidewalk": #afafaf,
19
- "elephant": #bebebe,
20
- "cashmere": #dedede,
21
- "noise": #f5f5f5
22
- )
23
- );
24
-
25
- $colors-legacy: map-merge(
26
- $colors-universal,
27
- (
28
- "legacy-burgundy-nav": #734f59,
29
- "legacy-burgundy-red": #3c1315,
30
- "legacy-red": #5b1a28,
31
- "legacy-pink": #f4e6e6,
32
- "legacy-gold": #9b885f,
33
- "legacy-error-red": #f62b0f,
34
- "legacy-blue": #599ad3
16
+ 'cement': #646464,
17
+ 'nokia': #969696,
18
+ 'sidewalk': #afafaf,
19
+ 'elephant': #bebebe,
20
+ 'cashmere': #dedede,
21
+ 'noise': #f5f5f5,
35
22
  )
36
23
  );
37
24
 
@@ -40,33 +27,30 @@ $colors-global: map-merge(
40
27
  map-merge(
41
28
  $colors-ui,
42
29
  (
43
- "brick": #933a20,
44
- "burnt-orange": #d56b27,
45
- "coral": #ff9279,
46
- "goldenrod": #ba912e,
47
- "canary": #f0f659,
48
- "lilac": #d7b3d0,
49
- "fuchsia": #c44cb0,
50
- "forest-green": #003728,
51
- "moss-green": #68683b,
52
- "seafoam": #b1bfaa,
53
- "klein-blue": #263078,
54
- "cornflower-blue": #7f9acf,
55
- "blush": #f3ded9,
56
- "cream": #f8f5ee,
57
- "light-grey": #f2f3f5,
58
- "white": white
30
+ 'brick': #933a20,
31
+ 'burnt-orange': #d56b27,
32
+ 'coral': #ff9279,
33
+ 'goldenrod': #ba912e,
34
+ 'canary': #f0f659,
35
+ 'lilac': #d7b3d0,
36
+ 'fuchsia': #c44cb0,
37
+ 'dark-fuchsia': #b43ca0,
38
+ 'forest-green': #003728,
39
+ 'moss-green': #68683b,
40
+ 'seafoam': #b1bfaa,
41
+ 'klein-blue': #263078,
42
+ 'cornflower-blue': #7f9acf,
43
+ 'blush': #f3ded9,
44
+ 'cream': #f8f5ee,
45
+ 'light-grey': #f2f3f5,
46
+ 'white': white,
59
47
  )
60
48
  )
61
49
  );
62
50
 
63
- $colors-flat: map-merge(
64
- map-merge($colors-legacy, $colors-global),
65
- $colors-greyscale
66
- );
51
+ $colors-flat: map-merge($colors-global, $colors-greyscale);
67
52
 
68
53
  $colors: (
69
- legacy: $colors-legacy,
70
54
  global: $colors-global,
71
- greyscale: $colors-greyscale
55
+ greyscale: $colors-greyscale,
72
56
  );
@@ -1,29 +1,20 @@
1
- $font-stack-gotham: "Gotham", "Helvetica Neue", Helvetica, Arial, sans-serif;
2
- $font-stack-miller-headline: "Miller Headline", Georgia, "Times New Roman",
3
- Times, serif;
4
- $font-stack-moda-sans: "Moda Operandi Sans", Arial, sans-serif;
5
- $font-stack-moda-serif: "Moda Operandi Serif", "Times New Roman", Times, serif;
6
- $font-stack-caslon: "Caslon", "Times New Roman", Times, serif;
1
+ $font-stack-moda-sans: 'Moda Operandi Sans', Arial, sans-serif;
2
+ $font-stack-moda-serif: 'Moda Operandi Serif', 'Times New Roman', Times, serif;
3
+ $font-stack-caslon: 'Caslon', 'Times New Roman', Times, serif;
7
4
 
8
5
  $fonts: (
9
- legacy: (
10
- title: $font-stack-miller-headline,
11
- sans: $font-stack-gotham,
12
- serif: $font-stack-miller-headline,
13
- body: $font-stack-miller-headline
14
- ),
15
6
  global: (
16
7
  title: $font-stack-moda-serif,
17
8
  sans: $font-stack-moda-sans,
18
9
  serif: $font-stack-moda-serif,
19
- body: $font-stack-caslon
20
- )
10
+ body: $font-stack-caslon,
11
+ ),
21
12
  );
22
13
 
23
14
  $line-heights: (
24
15
  base: 1.25,
25
16
  sm: 1.33,
26
- md: 1.5
17
+ md: 1.5,
27
18
  );
28
19
 
29
20
  // TODO: Remove deprecated aliases: [wide, wider]
@@ -33,18 +24,18 @@ $letter-spacing: (
33
24
  md: 0.04em,
34
25
  lg: 0.1em,
35
26
  wide: 0.04em,
36
- wider: 0.1em
27
+ wider: 0.1em,
37
28
  );
38
29
 
39
30
  $font-sizes: (
40
31
  xs: 10px,
41
32
  sm: 12px,
42
- md: 13px
33
+ md: 13px,
43
34
  );
44
35
 
45
36
  $typography: (
46
37
  fonts: $fonts,
47
38
  line-heights: $line-heights,
48
39
  letter-spacing: $letter-spacing,
49
- font-sizes: $font-sizes
40
+ font-sizes: $font-sizes,
50
41
  );
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ModaThemes
4
- VERSION = "4.4.1"
4
+ VERSION = "5.2.0"
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: 4.4.1
4
+ version: 5.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - dzucconi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-26 00:00:00.000000000 Z
11
+ date: 2020-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass
@@ -122,7 +122,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
122
122
  - !ruby/object:Gem::Version
123
123
  version: '0'
124
124
  requirements: []
125
- rubygems_version: 3.0.1
125
+ rubyforge_project:
126
+ rubygems_version: 2.5.2.3
126
127
  signing_key:
127
128
  specification_version: 4
128
129
  summary: Constant themed values for modaoperandi.com