Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

There are two ways to write error-free programs; only the third one works.


devel / comp.infosystems.www.authoring.stylesheets / Re: Converting very old html to html5 + css - inexplicable difference

SubjectAuthor
* Converting very old html to html5 + css - inexplicable differenceRobert Prins
`* Re: Converting very old html to html5 + css - inexplicable differenceStan Brown
 `* Re: Converting very old html to html5 + css - inexplicable differenceRobert Prins
  `* Re: Converting very old html to html5 + css - inexplicable differenceJukka K. Korpela
   `- Re: Converting very old html to html5 + css - inexplicable differenceRobert Prins

1
Converting very old html to html5 + css - inexplicable difference

<ufcd29$2ef51$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=347&group=comp.infosystems.www.authoring.stylesheets#347

  copy link   Newsgroups: comp.infosystems.www.authoring.html comp.infosystems.www.authoring.stylesheets
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: rob...@prino.org (Robert Prins)
Newsgroups: comp.infosystems.www.authoring.html,comp.infosystems.www.authoring.stylesheets
Subject: Converting very old html to html5 + css - inexplicable difference
Date: Sun, 1 Oct 2023 21:16:27 +0000
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <ufcd29$2ef51$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 1 Oct 2023 18:16:42 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="5d51b4975d68cf7811eac0d4c652154b";
logging-data="2571425"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/6YdaGe7gEc4doC+al5f+k"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:quLrJ4/VQ5RBP6w0hC6+auQaweA=
Content-Language: nl, en-GB
 by: Robert Prins - Sun, 1 Oct 2023 21:16 UTC

This

<https://prino.neocities.org/@temp/$marty/old.html>

is the old html, and

this

<https://prino.neocities.org/@temp/$marty/new.html>

is the new html5+css (and is very much Work-in-progress)

As for the why, I'm trying to create some REXX code to actually, I've got four
more of these files, one of 9,000+ lines, to convert, do the conversion
automatically, but for that I need a reference.

My "problem" is that in "new.html" the text after the third picture is shifted
to the left, and I cannot figure out why this is happening, so if anyone here
has any clues, please share them!

And yes, I know there are differences in the line-spacing, but those are (at
least for now) not very interesting, I surmise that some of them might be caused
by using a class on the <p> tag, rather than adding a additional <span>..</span>
with the class.

Thanks,

Robert
--
Robert AH Prins
robert(a)prino(d)org
The hitchhiking grandfather - https://prino.neocities.org/
Some REXX code for use on z/OS - https://prino.neocities.org/zOS/zOS-Tools.html

Re: Converting very old html to html5 + css - inexplicable difference

<MPG.3f83607d890ac4f99901b3@news.individual.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=348&group=comp.infosystems.www.authoring.stylesheets#348

  copy link   Newsgroups: comp.infosystems.www.authoring.html comp.infosystems.www.authoring.stylesheets
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: the_stan...@fastmail.fm (Stan Brown)
Newsgroups: comp.infosystems.www.authoring.html,comp.infosystems.www.authoring.stylesheets
Subject: Re: Converting very old html to html5 + css - inexplicable difference
Date: Sun, 1 Oct 2023 11:55:29 -0700
Organization: Oak Road Systems
Lines: 18
Message-ID: <MPG.3f83607d890ac4f99901b3@news.individual.net>
References: <ufcd29$2ef51$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: individual.net f3LcZ3N2PYpsptJBPkA6sQdnREHi1SnTzE6N44COL8JC5W56/d
Cancel-Lock: sha1:WuQQrVW5h6IR1/BgBUAtO2K+s2Q= sha256:w2f6Cc2FKqjzuIAH6qsRhvVe+a623w7kFR/MDND2rnI=
User-Agent: MicroPlanet-Gravity/3.0.11 (GRC)
 by: Stan Brown - Sun, 1 Oct 2023 18:55 UTC

On Sun, 1 Oct 2023 21:16:27 +0000, Robert Prins wrote:

> <https://prino.neocities.org/@temp/$marty/new.html>
>
> My "problem" is that in "new.html" the text after the third picture is shifted
> to the left, and I cannot figure out why this is happening, so if anyone here
> has any clues, please share them!

A run through the w3c validator shows numerous nesting errors. (There
are also a lot of errors and warnings about obsolete things, but I
know you plan to take care of those.)

<https://validator.w3.org/nu/?doc=https%3A%2F%2Fprino.neocities.org%
2F%40temp%2F%24marty%2Fnew>

--
Stan Brown, Tehachapi, California, USA
https://BrownMath.com/

Re: Converting very old html to html5 + css - inexplicable difference

<ufhmj7$3mh3m$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=349&group=comp.infosystems.www.authoring.stylesheets#349

  copy link   Newsgroups: comp.infosystems.www.authoring.html comp.infosystems.www.authoring.stylesheets
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: rob...@prino.org (Robert Prins)
Newsgroups: comp.infosystems.www.authoring.html,comp.infosystems.www.authoring.stylesheets
Subject: Re: Converting very old html to html5 + css - inexplicable difference
Date: Tue, 3 Oct 2023 21:29:50 +0000
Organization: A noiseless patient Spider
Lines: 57
Message-ID: <ufhmj7$3mh3m$1@dont-email.me>
References: <ufcd29$2ef51$1@dont-email.me>
<MPG.3f83607d890ac4f99901b3@news.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 3 Oct 2023 18:29:59 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d3371c1f9d0ce299e563cdb9019e9d93";
logging-data="3884150"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/XSK9i7x/4qjAF8NrcBffZ"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:EvPClgx66/M9tcTHZmAyzviC+58=
In-Reply-To: <MPG.3f83607d890ac4f99901b3@news.individual.net>
Content-Language: nl, en-GB
 by: Robert Prins - Tue, 3 Oct 2023 21:29 UTC

On 2023-10-01 18:55, Stan Brown wrote:
> On Sun, 1 Oct 2023 21:16:27 +0000, Robert Prins wrote:
>
>> <https://prino.neocities.org/@temp/$marty/new.html>
>>
>> My "problem" is that in "new.html" the text after the third picture is
>> shifted to the left, and I cannot figure out why this is happening, so if
>> anyone here has any clues, please share them! >
> A run through the w3c validator shows numerous nesting errors. (There
> are also a lot of errors and warnings about obsolete things, but I
> know you plan to take care of those.)
>
> <https://validator.w3.org/nu/?doc=https%3A%2F%2Fprino.neocities.org%
> 2F%40temp%2F%24marty%2Fnew>

Old,

<https://prino.neocities.org/@temp/$marty/old.html>,

and

new,

<https://prino.neocities.org/@temp/$marty/new.html>

now match 99.999%, I've got a tiny, no pun intended, problem with the size="2"
font, size=2 and font-size: 81.0% are obviously not the same, but life's way too
short to figure out the decimals.

The new.html now validates without errors on <https://validator.w3.org/nu/>, the
old.html validation results in 380 messages, most, 372, about obsolete elements
and attributes, I've manually removed the ones that caused the nesting errors.

I've also written a small REXX exec, just 72 lines of code, that almost converts
the next file from the old "legacy-html" to html5, but here I've run into a snag
that I cannot explain...

So I added a bit of temporary CSS to show the table borders, and then had a look
at the "new.html" in FF's Inspector window. Much to my surprise, the computed
table-width is 625.133px (where the CSS specifies 400px), and its contents only
start moving one the width goes over 626px. (The inspector doesn't tell me
anything about "old.html", which is a bummer...)

So here is the first question,

*** "Where does the calculated width of 625.133px come from?" ***

The table contains only pure text, and I would have expected that too long lines
would simply wrap to the next line, but apparently not...

Robert
--
Robert AH Prins
robert(a)prino(d)org
The hitchhiking grandfather - https://prino.neocities.org/
Some REXX code for use on z/OS - https://prino.neocities.org/zOS/zOS-Tools.html

Re: Converting very old html to html5 + css - inexplicable difference

<ufhona$3mm96$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=350&group=comp.infosystems.www.authoring.stylesheets#350

  copy link   Newsgroups: comp.infosystems.www.authoring.html comp.infosystems.www.authoring.stylesheets
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jukk...@gmail.com (Jukka K. Korpela)
Newsgroups: comp.infosystems.www.authoring.html,comp.infosystems.www.authoring.stylesheets
Subject: Re: Converting very old html to html5 + css - inexplicable difference
Date: Tue, 3 Oct 2023 22:06:18 +0300
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <ufhona$3mm96$1@dont-email.me>
References: <ufcd29$2ef51$1@dont-email.me>
<MPG.3f83607d890ac4f99901b3@news.individual.net>
<ufhmj7$3mh3m$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 3 Oct 2023 19:06:18 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4619eda8112f8f01f63f9be481750f79";
logging-data="3889446"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/PoaKiUYJsTHnxwIRHJYFE"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:Tu1kB1iVb/3SCfkADWMvkoXtFlo=
In-Reply-To: <ufhmj7$3mh3m$1@dont-email.me>
 by: Jukka K. Korpela - Tue, 3 Oct 2023 19:06 UTC

Robert Prins wrote:

> I've got a tiny, no pun intended, problem with the
> size="2" font, size=2 and font-size: 81.0% are obviously not the same,
> but life's way too short to figure out the decimals.

I have no idea why you are converting old documents to new format,
but maybe there is a reason. If you just keep the documents on the web
and make some updates and additions, I don't see why you would not work
with their existing HTML and CSS code. If you want to make a major
revision, it is probably faster and better to design new templates and
start with them, just copying content from old documents as needed.

But the specific problem you mention looks simple to me: the values
of the size attribute of the <font> element was meant be numeric values
from 1 to 7, corresponding to an implementation-defined set of font
sizes, in increasing order. Specifically, <font size=2> corresponds to
font-size: small in CSS, as explicitly described at
https://html.spec.whatwg.org/multipage/rendering.html#phrasing-content-3

Yucca, https://jkorpela.fi

Re: Converting very old html to html5 + css - inexplicable difference

<ufhs26$3nj56$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=351&group=comp.infosystems.www.authoring.stylesheets#351

  copy link   Newsgroups: comp.infosystems.www.authoring.html comp.infosystems.www.authoring.stylesheets
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: rob...@prino.org (Robert Prins)
Newsgroups: comp.infosystems.www.authoring.html,comp.infosystems.www.authoring.stylesheets
Subject: Re: Converting very old html to html5 + css - inexplicable difference
Date: Tue, 3 Oct 2023 23:03:09 +0000
Organization: A noiseless patient Spider
Lines: 50
Message-ID: <ufhs26$3nj56$1@dont-email.me>
References: <ufcd29$2ef51$1@dont-email.me>
<MPG.3f83607d890ac4f99901b3@news.individual.net>
<ufhmj7$3mh3m$1@dont-email.me> <ufhona$3mm96$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 3 Oct 2023 20:03:18 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d3371c1f9d0ce299e563cdb9019e9d93";
logging-data="3919014"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19bE98jDQLo1amGj+3vhXEp"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:sKY+LibaHmoffsGuF3Cff52WBSM=
Content-Language: nl, en-GB
In-Reply-To: <ufhona$3mm96$1@dont-email.me>
 by: Robert Prins - Tue, 3 Oct 2023 23:03 UTC

On 2023-10-03 19:06, Jukka K. Korpela wrote:
> Robert Prins wrote:
>
>> I've got a tiny, no pun intended, problem with the size="2" font, size=2 and
>> font-size: 81.0% are obviously not the same, but life's way too short to
>> figure out the decimals.
>
> I have no idea why you are converting old documents to new format,
> but maybe there is a reason. If you just keep the documents on the web
> and make some updates and additions, I don't see why you would not work
> with their existing HTML and CSS code. If you want to make a major revision, it
> is probably faster and better to design new templates and
> start with them, just copying content from old documents as needed.

I do it because I have too much time on my hands, and as I wrote, I've written a
bit of REXX to almost completely automate the conversion, so I'm hitting two
birds with one stone, I make the content more easily (not via archive.org)
available again on a site that tries to collect as much hitchhike material as
possible, Bernd Wechner has indicated that he no longer has the time to keep his
<https://bernd.wechner.info/Hitchhiking/> site up-to-date, and I keep my grey
cells active during those times that I'm not working on my other hitchhike
statistics programs and an ongoing discussion to see if it's possible to define
an DTD to define hitchhiking data recorded by various hitchhikers, who now all
use their own totally incompatible formats.

Anyway, there are still a few loose ends to tidy up in the REXX exec, like
processing <font> tags with multiple attributes, but I'll iron these out once
I'm back from hitchhiking to the Netherlands (later this week) and back to
Lithuania again (early next week), and if you ask why? My father has Alzheimer.

> But the specific problem you mention looks simple to me: the values
> of the size attribute of the <font> element was meant be numeric values
> from 1 to 7, corresponding to an implementation-defined set of font sizes, in
> increasing order. Specifically, <font size=2> corresponds to
> font-size: small in CSS, as explicitly described at
> https://html.spec.whatwg.org/multipage/rendering.html#phrasing-content-3

That seems to solve the issue, well almost, as using these "textual" sizes
correct the font, but there's still flutter in the line-spacing, with "small",
the line-spacing is visibly larger than with size=2, but, as I already
mentioned, that is not my problem, which is the much wider calculated size of
the table compared to the specified size.

Robert
--
Robert AH Prins
robert(a)prino(d)org
The hitchhiking grandfather - https://prino.neocities.org/
Some REXX code for use on z/OS - https://prino.neocities.org/zOS/zOS-Tools.html

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor