From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tim Cross Newsgroups: gmane.emacs.devel Subject: Re: EWW: Render span tags with spaces aroun them? Date: Fri, 16 Oct 2020 16:57:57 +1100 Message-ID: References: <20201015171345.1A803C21231@raman-glaptop.localdomain> <87blh2u5zp.fsf@gnus.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000f3296e05b1c37217" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36345"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs developers , "T.V Raman" To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Oct 16 08:03:12 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kTIpb-0009Ku-OC for ged-emacs-devel@m.gmane-mx.org; Fri, 16 Oct 2020 08:03:11 +0200 Original-Received: from localhost ([::1]:54650 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kTIpa-00088u-Q1 for ged-emacs-devel@m.gmane-mx.org; Fri, 16 Oct 2020 02:03:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44428) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kTIko-0003Lk-Md for emacs-devel@gnu.org; Fri, 16 Oct 2020 01:58:15 -0400 Original-Received: from mail-oo1-xc2d.google.com ([2607:f8b0:4864:20::c2d]:46518) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kTIkk-0006Rb-3W for emacs-devel@gnu.org; Fri, 16 Oct 2020 01:58:14 -0400 Original-Received: by mail-oo1-xc2d.google.com with SMTP id c25so342137ooe.13 for ; Thu, 15 Oct 2020 22:58:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vQL3ustyYeknsVqDwC8bKbFoY3UeOocQP+uD8aY8VkQ=; b=WtTAik1jscXdjrE4US5PF5HSdl+Ga1xT2ME6dA4DKKhKeNb08iD2zyXtHhb3lrZiqR 1PX4VIF4uPAA/HaTv3RG/PG2xa7ab2TlIvaMnbwpZWq/daEhu7m4HhfKO3o7aaGLdXIA L3+q4cUGKP9K1wW6R/be9QaRHc4uSgLSH/Tu5fvhqCpcSVAeEp6Dh4hRPmnbtYVpqIIv 9+PkS/2ToECk2prW7mO6a44MVsT1Cv3fcRUG8W8u9czJX8c5TjAPbw1rpuP/3ev2IKeP gYruBurxbI2+AVREv/I2De8g3WNUIenq1k7u8fm58czTGFLJjGfj+7XHc9Sy3/tc3j/q 14cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vQL3ustyYeknsVqDwC8bKbFoY3UeOocQP+uD8aY8VkQ=; b=RzgTYvT1m28r8vIKEVxvqF1cfe3gSDsDWTBQY0wiwiZrb+k53c9VItTpjzi4+hRfXc 3ZX2Tnrl1WOzVYUW5xYCIvzdNtx2Pj1CsgeoERmYFXSs95Kzeii+s0ydLABup/nPbmeo b/6Mp1TKEsBd/ceNiogmfIt7hrhuX7M4/XFtWZ+BBbmCUvSkrqnRewTtd5CLC5UMuDog GIbYb44FJgsNxy9QTrZHMkzi3NbyM8cyXfg+Fe4Loulv64ticle1BbrlznUE2Xg7RKPh vEmE5IRrWBTKrmUnrcrKIjBwn2sGAmLaXkqk/VLAd+UQDMY320UB0M5jEz0E1Z9icYcX fk6A== X-Gm-Message-State: AOAM530FByi0bSxh5TuZQnNNIEWX2E4ND6q0SbxHE2LZemeZuwiopJDo whBWr2RnpzN//JKrYpx6w0jLNKE3gfZwDBOglk0= X-Google-Smtp-Source: ABdhPJzDrmmibmfkKDuh19KAO32TPcc9bRWppBfGZpbGQLPReC7oKR6WowsDOBkc7jXKbk8r/4vzCiiWjb3Pk6MWjMk= X-Received: by 2002:a4a:ba82:: with SMTP id d2mr1518919oop.43.1602827888829; Thu, 15 Oct 2020 22:58:08 -0700 (PDT) In-Reply-To: <87blh2u5zp.fsf@gnus.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::c2d; envelope-from=theophilusx@gmail.com; helo=mail-oo1-xc2d.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:257773 Archived-At: --000000000000f3296e05b1c37217 Content-Type: text/plain; charset="UTF-8" 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 wrote: > "T.V Raman" 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 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 --000000000000f3296e05b1c37217 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I agree. Adding spaces for span elements=C2=A0will change = the semantics and likely affect other rendering in a negative way. For exam= ple, 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 fire= fox add spaces and will just run the text into the previous/next word if th= ere is no space around the tag.=C2=A0

Having said that, = I notice when looking at the example page you posted, there is no text runn= ing 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.=C2=A0= At any rate, perhaps the issue is not that span elements should have space= s added, but that eww/shr is not able to add the CSS style which adds the s= pacing to the span content?

On Fri, 16 Oct 2020 at 15:54, Lars Ingebri= gtsen <larsi@gnus.org> wrote:
"T.V Raman&q= uot; <raman@google= .com> writes:

> But the user visible breakage is that things get run together and the<= br> > 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.)
=C2=A0 =C2=A0bloggy blog: http://lars.ingebrigtsen.no



--
regards,

Tim

--
Tim Cross

--000000000000f3296e05b1c37217--