Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 641 Bytes

use-logical-properties.md

File metadata and controls

33 lines (23 loc) · 641 Bytes

use-logical-properties

Rule Details

This rule aims to suggest logical CSS properties instead of physical CSS properties to improve support of other layouts (LTR/RTL, …).

Examples of incorrect code for this rule:

const styles = sx.create({
  incorrectBorder: {
    borderBottom: 'solid',
  },
});

Examples of correct code for this rule:

const styles = sx.create({
  correctBorder: {
    borderBlockEnd: 'solid',
  },
});

Options

none

When Not To Use It

Do not use this rule if you don't want to support RTL (and other) layouts or when you are concerned about supporting older browsers.