all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pmg-devel] [PATCH pmg-gui] objects: use font-weight for bold text
@ 2024-02-22 14:29 Dominik Csapak
  2024-02-22 14:51 ` [pmg-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 3+ messages in thread
From: Dominik Csapak @ 2024-02-22 14:29 UTC (permalink / raw)
  To: pmg-devel

mdn[0] recommends using `font-weight: bold;` for making the text actually bold
While it has the same effect often, it depends on the font and browser
if the font is rendered bold in a <b> tag.

0: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/b

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 js/ObjectGroup.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/js/ObjectGroup.js b/js/ObjectGroup.js
index d72d47c..8c72dd2 100644
--- a/js/ObjectGroup.js
+++ b/js/ObjectGroup.js
@@ -43,7 +43,7 @@ Ext.define('PMG.ObjectGroup', {
 	    me.down('#modeBox').setHidden(true);
 	    me.down('#whatWarning').setHidden(true);
 	} else {
-	    let html = '<b>' + Ext.String.htmlEncode(me.ogdata.name) + '</b>';
+	    let html = '<b style="font-weight: bold;">' + Ext.String.htmlEncode(me.ogdata.name) + '</b>';
 	    html += "<br><br>";
 	    html += Ext.String.htmlEncode(Ext.String.trim(me.ogdata.info));
 
@@ -245,7 +245,7 @@ Ext.define('PMG.ObjectGroup', {
 		    items: [
 			{
 			    xtype: 'box',
-			    html: `<b>${gettext("Match if")}</b>`,
+			    html: `<b style="font-weight: bold;">${gettext("Match if")}</b>`,
 			},
 			{
 			    xtype: 'pmgMatchModeSelector',
-- 
2.30.2





^ permalink raw reply	[flat|nested] 3+ messages in thread

* [pmg-devel] applied: [PATCH pmg-gui] objects: use font-weight for bold text
  2024-02-22 14:29 [pmg-devel] [PATCH pmg-gui] objects: use font-weight for bold text Dominik Csapak
@ 2024-02-22 14:51 ` Thomas Lamprecht
  2024-02-22 16:36   ` Stefan Sterz
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Lamprecht @ 2024-02-22 14:51 UTC (permalink / raw)
  To: Dominik Csapak, pmg-devel

Am 22/02/2024 um 15:29 schrieb Dominik Csapak:
> mdn[0] recommends using `font-weight: bold;` for making the text actually bold
> While it has the same effect often, it depends on the font and browser
> if the font is rendered bold in a <b> tag.
> 
> 0: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/b
> 
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
>  js/ObjectGroup.js | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
>

applied, thanks!

FWIW, one general option might also be to add CSS setting the font-weight to
the <b> tag in general, but not sure what would break with that..




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [pmg-devel] applied: [PATCH pmg-gui] objects: use font-weight for bold text
  2024-02-22 14:51 ` [pmg-devel] applied: " Thomas Lamprecht
@ 2024-02-22 16:36   ` Stefan Sterz
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Sterz @ 2024-02-22 16:36 UTC (permalink / raw)
  To: Thomas Lamprecht, Dominik Csapak, pmg-devel

On Thu Feb 22, 2024 at 3:51 PM CET, Thomas Lamprecht wrote:
> Am 22/02/2024 um 15:29 schrieb Dominik Csapak:
> > mdn[0] recommends using `font-weight: bold;` for making the text actually bold
> > While it has the same effect often, it depends on the font and browser
> > if the font is rendered bold in a <b> tag.
> >
> > 0: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/b
> >
> > Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> > ---
> >  js/ObjectGroup.js | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> >
>
> applied, thanks!
>
> FWIW, one general option might also be to add CSS setting the font-weight to
> the <b> tag in general, but not sure what would break with that..
>

just to add my two cents to this: generally it would be nice to avoid
inline css imo. maybe we could also add a css class to the element that
has some semantic meaning and use that to style the element. as is
recommendet by mdn:

> It is a good practice to use the class attribute on the <b> element in
> order to convey additional semantic information as needed (for example
> <b class="lead"> for the first sentence in a paragraph).
>
> - [0]

alternatively, we could use the more semanticaly meaninful `<strong>`[1]
element and define that as bold (which is the default, but the
recommendation is to make that explicit there too). this would imply a
"strong importance".

[1]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/strong

>
> _______________________________________________
> pmg-devel mailing list
> pmg-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-02-22 16:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-22 14:29 [pmg-devel] [PATCH pmg-gui] objects: use font-weight for bold text Dominik Csapak
2024-02-22 14:51 ` [pmg-devel] applied: " Thomas Lamprecht
2024-02-22 16:36   ` Stefan Sterz

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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal