1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-15 17:47:09 +00:00
conky/web/utils/tailwind-preset.js

80 lines
1.8 KiB
JavaScript
Raw Normal View History

const plugin = require('tailwindcss/plugin')
const pluginTypography = require('@tailwindcss/typography')
const hoveredSiblingPlugin = plugin(function ({ addVariant, e }) {
addVariant('hovered-sibling', ({ container }) => {
container.walkRules((rule) => {
rule.selector = `:hover + .hovered-sibling\\:${rule.selector.slice(1)}`
})
})
})
module.exports = {
theme: {
fontFamily: {
sans: [
2022-10-05 13:24:33 +00:00
'InterVariable',
'ui-sans-serif',
'system-ui',
'-apple-system',
'BlinkMacSystemFont',
'Segoe UI',
'Roboto',
'Helvetica Neue',
'Arial',
'Noto Sans',
'sans-serif',
'Apple Color Emoji',
'Segoe UI Emoji',
'Segoe UI Symbol',
'Noto Color Emoji',
],
serif: [
2022-10-05 13:24:33 +00:00
'NewsreaderVariable',
'ui-serif',
'Georgia',
'Cambria',
'Times New Roman',
'Times',
'serif',
],
mono: [
2022-10-05 13:24:33 +00:00
'Fira CodeVariable',
'ui-monospace',
'SFMono-Regular',
'Menlo',
'Monaco',
'Consolas',
'Liberation Mono',
'Courier New',
'monospace',
],
2022-09-30 17:29:44 +00:00
},
extend: {
typography: (theme) => ({
DEFAULT: {
css: {
2022-09-30 21:15:06 +00:00
code: {
'&::before': {
content: '"" !important',
},
'&::after': {
content: '"" !important',
},
},
fontFamily: theme('fontFamily.sans').join(', '),
2022-09-30 17:29:44 +00:00
},
},
}),
},
},
variants: {
extend: {
borderRadius: ['first', 'last'],
borderWidth: ['last', 'hovered-sibling'],
typography: ['dark'],
},
},
plugins: [hoveredSiblingPlugin, pluginTypography],
}