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

Cannot use responsive design of drawer #19

Closed
J4gQBqqR opened this issue Apr 1, 2023 · 2 comments
Closed

Cannot use responsive design of drawer #19

J4gQBqqR opened this issue Apr 1, 2023 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@J4gQBqqR
Copy link

J4gQBqqR commented Apr 1, 2023

The Drawer has a drawer-mobile for responsive design. I guess it is using some kind of modifier like md: behind the scene.
However, the code directly copied from the doc will not work with this preset:
https://daisyui.com/components/drawer/#drawer-for-mobile--fixed-sidebar-for-desktop
The drawer will not hide/show itself upon changing screen width.

<div class="drawer drawer-mobile">
  <input id="my-drawer-2" type="checkbox" class="drawer-toggle" />
  <div class="drawer-content flex flex-col items-center justify-center">
    <!-- Page content here -->
    <label for="my-drawer-2" class="btn btn-primary drawer-button lg:hidden">Open drawer</label>
  
  </div> 
  <div class="drawer-side">
    <label for="my-drawer-2" class="drawer-overlay"></label> 
    <ul class="menu p-4 w-80 bg-base-100 text-base-content">
      <!-- Sidebar content here -->
      <li><a>Sidebar Item 1</a></li>
      <li><a>Sidebar Item 2</a></li>
    </ul>
  
  </div>
</div>
@J4gQBqqR
Copy link
Author

J4gQBqqR commented Apr 2, 2023

This bug is related to #18 (comment)

As you can see https://github.com/saadeghi/daisyui/blob/51d669d285ef78b95408156a36b4c70195bb4cb2/src/components/unstyled/drawer.css#L73
drawer-mobile has multiple @apply rules that uses breakpoint prefix. breakpoint prefix is not working, thus any style in daisyUI that uses breakpoint prefix will not work. Is this a bug in this preset or UnoCSS?

@kidonng
Copy link
Owner

kidonng commented Apr 15, 2023

Duplicate of #14

@kidonng kidonng marked this as a duplicate of #14 Apr 15, 2023
@kidonng kidonng closed this as not planned Won't fix, can't repro, duplicate, stale Apr 15, 2023
@kidonng kidonng added the duplicate This issue or pull request already exists label Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants