Skip to content

Latest commit

 

History

History
60 lines (42 loc) · 1.14 KB

prefer-shorthand-properties.md

File metadata and controls

60 lines (42 loc) · 1.14 KB

prefer-shorthand-properties

Discourage the use of longhand properties and promote the preference for shorthand properties in the codebase.

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

Rule details

❌ Examples of incorrect code:

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

const styles = css({ marginLeft: '4' });
import { css } from './panda/css';

function App(){
  return <div className={css({ background: 'red.100' })} />;
};
import { Circle } from './panda/jsx';

function App(){
  return <Circle _hover={{  position: 'absolute' }} />;
}

✔️ Examples of correct code:

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

const styles = css({ ml: '4' });
import { css } from './panda/css';

function App(){
  return <div className={css({ bg: 'red.100' })} />;
};
import { Circle } from './panda/jsx';

function App(){
  return <Circle _hover={{  pos: 'absolute' }} />;
}

Resources