* [yew-devel] [RFC PATCH yew-widget-toolkit-assets] flip font-awesome icons for rtl text direction
@ 2025-09-23 13:11 Dominik Csapak
2025-09-23 14:34 ` Dietmar Maurer
2025-09-23 14:58 ` Shannon Sterz
0 siblings, 2 replies; 3+ messages in thread
From: Dominik Csapak @ 2025-09-23 13:11 UTC (permalink / raw)
To: yew-devel
when using a language that sets the text direction to RTL, font-awesome
icons that have left or right in the name are pointing in the wrong
direction, so flip them.
This happens for example in menus, back button of the material app,
list tiles where icons like 'chevron-right' are used, etc.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
sending as rfc because i'm not sure this is the right approach.
alternatively we could create our own classes for every font-awesome
class that ends with -left/-right and call them -start/-end and
have only them flip in a rtl setting
Advantage would be that users could still use the 'left' and 'right'
variants if they need/want them.
scss/_miscellaneous.scss | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/scss/_miscellaneous.scss b/scss/_miscellaneous.scss
index c0dfafe..05dfd61 100644
--- a/scss/_miscellaneous.scss
+++ b/scss/_miscellaneous.scss
@@ -156,3 +156,11 @@ a:focus-within, a:hover {
.pwt-pointer {
cursor: pointer;
}
+
+/* rtl inversions of icons */
+.fa[class*="-left"],
+.fa[class*="-right"] {
+ &:dir(rtl) {
+ transform: scaleX(-1);
+ }
+}
--
2.47.3
_______________________________________________
yew-devel mailing list
yew-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/yew-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [yew-devel] [RFC PATCH yew-widget-toolkit-assets] flip font-awesome icons for rtl text direction
2025-09-23 13:11 [yew-devel] [RFC PATCH yew-widget-toolkit-assets] flip font-awesome icons for rtl text direction Dominik Csapak
@ 2025-09-23 14:34 ` Dietmar Maurer
2025-09-23 14:58 ` Shannon Sterz
1 sibling, 0 replies; 3+ messages in thread
From: Dietmar Maurer @ 2025-09-23 14:34 UTC (permalink / raw)
To: Yew framework devel list at Proxmox
[-- Attachment #1.1: Type: text/plain, Size: 86 bytes --]
too generic for me...
(Even in those rtl countries, left is left, and right is right)
[-- Attachment #1.2: Type: text/html, Size: 727 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
yew-devel mailing list
yew-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/yew-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [yew-devel] [RFC PATCH yew-widget-toolkit-assets] flip font-awesome icons for rtl text direction
2025-09-23 13:11 [yew-devel] [RFC PATCH yew-widget-toolkit-assets] flip font-awesome icons for rtl text direction Dominik Csapak
2025-09-23 14:34 ` Dietmar Maurer
@ 2025-09-23 14:58 ` Shannon Sterz
1 sibling, 0 replies; 3+ messages in thread
From: Shannon Sterz @ 2025-09-23 14:58 UTC (permalink / raw)
To: Yew framework devel list at Proxmox; +Cc: yew-devel
On Tue Sep 23, 2025 at 3:11 PM CEST, Dominik Csapak wrote:
> when using a language that sets the text direction to RTL, font-awesome
> icons that have left or right in the name are pointing in the wrong
> direction, so flip them.
>
> This happens for example in menus, back button of the material app,
> list tiles where icons like 'chevron-right' are used, etc.
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> sending as rfc because i'm not sure this is the right approach.
>
> alternatively we could create our own classes for every font-awesome
> class that ends with -left/-right and call them -start/-end and
> have only them flip in a rtl setting
>
> Advantage would be that users could still use the 'left' and 'right'
> variants if they need/want them.
i think i'd be in favor of this. there are already some approaches like
that out there [1]. it's clearer and sometime we may want an arrow to
always point left (or right) as pointed out by dietmar.
[1]: https://github.com/fisharebest/font-awesome-rtl/blob/master/font-awesome-rtl.css
> scss/_miscellaneous.scss | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/scss/_miscellaneous.scss b/scss/_miscellaneous.scss
> index c0dfafe..05dfd61 100644
> --- a/scss/_miscellaneous.scss
> +++ b/scss/_miscellaneous.scss
> @@ -156,3 +156,11 @@ a:focus-within, a:hover {
> .pwt-pointer {
> cursor: pointer;
> }
> +
> +/* rtl inversions of icons */
> +.fa[class*="-left"],
> +.fa[class*="-right"] {
> + &:dir(rtl) {
> + transform: scaleX(-1);
> + }
> +}
_______________________________________________
yew-devel mailing list
yew-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/yew-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-09-23 14:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-23 13:11 [yew-devel] [RFC PATCH yew-widget-toolkit-assets] flip font-awesome icons for rtl text direction Dominik Csapak
2025-09-23 14:34 ` Dietmar Maurer
2025-09-23 14:58 ` Shannon Sterz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox