* EWW: Render span tags with spaces aroun them?
@ 2020-10-15 17:13 T.V Raman
2020-10-16 4:52 ` Lars Ingebrigtsen
0 siblings, 1 reply; 5+ messages in thread
From: T.V Raman @ 2020-10-15 17:13 UTC (permalink / raw)
To: emacs-devel
As an example, see
https://www.espncricinfo.com/series/8048/game/1216531/royal-challengers-bangalore-vs-kings-xi-punjab-31st-match-indian-premier-league-2020-21
The HTML is of course horrible as is the practice on the web, and
this site appears to use empty <comment></comment> tags for some
reason as well. But the user visible breakage is that things get run
together and the easiest fix might be to ensure that span tags when
rendered are surrounded by spaces
--
Thanks,
--Raman
♉ Id: kg:/m/0285kf1 🦮
--
Thanks,
--Raman
♉ Id: kg:/m/0285kf1 🦮
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: EWW: Render span tags with spaces aroun them?
2020-10-15 17:13 EWW: Render span tags with spaces aroun them? T.V Raman
@ 2020-10-16 4:52 ` Lars Ingebrigtsen
2020-10-16 5:57 ` Tim Cross
0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-16 4:52 UTC (permalink / raw)
To: T.V Raman; +Cc: emacs-devel
"T.V Raman" <raman@google.com> writes:
> But the user visible breakage is that things get run together and the
> easiest fix might be to ensure that span tags when rendered are
> surrounded by spaces
The <span> rendering shouldn't have any extra spaces -- that's not what
the element was designed for, and will make many texts unreadable.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: EWW: Render span tags with spaces aroun them?
2020-10-16 4:52 ` Lars Ingebrigtsen
@ 2020-10-16 5:57 ` Tim Cross
2020-10-16 6:25 ` Lars Ingebrigtsen
2020-10-16 14:45 ` T.V Raman
0 siblings, 2 replies; 5+ messages in thread
From: Tim Cross @ 2020-10-16 5:57 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Emacs developers, T.V Raman
[-- Attachment #1: Type: text/plain, Size: 1453 bytes --]
I agree. Adding spaces for span elements will change the semantics and
likely affect other rendering in a negative way. For example, sometimes you
may use span to style just part of some text or it could affect layout of
things like icons etc. I note that neither chrome or firefox add spaces and
will just run the text into the previous/next word if there is no space
around the tag.
Having said that, I notice when looking at the example page you posted,
there is no text running into previous/next text around span tags. This
makes me think that the page is using a CSS style to style the element
which is not honoured by eww/shr? I had a quick look, but it really is a
very ugly piece of HTML. At any rate, perhaps the issue is not that span
elements should have spaces added, but that eww/shr is not able to add the
CSS style which adds the spacing to the span content?
On Fri, 16 Oct 2020 at 15:54, Lars Ingebrigtsen <larsi@gnus.org> wrote:
> "T.V Raman" <raman@google.com> writes:
>
> > But the user visible breakage is that things get run together and the
> > easiest fix might be to ensure that span tags when rendered are
> > surrounded by spaces
>
> The <span> rendering shouldn't have any extra spaces -- that's not what
> the element was designed for, and will make many texts unreadable.
>
> --
> (domestic pets only, the antidote for overdose, milk.)
> bloggy blog: http://lars.ingebrigtsen.no
>
>
--
regards,
Tim
--
Tim Cross
[-- Attachment #2: Type: text/html, Size: 2142 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: EWW: Render span tags with spaces aroun them?
2020-10-16 5:57 ` Tim Cross
@ 2020-10-16 6:25 ` Lars Ingebrigtsen
2020-10-16 14:45 ` T.V Raman
1 sibling, 0 replies; 5+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-16 6:25 UTC (permalink / raw)
To: Tim Cross; +Cc: Emacs developers, T.V Raman
Tim Cross <theophilusx@gmail.com> writes:
> At any rate, perhaps the issue is not that span elements should have
> spaces added, but that eww/shr is not able to add the CSS style which
> adds the spacing to the span content?
Yes. And shr doesn't use css. (Well, almost not.)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: EWW: Render span tags with spaces aroun them?
2020-10-16 5:57 ` Tim Cross
2020-10-16 6:25 ` Lars Ingebrigtsen
@ 2020-10-16 14:45 ` T.V Raman
1 sibling, 0 replies; 5+ messages in thread
From: T.V Raman @ 2020-10-16 14:45 UTC (permalink / raw)
To: theophilusx; +Cc: larsi, raman, emacs-devel
Thanks for looking Tim, hopefully you speak enough cricket to spot the
bug.
Cricinfo shows live scores during IPL games, when games are live,
player names are running into the player's runs scored. In the markup,
there an empty <comment></comment> element that may well be getting
styled via css (comment as far as I know is not part of html)Tim Cross writes:
> I agree. Adding spaces for span elements will change the semantics and
> likely affect other rendering in a negative way. For example, sometimes you
> may use span to style just part of some text or it could affect layout of
> things like icons etc. I note that neither chrome or firefox add spaces and
> will just run the text into the previous/next word if there is no space
> around the tag.
>
> Having said that, I notice when looking at the example page you posted,
> there is no text running into previous/next text around span tags. This
> makes me think that the page is using a CSS style to style the element
> which is not honoured by eww/shr? I had a quick look, but it really is a
> very ugly piece of HTML. At any rate, perhaps the issue is not that span
> elements should have spaces added, but that eww/shr is not able to add the
> CSS style which adds the spacing to the span content?
>
> On Fri, 16 Oct 2020 at 15:54, Lars Ingebrigtsen <larsi@gnus.org> wrote:
>
> > "T.V Raman" <raman@google.com> writes:
> >
> > > But the user visible breakage is that things get run together and the
> > > easiest fix might be to ensure that span tags when rendered are
> > > surrounded by spaces
> >
> > The <span> rendering shouldn't have any extra spaces -- that's not what
> > the element was designed for, and will make many texts unreadable.
> >
> > --
> > (domestic pets only, the antidote for overdose, milk.)
> > bloggy blog: http://lars.ingebrigtsen.no
> >
> >
>
> --
> regards,
>
> Tim
>
> --
> Tim Cross
--
♉Id: kg:/m/0285kf1 🦮♉
--
♉Id: kg:/m/0285kf1 🦮♉
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-10-16 14:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-15 17:13 EWW: Render span tags with spaces aroun them? T.V Raman
2020-10-16 4:52 ` Lars Ingebrigtsen
2020-10-16 5:57 ` Tim Cross
2020-10-16 6:25 ` Lars Ingebrigtsen
2020-10-16 14:45 ` T.V Raman
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.