Change default text direction in URL bar

Talk about add-ons and extension development.
Post Reply
Yaron10
Posts: 472
Joined: July 5th, 2011, 6:32 am

Change default text direction in URL bar

Post by Yaron10 »

In earlier Firefox versions I was able to change the default text direction in the URL bar (from right to left, in FF RTL locals) by modifying the following code in chrome\toolkit\res\forms.css:

Code: Select all

@-moz-document url-prefix(chrome://) {
  input.uri-element-right-align:-moz-locale-dir(rtl) {
    direction: ltr !important;
    text-align: right !important;
  }

  Make sure that the location bar's alignment in RTL mode changes according
     to the input box direction if the user switches the text direction using
     cmd_switchTextDirection (which applies a dir attribute to the <input>).
  input.uri-element-right-align[dir=ltr]:-moz-locale-dir(rtl) {
    text-align: left !important;
  }
}
Could anyone please refer me to the relevant code in Firefox 64?
I'd appreciate your help.
Yaron10
Posts: 472
Joined: July 5th, 2011, 6:32 am

Re: Change default text direction in URL bar

Post by Yaron10 »

The relevant code is in chrome\browser\content\browser\browser.css.

Code: Select all

/* Display URLs left-to-right but right aligned in RTL mode. */
html|input.urlbar-input:-moz-locale-dir(rtl) {
  direction: ltr !important;
  text-align: right !important;
}

/* Make sure that the location bar's alignment in RTL mode changes according
   to the input box direction if the user switches the text direction using
   cmd_switchTextDirection (which applies a dir attribute to the <input>). */
html|input.urlbar-input[dir=ltr]:-moz-locale-dir(rtl) {
  text-align: left !important;
}
Post Reply