@obosbbl/grunnmuren-tailwind 0.9.1 → 2.0.0-canary.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.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2022 OBOS
3
+ Copyright (c) 2023 OBOS
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,48 +1,79 @@
1
1
  # @obosbbl/grunnmuren-tailwind
2
2
 
3
- Grunnmuren Tailwind preset.
3
+ [![npm version](https://badge.fury.io/js/@obosbbl%2Fgrunnmuren-tailwind.svg)](https://www.npmjs.com/package/@obosbbl/grunnmuren-tailwind)
4
+
5
+ Grunnmuren Tailwind preset. See the [Tailwind documentation](https://tailwindcss.com/docs/presets) for more information about how presets work.
4
6
 
5
7
  ## Install
6
8
 
7
9
  ```sh
8
- npm install -D @obosbbl/grunnmuren-tailwind tailwindcss
10
+ # npm
11
+ npm install -D @obosbbl/grunnmuren-tailwind tailwindcss postcss autoprefixer
12
+
13
+ # pnpm
14
+ pnpm add -D @obosbbl/grunnmuren-tailwind tailwindcss postcss autoprefixer
15
+
16
+ # yarn
17
+ yarn add -D @obosbbl/grunnmuren-tailwind tailwindcss postcss autoprefixer
18
+
9
19
  ```
10
20
 
11
21
  ## Usage
12
22
 
23
+ Configure Tailwind to use the preset
24
+
13
25
  ```js
14
26
  // tailwind.config.js
15
27
 
16
- // Regular usage
28
+ /** @type {import('tailwindcss').Config} */
17
29
  module.exports = {
18
30
  presets: [require('@obosbbl/grunnmuren-tailwind')],
19
31
  content: [
20
- // If using this together with Grunnmuren's React components
21
- './node_modules/@obosbbl/grunnmuren-react/dist/**/*.js',
22
32
  // Add your own content sources as needed, eg:
23
- './src/components/**/*.{ts,tsx}',
33
+ './src/app/**/*.{js,ts,jsx,tsx,}',
34
+
35
+ // If you're using Grunnmuren's React components
36
+ './node_modules/@obosbbl/grunnmuren-react/dist/**/*.js',
24
37
  ],
25
38
  };
39
+ ```
40
+
41
+ Add the Tailwind directives to your CSS
42
+
43
+ ```css
44
+ /* globals.css */
45
+
46
+ @tailwind base;
47
+ @tailwind components;
48
+ @tailwind utilities;
49
+ ```
50
+
51
+ Configure PostCSS to use Tailwind
52
+
53
+ ```js
54
+ // postcss.config.js
26
55
 
27
- // Usage with options
28
56
  module.exports = {
29
- presets: [require('@obosbbl/grunnmuren-tailwind')({ useLegacyFont: true, fontBasePath: '/mypath/myfonts' }),
30
- // content: [ ... ]
57
+ plugins: {
58
+ tailwindcss: {},
59
+ autoprefixer: {},
60
+ },
31
61
  };
32
62
  ```
33
63
 
34
- ### Fonts
64
+ ## Migrating from v1?
35
65
 
36
- The preset includes font declarations.
37
- You'll have to setup your app so it serves the necessary [font files](../react/public/fonts/).
38
- By default the fonts should be under `/fonts/` but you can override this with the config option `fontBasePath`.
39
- See the [preset implementation](./tailwind-base.cjs).
66
+ To ease the transition from v1 to v2 of Grunnmuren, it is possible to configure the preset to be (partially) compatible with v1. This allows you to use v2 of the Tailwind preset with v1 of the React components, and upgrade your application over time instead of a full migration.
40
67
 
41
- ## Options
68
+ To do that you need to configure the preset with `legacyV1Compatibility` option.
42
69
 
43
- The preset supports the following options:
70
+ ```js
71
+ // tailwind.config.js
44
72
 
45
- | Name | Default value | Description |
46
- | ------------- | ------------- | -------------------------------------------- |
47
- | useLegacyFont | `false` | Whether to use the fonts from the old design |
48
- | fontBasePath | `/fonts` | Path to where the fonts are hosted |
73
+ /** @type {import('tailwindcss').Config} */
74
+ module.exports = {
75
+ presets: [
76
+ require('@obosbbl/grunnmuren-tailwind')({ legacyV1Compatibility: true }),
77
+ ],
78
+ };
79
+ ```
package/package.json CHANGED
@@ -1,13 +1,12 @@
1
1
  {
2
2
  "name": "@obosbbl/grunnmuren-tailwind",
3
- "version": "0.9.1",
3
+ "version": "2.0.0-canary.0",
4
4
  "description": "Grunnmuren Tailwind preset",
5
- "license": "MIT",
6
- "type": "commonjs",
7
5
  "repository": {
8
- "url": "https://github.com/code-obos/grunnmuren",
9
- "directory": "packages/tailwind"
6
+ "url": "https://github.com/code-obos/grunnmuren"
10
7
  },
8
+ "license": "MIT",
9
+ "type": "commonjs",
11
10
  "exports": {
12
11
  ".": "./tailwind-base.cjs"
13
12
  },
@@ -15,14 +14,13 @@
15
14
  "tailwind-base.cjs"
16
15
  ],
17
16
  "dependencies": {
18
- "@tailwindcss/aspect-ratio": "0.4.2",
19
- "@tailwindcss/typography": "0.5.9"
17
+ "@tailwindcss/aspect-ratio": "^0.4.2",
18
+ "@tailwindcss/typography": "^0.5.10"
20
19
  },
21
20
  "devDependencies": {
22
- "tailwindcss": "3.3.2",
23
- "postcss": "8.4.23"
21
+ "tailwindcss": "3.3.5"
24
22
  },
25
23
  "peerDependencies": {
26
- "tailwindcss": "^3.2"
24
+ "tailwindcss": "^3.3.5"
27
25
  }
28
26
  }
package/tailwind-base.cjs CHANGED
@@ -1,52 +1,282 @@
1
1
  const plugin = require('tailwindcss/plugin');
2
2
 
3
- // naively assume all fonts are hosted at the following paths at the root of the app
4
- const gorditaFonts = [
5
- {
6
- fontWeight: 400,
7
- fontStyle: 'normal',
8
- url: '/gorditaregular-webfont.woff2',
9
- },
10
- {
11
- fontWeight: 400,
12
- fontStyle: 'italic',
13
- url: '/gorditaregularitalic-webfont.woff2',
14
- },
15
- {
16
- fontWeight: 500,
17
- fontStyle: 'normal',
18
- url: '/gorditamedium-webfont.woff2',
19
- },
20
- {
21
- fontWeight: 700,
22
- fontStyle: 'normal',
23
- url: '/gorditabold-webfont.woff2',
24
- },
25
- ];
26
-
27
3
  const obosFonts = [
28
4
  {
29
5
  fontWeight: 400,
30
6
  fontStyle: 'normal',
31
- url: '/OBOSText-Regular.woff2',
7
+ url: 'https://www.obos.no/fonts/OBOSText-Regular.woff2',
32
8
  },
33
9
  {
34
10
  fontWeight: 400,
35
11
  fontStyle: 'italic',
36
- url: '/OBOSText-Italic.woff2',
12
+ url: 'https://www.obos.no/fonts/OBOSText-Italic.woff2',
37
13
  },
38
14
  {
39
15
  fontWeight: 500,
40
16
  fontStyle: 'normal',
41
- url: '/OBOSText-Medium.woff2',
17
+ url: 'https://www.obos.no/fonts/OBOSText-Medium.woff2',
42
18
  },
43
19
  {
44
20
  fontWeight: 700,
45
21
  fontStyle: 'normal',
46
- url: '/OBOSText-Bold.woff2',
22
+ url: 'https://www.obos.no/fonts/OBOSText-Bold.woff2',
47
23
  },
48
24
  ];
49
25
 
26
+ /**
27
+ * @param {boolean} options.legacyV1Compatibility
28
+ */
29
+ module.exports = (options = {}) => {
30
+ const v1CompatibilityPlugins = [];
31
+
32
+ if (options.legacyV1Compatibility) {
33
+ v1CompatibilityPlugins.push(
34
+ button,
35
+ checkbox,
36
+ radio,
37
+ snackbar,
38
+ require('@tailwindcss/aspect-ratio'),
39
+ );
40
+ }
41
+
42
+ const fontFamily = 'OBOSFont';
43
+ const fonts = obosFonts;
44
+ const containerSize = '92rem';
45
+
46
+ return {
47
+ plugins: [
48
+ ...v1CompatibilityPlugins,
49
+ require('@tailwindcss/typography'),
50
+ plugin(function ({ addBase, addComponents }) {
51
+ addBase({
52
+ html: {
53
+ '@apply text-black antialiased font-normal': {},
54
+ },
55
+ b: {
56
+ fontWeight: 500,
57
+ },
58
+ strong: {
59
+ fontWeight: 500,
60
+ },
61
+ a: {
62
+ 'text-decoration': 'underline',
63
+ },
64
+ '::selection': { '@apply bg-mint text-black': {} },
65
+ });
66
+
67
+ addComponents({
68
+ '.container': {
69
+ width: '100%',
70
+ paddingLeft: '1rem',
71
+ paddingRight: '1rem',
72
+ marginLeft: 'auto',
73
+ marginRight: 'auto',
74
+ maxWidth: containerSize,
75
+ },
76
+ '.container-prose': {
77
+ width: '100%',
78
+ paddingLeft: '1rem',
79
+ paddingRight: '1rem',
80
+ marginLeft: 'auto',
81
+ marginRight: 'auto',
82
+ maxWidth: '45.5rem',
83
+ },
84
+ });
85
+ }),
86
+
87
+ plugin(function ({ addBase, addComponents }) {
88
+ const h1 = '@apply font-bold text-3xl md:text-5xl';
89
+ const h2 = '@apply font-bold text-2xl md:text-4xl';
90
+ const h3 = '@apply font-bold text-xl md:text-2xl';
91
+ const h4 = '@apply font-bold text-lg md:text-xl';
92
+
93
+ if (options.legacyV1Compatibility) {
94
+ addBase({
95
+ h1: {
96
+ [h1]: {},
97
+ },
98
+ h2: {
99
+ [h2]: {},
100
+ },
101
+ h3: {
102
+ [h3]: {},
103
+ },
104
+ h4: {
105
+ [h4]: {},
106
+ },
107
+ });
108
+ }
109
+
110
+ addComponents({
111
+ '.h1': {
112
+ [h1]: {},
113
+ },
114
+ '.h2': {
115
+ [h2]: {},
116
+ },
117
+ '.h3': {
118
+ [h3]: {},
119
+ },
120
+ '.h4': {
121
+ [h4]: {},
122
+ },
123
+ });
124
+ }),
125
+ plugin(function ({ addBase }) {
126
+ addBase(
127
+ fonts.map((font) => ({
128
+ '@font-face': {
129
+ fontFamily,
130
+ fontWeight: font.fontWeight,
131
+ fontStyle: font.fontStyle,
132
+ src: `url('${font.url}') format('woff2')`,
133
+ fontDisplay: 'swap',
134
+ },
135
+ })),
136
+ );
137
+ }),
138
+ ],
139
+ theme: {
140
+ colors: {
141
+ inherit: 'inherit',
142
+ current: 'currentColor',
143
+ transparent: 'transparent',
144
+ black: '#333',
145
+ white: '#fff',
146
+ gray: {
147
+ DEFAULT: '#818181',
148
+ dark: '#595959',
149
+ light: '#E6E6E6',
150
+ lightest: '#f1f1f1',
151
+ },
152
+ sky: {
153
+ DEFAULT: '#BEDFEC',
154
+ light: '#DEEFF5',
155
+ lightest: '#EBF5F9',
156
+ },
157
+ mint: {
158
+ DEFAULT: '#CDECE2',
159
+ light: '#E6F5F0',
160
+ lightest: '#F0F9F6',
161
+ },
162
+ blue: {
163
+ // OBOS Blue/Primary brand
164
+ DEFAULT: '#0047BA',
165
+ light: '#BEDFEC',
166
+ lightest: '#DEEFF5',
167
+ // OBOS Ocean
168
+ dark: '#002169',
169
+ },
170
+ green: {
171
+ // OBOS Green/Primary brand
172
+ DEFAULT: '#008761',
173
+ lightest: '#E6F5F0',
174
+ light: '#CDECE2',
175
+ // OBOS Forest
176
+ dark: '#00524C',
177
+ },
178
+ red: {
179
+ DEFAULT: '#C0385D',
180
+ // error red
181
+ light: '#FAEDEF',
182
+ },
183
+ orange: {
184
+ DEFAULT: '#e8a74a',
185
+ light: '#f8e5c9',
186
+ },
187
+ yellow: {
188
+ // open house
189
+ DEFAULT: '#fff5d2',
190
+ },
191
+ },
192
+ fontFamily: {
193
+ sans: [fontFamily, 'sans-serif'],
194
+ },
195
+ extend: {
196
+ maxWidth: {
197
+ // Override Tailwinds default prose width of 60 chars.
198
+ prose: '696px',
199
+ },
200
+ width: {
201
+ prose: '696px',
202
+ },
203
+ spacing: {
204
+ 18: '4.5rem',
205
+ },
206
+ borderColor: options.legacyV1Compatibility
207
+ ? ({ theme }) => ({
208
+ DEFAULT: theme('colors.gray.light', 'currentColor'),
209
+ })
210
+ : undefined,
211
+ typography: (theme) => ({
212
+ DEFAULT: {
213
+ css: {
214
+ '--tw-prose-headings': 'inherit',
215
+ '--tw-prose-lead': 'inherit',
216
+ '--tw-prose-links': 'inherit',
217
+ '--tw-prose-quotes': theme('colors.blue.dark'),
218
+ '--tw-prose-quote-borders': theme('colors.green.DEFAULT'),
219
+ '--tw-prose-counters': theme('colors.black'),
220
+ '--tw-prose-bullets': theme('colors.green.DEFAULT'),
221
+ color: theme('colors.black'),
222
+ maxWidth: theme('maxWidth.prose'),
223
+ a: {
224
+ fontWeight: 400,
225
+ },
226
+ h1: {
227
+ fontWeight: theme('fontWeight.bold'),
228
+ fontSize: theme('fontSize.3xl'),
229
+ '@media (min-width: theme("screens.md"))': {
230
+ fontSize: theme('fontSize.5xl'),
231
+ },
232
+ },
233
+ h2: {
234
+ fontWeight: theme('fontWeight.bold'),
235
+ fontSize: theme('fontSize.2xl'),
236
+ '@media (min-width: theme("screens.md"))': {
237
+ fontSize: theme('fontSize.4xl'),
238
+ },
239
+ },
240
+ h3: {
241
+ fontWeight: theme('fontWeight.bold'),
242
+ fontSize: theme('fontSize.xl'),
243
+ '@media (min-width: theme("screens.md"))': {
244
+ fontSize: theme('fontSize.2xl'),
245
+ },
246
+ },
247
+ h4: {
248
+ fontWeight: theme('fontWeight.bold'),
249
+ fontSize: theme('fontSize.lg'),
250
+ '@media (min-width: theme("screens.md"))': {
251
+ fontSize: theme('fontSize.xl'),
252
+ },
253
+ },
254
+ li: {
255
+ marginTop: '1.5em',
256
+ marginBottom: '1.5em',
257
+ },
258
+ blockquote: {
259
+ fontWeight: theme('fontWeight.bold'),
260
+ fontStyle: 'normal',
261
+ },
262
+ 'blockquote p:first-of-type::before': {
263
+ content: '"«"',
264
+ },
265
+ 'blockquote p:last-of-type::after': {
266
+ content: '"»"',
267
+ },
268
+ '[class~="lead"]': {
269
+ fontWeight: theme('fontWeight.medium'),
270
+ },
271
+ },
272
+ },
273
+ }),
274
+ },
275
+ },
276
+ };
277
+ };
278
+
279
+ // These custom components are only used for v1 compat
50
280
  const button = plugin(function ({ addComponents, theme }) {
51
281
  const hoverLoadingBgColor = 'rgba(0, 0, 0, 0.1)';
52
282
 
@@ -170,43 +400,6 @@ const checkbox = plugin(function ({ addComponents, theme }) {
170
400
  });
171
401
  });
172
402
 
173
- const headings = plugin(function ({ addBase, addComponents }) {
174
- const h1 = '@apply font-bold text-3xl md:text-5xl';
175
- const h2 = '@apply font-bold text-2xl md:text-4xl';
176
- const h3 = '@apply font-bold text-xl md:text-2xl';
177
- const h4 = '@apply font-bold text-lg md:text-xl';
178
-
179
- addBase({
180
- h1: {
181
- [h1]: {},
182
- },
183
- h2: {
184
- [h2]: {},
185
- },
186
- h3: {
187
- [h3]: {},
188
- },
189
- h4: {
190
- [h4]: {},
191
- },
192
- });
193
-
194
- addComponents({
195
- '.h1': {
196
- [h1]: {},
197
- },
198
- '.h2': {
199
- [h2]: {},
200
- },
201
- '.h3': {
202
- [h3]: {},
203
- },
204
- '.h4': {
205
- [h4]: {},
206
- },
207
- });
208
- });
209
-
210
403
  const snackbar = plugin(function ({ addComponents, theme }) {
211
404
  addComponents({
212
405
  '.snackbar': {
@@ -233,300 +426,3 @@ const snackbar = plugin(function ({ addComponents, theme }) {
233
426
  },
234
427
  });
235
428
  });
236
-
237
- const defaultOpts = {
238
- useLegacyFont: false,
239
- fontBasePath: '/fonts',
240
- useLegacyContainerSize: false,
241
- };
242
-
243
- module.exports = (userOptions) => {
244
- const opts = userOptions ? { ...defaultOpts, ...userOptions } : defaultOpts;
245
- let fontFamily = 'OBOSFont';
246
- let fonts = obosFonts;
247
- let containerSize = '92rem';
248
- if (opts.useLegacyFont) {
249
- fontFamily = 'Gordita';
250
- fonts = gorditaFonts;
251
- }
252
-
253
- if (opts.useLegacyContainerSize) {
254
- containerSize = '82rem';
255
- }
256
-
257
- return {
258
- plugins: [
259
- // TODO: Remove the aspect ratio plugin when Safari 14 usage is low enough
260
- require('@tailwindcss/aspect-ratio'),
261
- require('@tailwindcss/typography'),
262
- button,
263
- headings,
264
- checkbox,
265
- snackbar,
266
- radio,
267
- plugin(function ({ addBase, addUtilities, addComponents, theme }) {
268
- addBase({
269
- html: {
270
- '@apply text-black antialiased font-normal': {},
271
- },
272
- b: {
273
- fontWeight: 500,
274
- },
275
- strong: {
276
- fontWeight: 500,
277
- },
278
- a: {
279
- '@apply underline': {},
280
- },
281
- '::selection': { '@apply bg-mint text-black': {} },
282
- // Remove the disclosure triangle in Safari if apply the `list-none` utility to the summary element
283
- 'summary.list-none::-webkit-details-marker': {
284
- display: 'none',
285
- },
286
- });
287
- addComponents({
288
- '.container': {
289
- width: '100%',
290
- paddingLeft: '1rem',
291
- paddingRight: '1rem',
292
- marginLeft: 'auto',
293
- marginRight: 'auto',
294
- maxWidth: containerSize,
295
- },
296
- '.container-prose': {
297
- width: '100%',
298
- paddingLeft: '1rem',
299
- paddingRight: '1rem',
300
- marginLeft: 'auto',
301
- marginRight: 'auto',
302
- maxWidth: '45.5rem',
303
- },
304
- // that thin blue line at the top
305
- '.topline::before': {
306
- display: 'block',
307
- width: '100%',
308
- height: '5px',
309
- content: '""',
310
- position: 'fixed',
311
- left: '0',
312
- top: '0',
313
- right: '0',
314
- backgroundColor: theme('colors.blue.DEFAULT'),
315
- zIndex: '100',
316
- },
317
- /**
318
- * @deprecated use page-layout and page-layout-main instead
319
- */
320
- '.pagemain': {
321
- backgroundColor: '#fff',
322
- borderRadius: '1.5rem',
323
- overflow: 'hidden',
324
- },
325
-
326
- '.page-layout': {
327
- display: 'flex',
328
- flexDirection: 'column',
329
- minHeight: '100vh',
330
- },
331
- '.page-layout-main': {
332
- backgroundColor: '#fff',
333
- flexGrow: '1',
334
- },
335
- });
336
- addUtilities({
337
- // imitates a bold font, but doesn't cause layout due to element width change like with font-weight
338
- // Note that this CSS isn't standardized, but it works in Fx, Chrome, Safari and Edge
339
- /**
340
- * @deprecated use font-bold instead
341
- */
342
- '.fake-font-bold': {
343
- '-webkit-text-stroke': '1px',
344
- },
345
- });
346
- }),
347
- plugin(function ({ addBase }) {
348
- addBase(
349
- fonts.map((font) => ({
350
- '@font-face': {
351
- fontFamily,
352
- fontWeight: font.fontWeight,
353
- fontStyle: font.fontStyle,
354
- src: `url('${opts.fontBasePath}${font.url}') format('woff2')`,
355
- fontDisplay: 'swap',
356
- },
357
- })),
358
- );
359
- }),
360
- ],
361
- corePlugins: {
362
- container: false,
363
- },
364
- theme: {
365
- fontSize: {
366
- sm: '0.875rem',
367
- base: '1rem',
368
- lg: '1.125rem', // 18px
369
- xl: '1.25rem', // 20px
370
- '2xl': '1.5rem', // 24px
371
- '3xl': '1.875rem', // 28px
372
- '4xl': '2rem', // 32px
373
- '5xl': '2.5rem', // 40px
374
- },
375
- extend: {
376
- maxWidth: {
377
- // Override Tailwinds default prose width of 60 chars to 48. Roughly 590 pixels
378
- prose: '696px',
379
- },
380
- width: {
381
- prose: '696px',
382
- },
383
- screens: {
384
- 'max-md': { max: '767.9px' },
385
- /**
386
- * @deprecated Tailwind 3.2 has built in support for max-width breakpoints, but it only works
387
- * with a "simple screens" configuration... We add `max-md` manually here, allow everyone to migrate off
388
- * `<md`, then we can remove `screens` enitrely from this config.
389
- */
390
- '<md': { max: '767.9px' },
391
- },
392
- spacing: {
393
- 18: '4.5rem',
394
- },
395
- colors: {
396
- black: '#333',
397
- white: '#fff',
398
- gray: {
399
- // Dark Gray
400
- dark: '#595959',
401
- // gray
402
- DEFAULT: '#818181',
403
- // Light gray
404
- light: '#E6E6E6',
405
- // Lightest gray
406
- lightest: '#f1f1f1',
407
- // DEPRECATED concrete
408
- concrete: '#f1f1f1',
409
- },
410
- sky: {
411
- DEFAULT: '#BEDFEC',
412
- light: '#DEEFF5',
413
- lightest: '#EBF5F9',
414
- },
415
- mint: {
416
- DEFAULT: '#CDECE2',
417
- light: '#E6F5F0',
418
- lightest: '#F0F9F6',
419
- },
420
- blue: {
421
- // DEPRECATED light blue
422
- lightest: '#DEEFF5',
423
- // DEPRECATED OBOS Sky
424
- light: '#BEDFEC',
425
-
426
- // OBOS Blue/Primary brand
427
- DEFAULT: '#0047BA',
428
- // OBOS Ocean
429
- dark: '#002169',
430
- },
431
- green: {
432
- // DEPRECATED light green
433
- lightest: '#E6F5F0',
434
- // DEPRECATED OBOS Mint
435
- light: '#CDECE2',
436
-
437
- // OBOS Green/Primary brand
438
- DEFAULT: '#008761',
439
- // OBOS Forest
440
- dark: '#00524C',
441
- },
442
- red: {
443
- // error red
444
- light: '#faedef',
445
- DEFAULT: '#cd465e',
446
- },
447
- orange: {
448
- light: '#f8e5c9',
449
- DEFAULT: '#e8a74a',
450
- },
451
- yellow: {
452
- // open house
453
- DEFAULT: '#fff5d2',
454
- },
455
- },
456
- borderColor: ({ theme }) => ({
457
- DEFAULT: theme('colors.gray.light', 'currentColor'),
458
- }),
459
- fontFamily: {
460
- sans: [fontFamily, 'sans-serif'],
461
- },
462
- boxShadow: {
463
- DEFAULT: '0 6px 4px 0 rgba(0, 33, 105, 0.25)',
464
- },
465
- typography: (theme) => ({
466
- DEFAULT: {
467
- css: {
468
- '--tw-prose-headings': 'inherit',
469
- '--tw-prose-lead': 'inherit',
470
- '--tw-prose-links': 'inherit',
471
- '--tw-prose-quotes': theme('colors.blue.dark'),
472
- '--tw-prose-quote-borders': theme('colors.green.DEFAULT'),
473
- '--tw-prose-counters': theme('colors.black'),
474
- // TODO: Increase bullet size. See design sketches
475
- '--tw-prose-bullets': theme('colors.green.DEFAULT'),
476
- color: theme('colors.black'),
477
- maxWidth: theme('maxWidth.prose'),
478
- a: {
479
- fontWeight: 400,
480
- },
481
- h1: {
482
- fontWeight: theme('fontWeight.bold'),
483
- fontSize: theme('fontSize.3xl'),
484
- '@media (min-width: theme("screens.md"))': {
485
- fontSize: theme('fontSize.5xl'),
486
- },
487
- },
488
- h2: {
489
- fontWeight: theme('fontWeight.bold'),
490
- fontSize: theme('fontSize.2xl'),
491
- '@media (min-width: theme("screens.md"))': {
492
- fontSize: theme('fontSize.4xl'),
493
- },
494
- },
495
- h3: {
496
- fontWeight: theme('fontWeight.bold'),
497
- fontSize: theme('fontSize.xl'),
498
- '@media (min-width: theme("screens.md"))': {
499
- fontSize: theme('fontSize.2xl'),
500
- },
501
- },
502
- h4: {
503
- fontWeight: theme('fontWeight.bold'),
504
- fontSize: theme('fontSize.lg'),
505
- '@media (min-width: theme("screens.md"))': {
506
- fontSize: theme('fontSize.xl'),
507
- },
508
- },
509
- li: {
510
- marginTop: '1.5em',
511
- marginBottom: '1.5em',
512
- },
513
- blockquote: {
514
- fontWeight: theme('fontWeight.bold'),
515
- fontStyle: 'normal',
516
- },
517
- 'blockquote p:first-of-type::before': {
518
- content: '"«"',
519
- },
520
- 'blockquote p:last-of-type::after': {
521
- content: '"»"',
522
- },
523
- '[class~="lead"]': {
524
- fontWeight: theme('fontWeight.medium'),
525
- },
526
- },
527
- },
528
- }),
529
- },
530
- },
531
- };
532
- };