support for css min()

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
complutense

support for css min()

Unread post by complutense » 2022-01-13, 16:34

Hi all
I seem to be unable to use css rule min() in PaleMoon. It works in Firefox.
e.g.
height: min( 50vw, 50vh )
height: min( 40vw, 100vh - 6em - 64px )
renders zero height

Ref.:
https://developer.mozilla.org/en-US/docs/Web/CSS/min()
https://caniuse.com/css-math-functions

Is this true, or a bug? Any way to solve it?
Thanks

Pale Moon 29.4.3 (64-bit) Win10 - compilation 20211209125507

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35474
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: support for css min()

Unread post by Moonchild » 2022-01-13, 16:56

complutense wrote:
2022-01-13, 16:34
Any way to solve it?
Use css variables to calculate values, instead of trying to do in-line on-the-fly calculations as if it's a scripting language.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

complutense

Re: support for css min()

Unread post by complutense » 2022-01-13, 17:08

Thank you.
Still, I need to use min() and it does not work in the variable either

This works:
#myDiv {
width:40vw;
--myHeight: calc( 100vh - 6em - 64px );
height:var(--myHeight);
}

This does not:
#myDiv {
width:40vw;
--myHeight: min( 40vw , 100vh - 6em - 64px );
height:var(--myHeight);
}

Locked