Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 1.04 KB

prefer-unified-property-style.md

File metadata and controls

44 lines (30 loc) · 1.04 KB

prefer-unified-property-style

Discourage mixing atomic and composite forms of the same property in a style declaration. Atomic styles give more consistent results.

📋 This rule is enabled in plugin:@pandacss/all.

Rule details

❌ Examples of incorrect code:

import { css } from './panda/css';

const styles = css({ margin:"2", marginLeft: "5" });
import { Circle } from './panda/jsx';

function App(){
  return <Circle border="solid 1px" borderColor="gray.800" />;
}

✔️ Examples of correct code:

import { css } from './panda/css';

const styles = css({ marginTop: "2", marginRight: "2", marginBottom: "2", marginLeft: "5" });
import { Circle } from './panda/jsx';

function App(){
  return <Circle borderStyle="solid" borderColor="gray.900" borderWidth="1px" />;
}

Resources