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

The modal-button class does not exist #1265

Closed
mocdaniel opened this issue Oct 20, 2022 · 1 comment
Closed

The modal-button class does not exist #1265

mocdaniel opened this issue Oct 20, 2022 · 1 comment

Comments

@mocdaniel
Copy link

When trying to use any of the modals by copy-pasting the example HTML from the docs, I end up with the following error when running npm run dev:

npm run dev                                                                                                                                                                            21:02, Thu 20 

> personal-website@0.0.0 dev
> vite


  VITE v3.1.8  ready in 159 ms

  ➜  Local:   http://127.0.0.1:5173/
  ➜  Network: use --host to expose

🌼 daisyUI components 2.31.0  https://github.com/saadeghi/daisyui
  ✔︎ Including:  base, components, themes[29], utilities
  

warn - No utility classes were detected in your source files. If this is unexpected, double-check the `content` option in your Tailwind CSS configuration.
warn - https://tailwindcss.com/docs/content-configuration
[postcss] /Users/daniel/repositories/private/personal-website/src/components/Controls.vue?vue&type=style&index=0&scoped=14a555c2&lang.css:53:9: The `modal-button` class does not exist. If `modal-button` is a custom class, make sure it is defined within a `@layer` directive.
9:02:59 PM [vite] Internal server error: [postcss] /Users/daniel/repositories/private/personal-website/src/components/Controls.vue?vue&type=style&index=0&scoped=14a555c2&lang.css:53:9: The `modal-button` class does not exist. If `modal-button` is a custom class, make sure it is defined within a `@layer` directive.
  Plugin: vite:css
  File: /Users/daniel/repositories/private/personal-website/src/components/Controls.vue?vue&type=style&index=0&scoped=14a555c2&lang.css
  51 |      .modal-button-class {
  52 |          @apply btn;
  53 |          @apply modal-button;
     |           ^
  54 |      }
  55 |  
      at Input.error (/Users/daniel/repositories/private/personal-website/node_modules/postcss/lib/input.js:148:16)
      at AtRule.error (/Users/daniel/repositories/private/personal-website/node_modules/postcss/lib/node.js:60:32)
      at processApply (/Users/daniel/repositories/private/personal-website/node_modules/tailwindcss/lib/lib/expandApplyAtRules.js:324:29)
      at /Users/daniel/repositories/private/personal-website/node_modules/tailwindcss/lib/lib/expandApplyAtRules.js:476:9
      at /Users/daniel/repositories/private/personal-website/node_modules/tailwindcss/lib/processTailwindFeatures.js:55:50
      at plugins (/Users/daniel/repositories/private/personal-website/node_modules/tailwindcss/lib/index.js:33:63)
      at LazyResult.runOnRoot (/Users/daniel/repositories/private/personal-website/node_modules/postcss/lib/lazy-result.js:339:16)
      at LazyResult.runAsync (/Users/daniel/repositories/private/personal-website/node_modules/postcss/lib/lazy-result.js:393:26)
      at LazyResult.async (/Users/daniel/repositories/private/personal-website/node_modules/postcss/lib/lazy-result.js:221:30)
      at LazyResult.then (/Users/daniel/repositories/private/personal-website/node_modules/postcss/lib/lazy-result.js:206:17)

This problem only happens when trying to use modal-button, other classes provided by DaisyUI work just fine.

I also did a quick search in the source files of the module, with no result - did modal-button get deleted at some points? Are the docs outdated?

~ grep -r "modal-button" nodeModules/daisyui
# nothing
@saadeghi
Copy link
Owner

Yes, the docs were outdated (my bad).
You can safely remove the modal-button button.
Docs are updated now.

Thank you!

inorganik pushed a commit to inorganik/daisyui that referenced this issue Feb 7, 2023
imgbot bot pushed a commit to Avensen/daisyui that referenced this issue Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants