0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-22 08:40:03 +01:00
posthog/tailwind.config.js

105 lines
3.4 KiB
JavaScript
Raw Normal View History

chore(frontend): Real Tailwind + Autoprefixer (#19051) * chore(frontend): Real Tailwind + Autoprefixer * Align some non-standard utility class usage with Tailwind * Start using container queries * Update tailwind.config.js * Move PostCSS packages into prod dependencies * Add EE * Add larger spacings for properties other than width * Fix spacing backward compat * Add max-w-1/2 * Remove Tailwind normalization * Ensure JIT analysis works * Actually we don't need a container query for this * Clean up more * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update production.Dockerfile * Extend `fontSize` instead of replacing * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Fix production build * Add clarification comment * Update trends.cy.ts * Fix `scale` usage * Fix minor styling issues * Upgrade to Tailwind 3.4 * Actually use `cssnano` * Don't use `cssnano` in dev * Solve annoying Tailwind logs * Add comment explaining plugins being defined twice * Fix side panel icon rotation * Reset snapshots * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update query snapshots * Update query snapshots * Fix dockerfile * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (1) * Fix up flag wrap * Update UI snapshots for `chromium` (2) * Fix * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Ben White <ben@posthog.com>
2024-01-08 13:26:12 +01:00
/** @type {import('tailwindcss').Config} */
const config = {
content: ['./frontend/src/**/*.{ts,tsx}', './ee/frontend/**/*.{ts,tsx}', './frontend/src/index.html'],
important: true, // Basically this: https://sebastiandedeyne.com/why-we-use-important-with-tailwind
theme: {
colors: {
chore(frontend): Real Tailwind + Autoprefixer (#19051) * chore(frontend): Real Tailwind + Autoprefixer * Align some non-standard utility class usage with Tailwind * Start using container queries * Update tailwind.config.js * Move PostCSS packages into prod dependencies * Add EE * Add larger spacings for properties other than width * Fix spacing backward compat * Add max-w-1/2 * Remove Tailwind normalization * Ensure JIT analysis works * Actually we don't need a container query for this * Clean up more * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update production.Dockerfile * Extend `fontSize` instead of replacing * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Fix production build * Add clarification comment * Update trends.cy.ts * Fix `scale` usage * Fix minor styling issues * Upgrade to Tailwind 3.4 * Actually use `cssnano` * Don't use `cssnano` in dev * Solve annoying Tailwind logs * Add comment explaining plugins being defined twice * Fix side panel icon rotation * Reset snapshots * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update query snapshots * Update query snapshots * Fix dockerfile * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (1) * Fix up flag wrap * Update UI snapshots for `chromium` (2) * Fix * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Ben White <ben@posthog.com>
2024-01-08 13:26:12 +01:00
// TODO: Move all colors over to Tailwind
// Currently color utility classes are still generated with SCSS in colors.scss due to relying on our color
// CSS vars in lots of stylesheets
2024-03-18 17:14:44 +01:00
purple: '#B62AD9',
chore(frontend): Real Tailwind + Autoprefixer (#19051) * chore(frontend): Real Tailwind + Autoprefixer * Align some non-standard utility class usage with Tailwind * Start using container queries * Update tailwind.config.js * Move PostCSS packages into prod dependencies * Add EE * Add larger spacings for properties other than width * Fix spacing backward compat * Add max-w-1/2 * Remove Tailwind normalization * Ensure JIT analysis works * Actually we don't need a container query for this * Clean up more * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update production.Dockerfile * Extend `fontSize` instead of replacing * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Fix production build * Add clarification comment * Update trends.cy.ts * Fix `scale` usage * Fix minor styling issues * Upgrade to Tailwind 3.4 * Actually use `cssnano` * Don't use `cssnano` in dev * Solve annoying Tailwind logs * Add comment explaining plugins being defined twice * Fix side panel icon rotation * Reset snapshots * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update query snapshots * Update query snapshots * Fix dockerfile * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (1) * Fix up flag wrap * Update UI snapshots for `chromium` (2) * Fix * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Ben White <ben@posthog.com>
2024-01-08 13:26:12 +01:00
},
fontFamily: {
sans: [
'-apple-system',
'BlinkMacSystemFont',
'Inter',
'Segoe UI',
'Roboto',
'Helvetica Neue',
'Helvetica',
'Arial',
'sans-serif',
'Apple Color Emoji',
'Segoe UI Emoji',
'Segoe UI Symbol',
],
title: [
'MatterSQ',
'-apple-system',
'BlinkMacSystemFont',
'Inter',
'Segoe UI',
'Roboto',
'Helvetica Neue',
'Helvetica',
'Arial',
'sans-serif',
'Apple Color Emoji',
'Segoe UI Emoji',
'Segoe UI Symbol',
],
mono: ['ui-monospace', 'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', 'monospace'],
},
screens: {
// Sync with vars.scss
sm: '576px',
md: '768px',
lg: '992px',
xl: '1200px',
'2xl': '1600px',
},
borderRadius: {
none: '0',
sm: '0.25rem', // Originally 0.125rem, but we're rounder
DEFAULT: '0.375rem', // Originally 0.25rem, but we're rounder - aligned with var(--radius)
lg: '0.5rem',
full: '9999px',
},
extend: {
chore(frontend): Real Tailwind + Autoprefixer (#19051) * chore(frontend): Real Tailwind + Autoprefixer * Align some non-standard utility class usage with Tailwind * Start using container queries * Update tailwind.config.js * Move PostCSS packages into prod dependencies * Add EE * Add larger spacings for properties other than width * Fix spacing backward compat * Add max-w-1/2 * Remove Tailwind normalization * Ensure JIT analysis works * Actually we don't need a container query for this * Clean up more * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update production.Dockerfile * Extend `fontSize` instead of replacing * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Fix production build * Add clarification comment * Update trends.cy.ts * Fix `scale` usage * Fix minor styling issues * Upgrade to Tailwind 3.4 * Actually use `cssnano` * Don't use `cssnano` in dev * Solve annoying Tailwind logs * Add comment explaining plugins being defined twice * Fix side panel icon rotation * Reset snapshots * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update query snapshots * Update query snapshots * Fix dockerfile * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (1) * Fix up flag wrap * Update UI snapshots for `chromium` (2) * Fix * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Ben White <ben@posthog.com>
2024-01-08 13:26:12 +01:00
fontSize: {
xxs: ['0.625rem', '0.75rem'], // 10px (12px of line height)
},
spacing: {
// Some additional larger widths for compatibility with our pre-Tailwind system
// Don't add new ones here, in new code just use the `w-[32rem]` style for arbitrary values
13: '3.25rem',
15: '3.75rem',
chore(frontend): Real Tailwind + Autoprefixer (#19051) * chore(frontend): Real Tailwind + Autoprefixer * Align some non-standard utility class usage with Tailwind * Start using container queries * Update tailwind.config.js * Move PostCSS packages into prod dependencies * Add EE * Add larger spacings for properties other than width * Fix spacing backward compat * Add max-w-1/2 * Remove Tailwind normalization * Ensure JIT analysis works * Actually we don't need a container query for this * Clean up more * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update production.Dockerfile * Extend `fontSize` instead of replacing * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Fix production build * Add clarification comment * Update trends.cy.ts * Fix `scale` usage * Fix minor styling issues * Upgrade to Tailwind 3.4 * Actually use `cssnano` * Don't use `cssnano` in dev * Solve annoying Tailwind logs * Add comment explaining plugins being defined twice * Fix side panel icon rotation * Reset snapshots * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update query snapshots * Update query snapshots * Fix dockerfile * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (1) * Fix up flag wrap * Update UI snapshots for `chromium` (2) * Fix * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Ben White <ben@posthog.com>
2024-01-08 13:26:12 +01:00
18: '4.5rem',
// All whole number values up to 18 ensured above
chore(frontend): Real Tailwind + Autoprefixer (#19051) * chore(frontend): Real Tailwind + Autoprefixer * Align some non-standard utility class usage with Tailwind * Start using container queries * Update tailwind.config.js * Move PostCSS packages into prod dependencies * Add EE * Add larger spacings for properties other than width * Fix spacing backward compat * Add max-w-1/2 * Remove Tailwind normalization * Ensure JIT analysis works * Actually we don't need a container query for this * Clean up more * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update production.Dockerfile * Extend `fontSize` instead of replacing * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Fix production build * Add clarification comment * Update trends.cy.ts * Fix `scale` usage * Fix minor styling issues * Upgrade to Tailwind 3.4 * Actually use `cssnano` * Don't use `cssnano` in dev * Solve annoying Tailwind logs * Add comment explaining plugins being defined twice * Fix side panel icon rotation * Reset snapshots * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update query snapshots * Update query snapshots * Fix dockerfile * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (1) * Fix up flag wrap * Update UI snapshots for `chromium` (2) * Fix * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Ben White <ben@posthog.com>
2024-01-08 13:26:12 +01:00
30: '7.5rem',
50: '12.5rem',
60: '15rem',
80: '20rem',
100: '25rem',
120: '30rem',
140: '35rem',
160: '40rem',
180: '45rem',
192: '48rem',
200: '50rem',
// All whole number values divisible by 20 up to 200 ensured above
chore(frontend): Real Tailwind + Autoprefixer (#19051) * chore(frontend): Real Tailwind + Autoprefixer * Align some non-standard utility class usage with Tailwind * Start using container queries * Update tailwind.config.js * Move PostCSS packages into prod dependencies * Add EE * Add larger spacings for properties other than width * Fix spacing backward compat * Add max-w-1/2 * Remove Tailwind normalization * Ensure JIT analysis works * Actually we don't need a container query for this * Clean up more * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update production.Dockerfile * Extend `fontSize` instead of replacing * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Fix production build * Add clarification comment * Update trends.cy.ts * Fix `scale` usage * Fix minor styling issues * Upgrade to Tailwind 3.4 * Actually use `cssnano` * Don't use `cssnano` in dev * Solve annoying Tailwind logs * Add comment explaining plugins being defined twice * Fix side panel icon rotation * Reset snapshots * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update query snapshots * Update query snapshots * Fix dockerfile * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (1) * Fix up flag wrap * Update UI snapshots for `chromium` (2) * Fix * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Ben White <ben@posthog.com>
2024-01-08 13:26:12 +01:00
248: '62rem',
300: '75rem',
},
minWidth: {
'1/3': '33.333333%',
},
chore(frontend): Real Tailwind + Autoprefixer (#19051) * chore(frontend): Real Tailwind + Autoprefixer * Align some non-standard utility class usage with Tailwind * Start using container queries * Update tailwind.config.js * Move PostCSS packages into prod dependencies * Add EE * Add larger spacings for properties other than width * Fix spacing backward compat * Add max-w-1/2 * Remove Tailwind normalization * Ensure JIT analysis works * Actually we don't need a container query for this * Clean up more * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update production.Dockerfile * Extend `fontSize` instead of replacing * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Fix production build * Add clarification comment * Update trends.cy.ts * Fix `scale` usage * Fix minor styling issues * Upgrade to Tailwind 3.4 * Actually use `cssnano` * Don't use `cssnano` in dev * Solve annoying Tailwind logs * Add comment explaining plugins being defined twice * Fix side panel icon rotation * Reset snapshots * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update query snapshots * Update query snapshots * Fix dockerfile * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (1) * Fix up flag wrap * Update UI snapshots for `chromium` (2) * Fix * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Ben White <ben@posthog.com>
2024-01-08 13:26:12 +01:00
maxWidth: {
'1/2': '50%',
chore(frontend): Real Tailwind + Autoprefixer (#19051) * chore(frontend): Real Tailwind + Autoprefixer * Align some non-standard utility class usage with Tailwind * Start using container queries * Update tailwind.config.js * Move PostCSS packages into prod dependencies * Add EE * Add larger spacings for properties other than width * Fix spacing backward compat * Add max-w-1/2 * Remove Tailwind normalization * Ensure JIT analysis works * Actually we don't need a container query for this * Clean up more * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update production.Dockerfile * Extend `fontSize` instead of replacing * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Fix production build * Add clarification comment * Update trends.cy.ts * Fix `scale` usage * Fix minor styling issues * Upgrade to Tailwind 3.4 * Actually use `cssnano` * Don't use `cssnano` in dev * Solve annoying Tailwind logs * Add comment explaining plugins being defined twice * Fix side panel icon rotation * Reset snapshots * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update query snapshots * Update query snapshots * Fix dockerfile * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (1) * Fix up flag wrap * Update UI snapshots for `chromium` (2) * Fix * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Ben White <ben@posthog.com>
2024-01-08 13:26:12 +01:00
},
boxShadow: {
DEFAULT: 'var(--shadow-elevation)',
},
flex: {
2: '2 2 0%',
3: '3 3 0%',
},
},
},
chore(frontend): Real Tailwind + Autoprefixer (#19051) * chore(frontend): Real Tailwind + Autoprefixer * Align some non-standard utility class usage with Tailwind * Start using container queries * Update tailwind.config.js * Move PostCSS packages into prod dependencies * Add EE * Add larger spacings for properties other than width * Fix spacing backward compat * Add max-w-1/2 * Remove Tailwind normalization * Ensure JIT analysis works * Actually we don't need a container query for this * Clean up more * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update production.Dockerfile * Extend `fontSize` instead of replacing * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Fix production build * Add clarification comment * Update trends.cy.ts * Fix `scale` usage * Fix minor styling issues * Upgrade to Tailwind 3.4 * Actually use `cssnano` * Don't use `cssnano` in dev * Solve annoying Tailwind logs * Add comment explaining plugins being defined twice * Fix side panel icon rotation * Reset snapshots * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update query snapshots * Update query snapshots * Fix dockerfile * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (1) * Fix up flag wrap * Update UI snapshots for `chromium` (2) * Fix * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Ben White <ben@posthog.com>
2024-01-08 13:26:12 +01:00
plugins: [require('@tailwindcss/container-queries')],
}
chore(frontend): Real Tailwind + Autoprefixer (#19051) * chore(frontend): Real Tailwind + Autoprefixer * Align some non-standard utility class usage with Tailwind * Start using container queries * Update tailwind.config.js * Move PostCSS packages into prod dependencies * Add EE * Add larger spacings for properties other than width * Fix spacing backward compat * Add max-w-1/2 * Remove Tailwind normalization * Ensure JIT analysis works * Actually we don't need a container query for this * Clean up more * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update production.Dockerfile * Extend `fontSize` instead of replacing * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Fix production build * Add clarification comment * Update trends.cy.ts * Fix `scale` usage * Fix minor styling issues * Upgrade to Tailwind 3.4 * Actually use `cssnano` * Don't use `cssnano` in dev * Solve annoying Tailwind logs * Add comment explaining plugins being defined twice * Fix side panel icon rotation * Reset snapshots * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update query snapshots * Update query snapshots * Fix dockerfile * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (1) * Fix up flag wrap * Update UI snapshots for `chromium` (2) * Fix * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Ben White <ben@posthog.com>
2024-01-08 13:26:12 +01:00
module.exports = config