Spacing

Master visual balance with Luxa CSS's fluid spacing system. Perfectly balanced for any screen size.

Luxa CSS employs a fluid spacing system that dynamically adjusts to viewport width, ensuring visual balance across all screen sizes.

Fluid spacing scale

The spacing system uses the CSS clamp() function to create a fluid scale:

VariableMin (px)CalculationMax (px)
--space-011211.33px + 0.2083vw14
--space-021817px + 0.3125vw21
--space-032422.67px + 0.4167vw28
--space-043634px + 0.625vw42
--space-054845.33px + 0.8333vw56
--space-067268px + 1.25vw84

Usage

  • Use these spacing variables for margins, padding, and other layout properties;
  • Combine with the Typography system for consistent scaling throughout your design.

Benefits

  • Eliminates the need for multiple breakpoints;
  • Ensures consistent visual rhythm across devices;
  • Simplifies responsive design implementation.

By leveraging this fluid spacing system, you can create layouts that automatically adjust to various screen sizes while maintaining visual balance and proportions.