Urgent.News

What's breaking now, across thousands of outlets.

Tech

Stop Making Developers Guess Which Icons to Mirror in RTL

Direction is part of an icon’s behavior. In right-to-left interfaces, some icons should mirror. Others should not. A back arrow usually changes direction. A checkmark does not. A reply icon may be directional. A clock should normally remain unchanged. A brand logo definitely should not be mirrored just because the interface is RTL. The problem is that this knowledge often lives in documentation,…

An icon's behavior includes whether or not it should flip directionally in right-to-left (RTL) interfaces. Some icons, like a back arrow, need to mirror, while others, like a checkmark, should not. This directional behavior should be an inherent part of the icon system, not something developers have to manually decide each time.

Currently, developers often find themselves guessing which icons should mirror in RTL interfaces. This leads to inconsistencies across the application, with some icons mirroring while others do not. To solve this problem, an icon catalog can store metadata about each icon, including whether it is direction-sensitive and should mirror in RTL.

By encoding this behavior directly into the icon, developers no longer need to guess or write redundant code for RTL support. This approach centralizes the decision-making process within the icon system itself. For example, an icon catalog could contain multiple properties such as name, geometry, accessibility role, categories, aliases, and directional behavior.

When an icon is used within a component, the system can handle the RTL logic centrally, eliminating the need for repeated conditional rendering. This approach is more robust than relying on developers' memory or design system documentation. By storing the directional behavior alongside the icon asset, it ensures consistent RTL behavior across various outputs like SVG files, React components, Vue components, and even desktop applications. This change makes RTL support an integral part of the icon system, rather than an afterthought.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

I Built a Tamagotchi for Developers — It Lives in VS Code and Judges Your Work Ethic

I have a problem: I will happily grind 40 hours in a game for a meaningless achievement, but ask me to stay focused through one afternoon of debugging and my brain files for divorce.

  • Developer created VS Code extension called DevGotchi
  • Avatar in side panel with Focus, Motivation, Energy, Health stats
  • Stats decay in real-time, XP earned by saving, committing, fixing bugs

Why SSH Key Authentication Beats Password Authentication — What Is Actually Being Proven

"Use key-based auth instead of a password" is common advice for connecting to a server over SSH. But what exactly does key authentication prove, and how does that differ from what a password proves?

  • Password authentication transmits secret directly, vulnerable to attacks
  • Public-key authentication proves possession of key through signature
  • Public-key authentication safe for server leaks due to public key

More from Thursday 24 September →