rennzhang / codemirror-editor-vue3

CodeMirror component for Vue3
https://rennzhang.github.io/codemirror-editor-vue3
MIT License
202 stars 41 forks source link

Why deafult height 200? #20

Closed ouuan closed 2 years ago

ouuan commented 2 years ago

Describe the bug

1faa2f9f533628a44c228c1830698cdea4f71c1a is a bad change:

  1. This is absolutely a breaking change. It should not appear in a patch release.
  2. Any reason to prefer 200px over 100%? I don't understand. I think 200px will be the proper height only in very limited situations, so a default value of 200px is hardly helpful.
  3. This breaks the design of width-auto and height-auto: https://github.com/RennCheung/codemirror-editor-vue3/blob/1faa2f9f533628a44c228c1830698cdea4f71c1a/packages/src/components/index.vue#L7-L8

Validations

rennzhang commented 2 years ago

You're right.

My expectation is that when a fixed-wide parent box container is not set, it is impossible to inherit the height of 100%. It should be given a height to ensure the most basic display, but this does break the design of the Height-Auto. Indeed, it is indeedIt is a bad change.

Maybe I should give a basic height when the above conditions are established.

squarewave17 commented 2 years ago

This is terrible. How can we override this? i've tried :height="auto" and 100%