vue-trix icon indicating copy to clipboard operation
vue-trix copied to clipboard

Disable default CSS to allow for custom CSS

Open ipat500 opened this issue 4 years ago • 3 comments

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

ipat500 avatar Jan 05 '21 00:01 ipat500

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 avatar Mar 01 '21 04:03 hanhdt

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

gilbitron avatar Oct 20 '21 10:10 gilbitron

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 ?

mydnic avatar Dec 24 '21 09:12 mydnic