RTL Logical Layout Flip Check

Audit observed RTL physical margins vs independently matched LTR left/right flip, unlike existing logical-side conversion; vertical-writing and direction-insensitive authored rules external. Explicit supplied computed/layout context only; not a browser cascade/layout engine or cross-browser guarantee.

Description

A horizontal-writing RTL comparison can swap the expected physical left and right margins.

A horizontal-writing RTL comparison can swap the expected physical left and right margins.1

That restricted comparison does not resolve every logical property or writing mode. Use RTL Logical Layout Flip Check to evaluate the supplied inputs under the specific model below.

When to use RTL Logical Layout Flip Check

Use RTL Logical Layout Flip Check to evaluate the supplied inputs under the specific model below. Define the supplied layout, token or rendering scenario and establish the relevant units and browser context independently.

How to use RTL Logical Layout Flip Check and understand its results

  1. Define the supplied layout, token or rendering scenario and establish the relevant units and browser context independently.
  2. Enter Caller ltr physical margins px, Observed rtl physical margins px using the field table and validation rules below, then run the tool.
  3. Read Signed rtl flip residuals px and interpret units, signs, ordering and placeholders as explained below.
  4. If the tool reports an input error, correct that field and rerun. A successful false result, empty match list or unknown-evidence placeholder has the specific meaning described here; check the limitations before applying the result.
Input fieldMeaningValue typeRequirement
callerLtrPhysicalMarginsPxCaller ltr physical margins pxarray of numberRequired; constraints below
observedRtlPhysicalMarginsPxObserved rtl physical margins pxarray of numberRequired; constraints below

Enter two four-number physical top/right/bottom/left arrays, in px. Form the horizontal RTL expectation [top,left,bottom,right] from the LTR array and return observed RTL minus that expectation component by component. Signed inputs and residuals are allowed; this does not parse logical CSS properties or handle a vertical-writing axis change.

expectedRTL = [T,L,B,R]; residual = observedRTL−expectedRTL

Field order, units and branch conditions follow the implementation explanation above.

Output fieldMeaningValue type
signedRtlFlipResidualsPxSigned rtl flip residuals pxarray of number
json
{
  "input": {
    "callerLtrPhysicalMarginsPx": [
      1,
      2,
      3,
      4
    ],
    "observedRtlPhysicalMarginsPx": [
      1,
      4,
      3,
      2
    ]
  },
  "output": {
    "signedRtlFlipResidualsPx": [
      0,
      0,
      0,
      0
    ]
  }
}

Limitations and assumptions

That restricted comparison does not resolve every logical property or writing mode. Apply the exact scope and assumptions described above.

All listed fields require explicit values. Unexpected fields, incorrect types, nonfinite numbers and sparse arrays fail validation. Domain-specific bounds, alignments and supported tokens are stated above; extremely large inputs or outputs can also be rejected. These errors differ from successful results such as false, no matches or unknown evidence.

Alternative or Complementary methods

Use writing-mode vertical-rl Orientation Lookup for a related task: Writing mode separates inline progression from block progression.

Use text-align:justify Last-Line Behavior for a related task: Last-line alignment can differ from the justification of preceding lines.

References

  1. RTL Logical Layout Flip Check — tool.io

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies