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

How to use with tailwindcss? #26

Open
jong-kyung opened this issue Feb 21, 2024 · 3 comments
Open

How to use with tailwindcss? #26

jong-kyung opened this issue Feb 21, 2024 · 3 comments

Comments

@jong-kyung
Copy link

jong-kyung commented Feb 21, 2024

I use both tailwindCSS and Quill, I add inline-block style to img tag at index.css
but it still doesn't work🥲 how can I solve it?

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  img {
    @apply inline-block object-cover h-full w-full
  }
}
@xeger
Copy link
Owner

xeger commented Feb 22, 2024

QuillJS has its own, completely independent mechanism for managing styles. It does not necessarily work with Tailwind or Bootstrap or other libraries.

I would use browser tools to inspect the CSS that Tailwind is generating, and also to inspect the styles that apply to image elements inside Quill. You will probably find discrepancies, or Quill styles that override the base styles that Tailwind is providing.

@Lokheim
Copy link

Lokheim commented Mar 14, 2024

So the image aligning wont work with tailwind ?

@xeger
Copy link
Owner

xeger commented Jun 3, 2024

Quill will add style attributes to every DOM element inside the editor. These supercede any classname-based CSS. So nothing in Quill works with Tailwind.

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

3 participants