Invent new HTML-tag "fillerspace"?

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
Geert
Moongazer
Moongazer
Posts: 9
Joined: 2023-01-30, 13:48

Invent new HTML-tag "fillerspace"?

Post by Geert » 2024-04-26, 16:27

I would like to have a very simple HTML-tag that fills-out lines with empty white space. But that whitespace should only occur at the place where I explicitly want it. So this is very different from the "justify" stuff. This method is missing in HTML since 30+ years, even though every website would benefit from it. I would suggest the tag-name "fillerspace": it clearly shows the purpose. What this "fillerspace" should do is just eat up all remaining whitespace on a line, after all other content is rendered. If more than one "fillerspace" is present on a line, the whitespace is equally divided between them. When the browser-window gets smaller, or when the text gets longer, then the fillerspace should gradually collapse into a single standard space (=0.25em, I think?). And the text should reflow to the next line as usual when it no longer fits on one line. So the reflow should behave exactly af if no CSS was applied at all, like in the 1990s, except that the "fillerspace" tag should eat up the empty whitespace on that line. Obviously, this would only be meaningful on single-line content; but most H1-H6 titles are anyway. It would also be great for single-line headers and footers, price-lists, and tables of contents. So that people don't need to mess with tables, or complex CSS and HTML mixed-up.

A few examples (with simplified HTML just to show the concept):

If you want a logo on top-left and another logo on top-right of the page:
(which we did with the "img align=left|right" and "br clear" syntax in the old days):

<p><img logoleft> <fillerspace> <img logoright></p>

Or a logo left, some space, and a search-box right:

<p><img logoleft> <fillerspace> Here the search-box

For single-line titles, headings or footers:

<h1>Some left titletext <fillerspace> Some right titletext or an icon</h1>

<p>Some left text <fillerspace> Some center text <fillerspace> Some right text</p>

Or in pricelists, so the items would be aligned left, and the prices aligned right:

Item <fillerspace> Price:
Apples <fillerspace> 10.26
Bananas <fillerspace> 11.84
Oranges <fillerspace> 13.50

Book chapters:

Chapter 1: Introduction <fillerspace> p.1
Chapter 2: The beginning of the adventure <fillerspace> p.3
Chapter 3: The continuation of the adventure <fillerspace> p.12

In case of price- and content-lists, a filler-symbol might be useful as option, instead of whitespace. For example a middot, dash, dot,...

This concept exists since long in professional book-setting software. I first saw it around 1992. But it is still missing in HTML and CSS. There are complex work-arounds, but they have their own problems: very complex, reduce flexibility, mess-up the reflow on different screen-sizes, hard to maintain... The proposed solution with a single HTML-tag would work on every system, every screen-size. It couldn't be simpler. I am a simple guy, so I need simple solutions. :-)

Programmatically it should probably work as follows, I think: first render all content in an element. If it does not fit on a line, then reflow as in 1990s HTML. If it does fit, then calculate the remaining whitespace. Do not put that whitespace at the end (like on normal left-aligned text), but put it where the "fillerspace" tag is.

Could you have a look at it, and try to implement it? And then promote it, and hope that other browsers borrow the concept, and implement it too? A lot of advancements began this way, by just one browser developing it, and the rest following.

User avatar
Moonchild
Project founder
Project founder
Posts: 39699
Joined: 2011-08-28, 17:27
Location: Sweden

Re: Invent new HTML-tag "fillerspace"?

Post by Moonchild » 2024-04-26, 19:17

See <table> or CSS flexbox
"Sales hates anything that can't be turned into a confident sentence." - anonymous warehouse worker
"Why debate someone you fundamentally don't trust?" - Dario Amodei
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
suzyne
Keeps coming back
Keeps coming back
Posts: 783
Joined: 2023-06-28, 22:43
Location: Australia

Re: Invent new HTML-tag "fillerspace"?

Post by suzyne » 2024-04-26, 21:56

Geert wrote:
2024-04-26, 16:27
Could you have a look at it, and try to implement it? And then promote it, and hope that other browsers borrow the concept, and implement it too? A lot of advancements began this way, by just one browser developing it, and the rest following.
When that has happened before, has it always been on a browser with a significant proportion of the total number of people on the internet?

Tragically, Pale Moon is not in that position, and while the "fillerspace" is an interesting idea even if it did add the tag, the wider web won't notice or care.
Laptop 1: Windows 11 64-bit, i7 @ 2.80GHz, 16GB, NVIDIA GeForce MX450.
Laptop 2: Windows 10 32-bit, Atom Z3735F @ 1.33GHz, 2GB, Intel HD Graphics.
Laptop 3: Linux Mint 20.3 64-bit, i5 @ 2.5GHz, 8GB, Intel HD Graphics 620.

Kris_88
Board Warrior
Board Warrior
Posts: 1198
Joined: 2021-01-26, 11:18

Re: Invent new HTML-tag "fillerspace"?

Post by Kris_88 » 2024-04-27, 02:53

There once was an html <spacer> tag, which is now obsolete and not supported by browsers. Some versions of this tag exist in other languages.
https://www.xul.fr/tutorial/spacer.html
https://flex.apache.org/asdoc/mx/controls/Spacer.html
https://stackoverflow.com/questions/898 ... like-flexs