-
Notifications
You must be signed in to change notification settings - Fork 0
/
twind.config.js
37 lines (33 loc) · 1.23 KB
/
twind.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { content } from '@twind/content'
import typography from '@twind/typography'
import { apply } from 'twind'
import { virtualSheet } from 'twind/shim/server'
export const sheet = virtualSheet()
// NOTE: The watch mode must be restarted after modifying the config
// because the config is imported by an 11ty config file.
// (Restarting is needed after modifying any 11ty config file.)
/** @type {import('twind').Configuration} */
export default {
plugins: {
...typography(),
},
preflight: {
// Chrome stupidly hides text underlines behind the bg color,
// so the color's opacity is reduced
// to make underlines at least somewhat visible
'::selection': apply('bg-yellow-300 bg-opacity-50'),
// Prose styles need to be declared here
// because of these issues:
// - https://github.com/tw-in-js/typography/issues/1
// - https://github.com/tw-in-js/typography/issues/3
'.prose.prose a': apply('font-normal'),
'.prose a:hover': apply('text-red-600'),
'.prose a:active': apply('text-red-700'),
'.prose ol > li, .prose ul > li': apply('relative'),
'.prose ol > li::before, .prose ul > li::before': apply(
content('""'),
'absolute bg-gray-300 rounded-full'
),
},
sheet,
}