Tiptap: ProseMirror class is ignored when used in <style scoped>

Created on 10 Sep 2020  路  2Comments  路  Source: ueberdosis/tiptap

Describe the bug
When you want to customize the editor you can pass classes to EditorContent but that will style the container itself. When you want to style the editable div you have to work with .ProseMirror CSS class. That's fine until you try to edit and tweat that class inside a <style scoped> tag on a Vue SFC.

Steps to Reproduce / Codesandbox Example
Steps to reproduce the behavior:

  1. Go to App.vue
  2. Toggle scoped from <style>
  3. See error

Fork this or create a new Codesandbox replicating your error
https://codesandbox.io/s/tiptap-scoped-style-bug-rnlhs

Expected behavior
.ProseMirror classes should behave equally regardless of the style scope (at least this is what I think it should happen)

Screenshots
Codesanbox is enough

Environment

  • OS: Windows 10
  • Browser Firefox
  • Version Latest Dev Edition
  • Mobile / Desktop: Desktop
bug

Most helpful comment

This is expected behaviour of Vue.
To style child components in scoped style tags you would have to use deep selectors (Link to Docs)

```html

For me only the first one worked in your Codesandbox example.
hope this helps :)

All 2 comments

This is expected behaviour of Vue.
To style child components in scoped style tags you would have to use deep selectors (Link to Docs)

```html

For me only the first one worked in your Codesandbox example.
hope this helps :)

That's actually pretty neat. Shame on me on the missing doc part, that happens when you use tools without instructions (vue-loader in this case) 馃槄

Update: Confirm, it works. The /deep/ and ::v-deep are useful when you are writing SASS or LESS css, for normal CSS >>> it's fine.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

agentq15 picture agentq15  路  3Comments

jetacpp picture jetacpp  路  3Comments

git-mischa picture git-mischa  路  3Comments

klaasgeldof picture klaasgeldof  路  3Comments

connecteev picture connecteev  路  3Comments