config/tailwind.config.js in coveragebook_components-0.15.0 vs config/tailwind.config.js in coveragebook_components-0.16.0

- old
+ new

@@ -1,94 +1,12 @@ /** @type {import('tailwindcss').Config} */ -const defaultTheme = require("tailwindcss/defaultTheme"); const { cocoPath } = require("./utils.js"); -const { fontSize, fontFamily, colors, screens } = require("./tokens.js"); module.exports = { + presets: [require("./tailwind.preset.js")], content: [ cocoPath("@components/**/*.{erb,rb,js}", true), cocoPath("@assets/**/*.{erb,rb}", true), - cocoPath("@previews/**/*.{erb,rb}", true), ], - safelist: [ - { - pattern: /tippy-.+/, - }, - ], blocklist: ["container"], - theme: { - colors, - screens, - fontFamily: { - display: [fontFamily.displaySans, ...defaultTheme.fontFamily.sans], - body: [fontFamily.bodySans, ...defaultTheme.fontFamily.sans], - branded: [fontFamily.displaySerif, ...defaultTheme.fontFamily.serif], - }, - extend: { - fontSize, - containers: { - "slide-fluid": "700px", - }, - aspectRatio: { - slide: "16 / 10", - }, - animation: { - spin: "spin 1.5s linear infinite", - "spin-reverse": "spin 1.5s linear infinite reverse", - }, - spacing: { - 13: "3.25rem", - 15: "3.75rem", - 18: "4.5rem", - }, - customForms: () => ({ - DEFAULT: { - checkbox: { - "&:indeterminate": { - background: - "url(\"data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='8' height='2' x='4' y='7' rx='1'/%3E%3C/svg%3E\");", - borderColor: "transparent", - backgroundColor: "currentColor", - backgroundSize: "100% 100%", - backgroundPosition: "center", - backgroundRepeat: "no-repeat", - }, - }, - }, - }), - }, - }, - corePlugins: { - aspectRatio: false, - }, - plugins: [ - require("@tailwindcss/forms"), - require("@tailwindcss/container-queries"), - - ({ matchUtilities, theme }) => { - // Safari 14-compatible aspect ratio - matchUtilities( - { - aspect: (value) => ({ - "@supports (aspect-ratio: 1 / 1)": { - aspectRatio: value, - }, - "@supports not (aspect-ratio: 1 / 1)": { - "&::before": { - content: '""', - float: "left", - paddingTop: `calc(100% / (${value}))`, - }, - "&::after": { - clear: "left", - content: '""', - display: "block", - }, - }, - }), - }, - { values: theme("aspectRatio") } - ); - }, - ], };