Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tailwind config gets ignored #679

Closed
6 tasks done
phaberest opened this issue Feb 11, 2024 · 1 comment
Closed
6 tasks done

Tailwind config gets ignored #679

phaberest opened this issue Feb 11, 2024 · 1 comment
Labels
to triage This issue needs to be triaged

Comments

@phaberest
Copy link

Describe the bug

In my nuxt project I have a custom sans fontFamily in my tailwind config that is getting applied to the UI of my Histoire but not to my components in the stories.

Might be related to #667, I tried setting setupFile option in histoire.config.ts to a file histoire.setup.ts that imports my css (which imports the font) either among with tailwind.config.ts and tailwing.config.js both as export default as well as module.export.

Reproduction

Install a font from fontsource and set it as the 'sans' font in the extend->theme->fontFamily of tailwind config or just set it to something like 'Impact' to test how it is applied.

const defaultTheme = require("tailwindcss/defaultTheme");

/** @type {import('tailwindcss').Config} */
export default {
  content: [
    "./components/**/*.{js,vue,ts}",
    "./layouts/**/*.vue",
    "./pages/**/*.vue",
    "./plugins/**/*.{js,ts}",
    "./app.vue",
    "./error.vue",
  ],
  theme: {
    extend: {
      fontFamily: {
        sans: ['Impact', ...defaultTheme.fontFamily.sans],
      }
    },
  },
  plugins: [],
};

System Info

System:
    OS: macOS 14.3
    CPU: (10) arm64 Apple M1 Pro
    Memory: 506.94 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 21.5.0 - /opt/homebrew/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 10.2.4 - /opt/homebrew/bin/npm
    pnpm: 7.6.0 - ~/Library/pnpm/pnpm
  Browsers:
    Brave Browser: 121.1.62.162
    Chrome: 121.0.6167.160
    Edge: 117.0.2045.40
    Safari: 17.3

Used Package Manager

npm

Validations

@phaberest phaberest added the to triage This issue needs to be triaged label Feb 11, 2024
@phaberest
Copy link
Author

Forget it, it might have been something on my end because it now looks like it is working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant