CSS gap in flex box

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
User avatar
fasfas
New to the forum
New to the forum
Posts: 1
Joined: 2021-05-28, 15:14

CSS gap in flex box

Unread post by fasfas » 2021-05-28, 15:26

Code: Select all

{
  display: flex;
  justify-content: center
  gap: 1%; /* or 1em or 10px or whatever */
}
...doesn't work. The debugger shows it crossed out and a yellow triangle next to it.

According to mdn, this has been supported in Firefox since v63, and Pale Moon 29.20.0 looks like it is based on FireFox 68 (which is still quite old).

Why is gap for flex not available, please? Is it unreasonable to go on the version number it reports (e.g. in navigator.userAgent)?

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

Re: CSS gap in flex box

Unread post by Moonchild » 2021-05-28, 16:25

fasfas wrote:
2021-05-28, 15:26
Why is gap for flex not available, please?
Because it's an edge case CSS spec that has not had priority.
fasfas wrote:
2021-05-28, 15:26
Is it unreasonable to go on the version number it reports
Completely unreasonable. Pale Moon is not "based on" Firefox of whatever version it reports in its compatmode. User Agent sniffing is bad but widely employed so it's necessary to give websites some version that is somewhat reasonable.
If you want to know if the browser supports something, try using @supports in CSS. It's there for a reason.
"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

shevy

Re: CSS gap in flex box

Unread post by shevy » 2021-06-06, 09:15

I learned most of HTML/CSS back from ... 1998 to 2004 or so. Only picked up a few things over the years.

I recently tried to use the flexbox CSS stuff, but I found it to be less viable than the CSS grid. I may miss
something but it seems as if CSS allows many more ways nowadays, and they are sometimes confusing
to me. CSS also has gotten more complicated, which I don't like. Admittedly I also forgot tons of things
over the years, so I recently started to re-evaluate all my local knowledge base, and publish some of it
in a documented way (mostly via the ruby gems I maintain; one is using a custom "web-framework"
I use since 2005 or so).

In regards to version sniffing - a problem is that whenever information is potentially given
to external folks this may create problems, e. g. cross-browser sniffing and tracking.

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

Re: CSS gap in flex box

Unread post by Moonchild » 2021-06-06, 09:18

And what does your personal anecdote and history recounting have to do with this topic?
"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

Locked