Hasty Briefsbeta

Should CSS be a constraint system instead?

4 days ago
  • #Constraints
  • #CSS
  • #Web Design
  • CSS layout rules are complex and difficult to learn, leading to frustration among developers.
  • Constraint-based systems have been proposed as an alternative to CSS, allowing direct specification of layout relationships.
  • Constraint systems like Cassowary are used in iOS and are popular but can be verbose and unpredictable.
  • Constraint systems often result in under- or over-determined layouts, making them impractical for web design.
  • Implicit rules and optimization criteria in constraint systems can lead to unpredictable and complex behavior.
  • CSS includes built-in design wisdom, such as edge-case handling for text alignment, which improves usability.
  • Layout must account for various factors like screen size, font rendering, and language differences.
  • Newer CSS layout modes like Flexbox and Grid offer more intuitive and predictable solutions compared to older methods.
  • Improving existing systems (like CSS) with better rules and tools is more practical than complete overhauls.
  • The CSS committee's approach of standardizing new, intuitive layout modes is a viable solution.