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

Disable default CSS to allow for custom CSS #257

Open
ipat500 opened this issue Jan 5, 2021 · 3 comments
Open

Disable default CSS to allow for custom CSS #257

ipat500 opened this issue Jan 5, 2021 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@ipat500
Copy link

ipat500 commented Jan 5, 2021

When using Trix manually it is possible to not use the default css, by simply not adding it to your html. However when using vue-trix using the import "vue-trix"; method the css file is helpfully added to the page automatically. However if you do not want to use the default css this is unhelpful.

Would it be possible to have a different js-only import, or some other method, so that the JavaScript can be imported without the CSS. What would be the best way to do this?

Thanks

@hanhdt
Copy link
Owner

hanhdt commented Mar 1, 2021

Not sure I understand all your situation.
But you can either overwrite Trix global CSS or add more class into VueTrix element and then style it in your own component.
For example:

<VueTrix
  ...
  class="form-control new__class"
/>

@hanhdt hanhdt added the help wanted Extra attention is needed label Mar 1, 2021
@gilbitron
Copy link

I second being able to disable the default CSS import. I'm having an issue where the imported CSS is causing my build to fail with:

postcss-import: @charset must precede all other statements

@mydnic
Copy link

mydnic commented Dec 24, 2021

I second being able to disable the default CSS import. I'm having an issue where the imported CSS is causing my build to fail with:

postcss-import: @charset must precede all other statements

I have the same issue, did you manage to solve it ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants