Wrapping numbers in the span and changing direction did not have any effect, as shown in this script: https://jsfiddle.net/shaansingh/kLpa8ygv/ .
However, the OP found that by adding inline-block and recording in-flight, the solution worked. Just adding it to this answer so that it can be as resourceful as possible. Please check OP comments and answers for full details.
direction: ltr; display: inline-block;
You can always resort to a little JavaScript to fix this problem. Use this script to determine if the body is rtl and is modified accordingly (assuming ltr is the default value in HTML):
var element = document.body, style = window.getComputedStyle(element), direction = style.getPropertyValue('direction'); if (direction == "rtl") { document.getElementById("neg").innerHTML = "1-"; }
The full code is in this script: https://jsfiddle.net/shaansingh/axpevvon/4/
source share