Refactor docs, make a new website.
* Docs have been migrated from docbook to yaml + jinja2 + pandoc * Created a new (basic) website for docs based on React + Tailwinds
This commit is contained in:

committed by
Brenden Matthews

parent
fc8d778435
commit
47ad3f9982
62
web/utils/tailwind-preset.js
Normal file
62
web/utils/tailwind-preset.js
Normal file
@@ -0,0 +1,62 @@
|
||||
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: [
|
||||
'Inter',
|
||||
'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: [
|
||||
'Inter',
|
||||
'ui-serif',
|
||||
'Georgia',
|
||||
'Cambria',
|
||||
'Times New Roman',
|
||||
'Times',
|
||||
'serif',
|
||||
],
|
||||
mono: [
|
||||
'Fira Code',
|
||||
'ui-monospace',
|
||||
'SFMono-Regular',
|
||||
'Menlo',
|
||||
'Monaco',
|
||||
'Consolas',
|
||||
'Liberation Mono',
|
||||
'Courier New',
|
||||
'monospace',
|
||||
],
|
||||
},
|
||||
},
|
||||
variants: {
|
||||
extend: {
|
||||
borderRadius: ['first', 'last'],
|
||||
borderWidth: ['last', 'hovered-sibling'],
|
||||
typography: ['dark'],
|
||||
},
|
||||
},
|
||||
plugins: [hoveredSiblingPlugin, pluginTypography],
|
||||
}
|
Reference in New Issue
Block a user