Skip to content

AI-native design editor. Open-source Figma alternative.

1.0 KB
Raw Blame
/**
 * Element styles a native `<button>` adds, cleared so the design's own styles show. Preview
 * and generated components render control roots and triggers as buttons for their semantics.
 */
export const BUTTON_RESET: Record<string, string> = {
  border: 'none',
  padding: '0',
  margin: '0',
  background: 'none',
  font: 'inherit',
  color: 'inherit',
  'text-align': 'inherit',
  cursor: 'pointer'
}

/**
 * Element styles the heading around an accordion trigger adds, cleared so the trigger lays
 * out as designed while the heading keeps its level.
 */
export const HEADING_RESET: Record<string, string> = {
  margin: '0',
  font: 'inherit'
}

/**
 * Element styles an input or textarea adds, cleared so the field's text layer it replaces
 * keeps its look. Preview and generated components both draw a field's text as one.
 */
export const INPUT_RESET: Record<string, string> = {
  border: 'none',
  outline: 'none',
  padding: '0',
  margin: '0',
  background: 'transparent',
  resize: 'none',
  'box-sizing': 'border-box'
}