Change direction of negative number with combination of LTR and RTL content
Since your screenshot has the "-2" in a different span
element you could is the unicode-bidi
option on that specific span:
div{
direction: rtl;
}
span{
direction: ltr;
unicode-bidi: bidi-override;
}
<div>
امروز
<span>-2</span>
</div>
How to properly display RTL text followed by number in svg text element for Chrome/Firefox/IE/Edge?
Add dir
attribute and add "rtl" as value in text element inside SVG to show RTL text in IE/Edge.
Check link for updated code:
https://jsfiddle.net/ru7xzydv/3/
Angular's UI-Grid in RTL Mode displays data in wrong order opposite to the order of columnDefs
Apparently, had to explicitly assign the dir="rtl" to the ui-grid inside the element, i think the *{direction=rtl;} in _Layout.cshtml was overriden bu ui-grid css.
When line of text starts with a number, a number shows up on right in RTL mode. Why?
The dir
attribute sets the directionality of directionally neutral text, as well as overall layout direction (e.g., the layout order of table columns). Latin letters are not directionally neutral; they have strong left-to-right directionality.
The content 5 little ducks went out to play.
consists of three parts, as far as directionality is considered: the character 5
, the string of Latin letters with spaces, and the character .
. When right-to-left directionality is applied to this, you get these parts in order, from right to left.
When you replace 5
by 5a
, the directionally neutral 5
gets governed by the left-to-right characeter a
, so the string 5a
is treated as belonging to the sequence of left-to-right characters.
When you have The 5 little
, the neutral 5
again gets joined into the left-to-right gang, because it is between two strongly left-to-right strings.
This is all described in Unicode BiDi rules.
When you set unicode-bidi: bidi-override
in CSS or, equivalently, use the <bdo>
element in HTML, you override the entire Unicode BiDi algorithm. All of the inherent directionality associated with letters gets ignored. Characters are laid out strictly left to right or right to left, no matter what.
Locales and encodings have nothing to do with this.
The moral is that you should normally set directionality only for texts that are conventionally written right to left, such as Hebrew, Arabic, or Persian. If you use directionality just for casual layout purposes, take care; it may bite you. And if you have mixed left-to-right or right-to-left texts, use embedding (unicode-bidi: embed
) rather than brute-force directionality override.
Related Topics
Shared Styles Across Components in an Angular 2 App
My Custom Font Doesn't Want to Work in Internet Explorer
Bigger Fonts on Smaller Screens Without @Media Queries or JavaScript
Control CSS Variable from Angular 5
How to Change My Background on Scroll Using CSS
CSS Page Headers - How to Use Print Margins
H1 Tag and P Tag on the Same Line
Unwanted Outline on Border When Parent Is Transformed
Consistent Origin in CSS Rotation Between IE8 and Everything Else
Enable Background When Open Bootstrap Modal Popup
How to Get Only One Rounded Corner with Border-Radius Htc Hack and Msie V:Roundrect
Bootstrap Navbar Collapse Media-Query on Custom Width
@Font Face Choppy Font in Chrome
Css: Rotate Image and Align Top Left
How to Make a Fluid Sticky Footer
Center Align Position Absolute Object Horizontally