Implementing max-height for containers when using min-height #28484
StenderIternum
started this conversation in
Feature Request
Replies: 1 comment
-
Same here, I need to control the max height of my embedded iframe for each device differently. Can't find an easy way to do it.. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Prerequisites
What problem is your feature request going to solve? Please describe..
In containers, when using min-height, I am sometimes using things like calc(100vw* 0.41875); to follow an images format, and not crop or skew the background image - basically the same as vh, but following the width instead.
Problem is that this can be extremely large on. screens like 4K - So I would like to implement a min-height like 50vh, but also have a max-height of 500px.
This can't be done as it is right now - even though max-height has CSS priority, setting selector{max-height:500px} is doing nothing.
I have also tried with clamp() in the custom min height, but this is also not working.
clamp(calc(100vw * 0.41875), calc(100vw * 0.41875), 500px); would still grow taller than 500px
Describe the solution you'd like.
We had an extra input section below min-height on containers, where you can control the max-height
Describe alternatives you've considered.
No response
Additional context
I have not directly been successful in achieving this - I tried to remove overflow, the grows and shrinks, justify-content and align-items, and I can not get max-height to work.
Agreement
Beta Was this translation helpful? Give feedback.
All reactions