Closed haaah closed 2 weeks ago
Your reproduction doesn't have any q-layout defined. You may have forgotten to save your changes.
But anyway, q-dialog is a floating modal, so it's not part of the page. So, it won't be affected by the page height. This is expected behavior and is not a bug. You can specify style
for q-dialog to give it the height you want.
Yes you are right I forgot to save the jsfiddle. I have updated the jsfiddle link please take a look.
I'm trying to create something like https://quasar.dev/layout/page#style-fn where I want to overwrite the minHeight of the q-page with something smaller instead of the default quasar behavior where it perform a calculation on offset or 100vh
Ah, so you are using a containerized q-layout within a q-dialog.
As you can see, style-fn
runs fine.
A containerized q-layout will take all the available width/height (when it can). Normally, it requires a width/height to be set(as stated by the docs), as oftentimes it can't take up the space. In this case, since it's inside a q-dialog, it can take up the space, and it takes up all the space. Since you gave the q-layout a background color, and it takes up all the space, you see it bigger than you expected. If you give the background color to q-page instead, you will see it the size you want. https://jsfiddle.net/8qht2ga4/
Does that solve your problem?
thanks for the explanation and solution. Yes this solved my problem.
What happened?
overwriting the function style-fn within q-page didn't take effect.
What did you expect to happen?
The dialog min-height should start with 100px
Reproduction URL
https://jsfiddle.net/b8wrhv4n/2/
How to reproduce?
Flavour
Quasar CLI with Webpack (@quasar/cli | @quasar/app-webpack)
Areas
Style & Identity (quasar)
Platforms/Browsers
Chrome
Quasar info output
Relevant log output
No response
Additional context
Although the style-fn did overwrite the style in q-page but the q-dialog is still render with 100% vh