Getting Started with WiN-CSS
Learn how to build proportionally-scaling responsive layouts with minimal effort.
Read moreCSS Framework
Proportionally-scaling responsive layouts
Mobile-first design where text and spacing scale together.
All classes follow the pattern: {breakpoint}-{property}-{value}
| Feature | Pattern | Values |
|---|---|---|
| Grid columns | {bp}-{n} | 1-12 |
| Font size | {bp}-f-{size} | tiny, small, medium, large, xlarge, huge |
| Padding | {bp}-p-{n} | 0, 5, 10, 15, 20, 25, 30, 40, 50 |
| Padding X/Y | {bp}-px-{n} {bp}-py-{n} | 0, 5, 10, 15, 20, 25, 30, 40, 50 |
| Margin | {bp}-m-{n} | 0, 5, 10, 15, 20, 25, 30, 40, 50 |
| Margin X/Y | {bp}-mx-{n} {bp}-my-{n} | 0, 5, 10, 15, 20, 25, 30, 40, 50 |
| Aspect ratio | {bp}-ar-{ratio} | 1x1, 2x1, 1x2, 3x2, 2x3, 4x3, 3x4, 16x9, 9x16, 21x9 |
| Containers | .row .container | Flex containers with wrapping |
Breakpoints: sm (360px) md (760px) lg (1300px)
Font sizes use viewport width units (vw), so they scale proportionally with the browser window. A heading that takes up 1/3 of the screen width on mobile will still take up 1/3 on tablet.
Padding and margin use em units, which are relative to the current font size. When the font scales up, the spacing scales with it automatically.
When fonts scale with the viewport (vw), and spacing scales with the font (em), everything scales together:
Resize your browser window and watch this card scale proportionally:
This entire card scales proportionally. The heading, body text, and all the padding maintain the same visual ratios at any viewport width.
Try resizing your browser to see the effect.
WiN-CSS uses a mobile-first approach with three breakpoints:
At the lg breakpoint (1300px), two important things happen:
Font sizes stop scaling and lock to fixed pixel values. This prevents text from becoming too large on wide monitors.
The .row container gets max-width: 1300px and centers itself, preventing content from stretching edge-to-edge.
| Class | Behavior | Use Case |
|---|---|---|
| .container | Flex container, no max-width, no auto-centering | Full-width sections, nested grids |
| .row | Flex container, max-width 1300px at lg, auto-centered | Main content wrapper, page sections |
Six font sizes that scale proportionally with the viewport:
Change font sizes at different breakpoints:
A 12-column grid that adapts to breakpoints:
Use padding classes on columns to create gaps:
Spacing uses em units, so it scales with font size. The number represents tenths of an em:
| Suffix | Value |
|---|---|
| -0 | 0em |
| -5 | 0.5em |
| -10 | 1em |
| -15 | 1.5em |
| -20 | 2em |
| -25 | 2.5em |
| -30 | 3em |
| -40 | 4em |
| -50 | 5em |
Visual comparison of padding values:
Control horizontal (x) and vertical (y) spacing independently:
Change spacing at different breakpoints:
Lock elements to specific aspect ratios:
Change aspect ratio at different breakpoints:
A complete article card demonstrating grid, typography, spacing, and aspect ratios:
Resize the browser to see how these cards scale proportionally:
Learn how to build proportionally-scaling responsive layouts with minimal effort.
Read moreUnderstanding how viewport and em units work together for proportional scaling.
Read moreBuild mobile-first layouts that maintain visual harmony across all devices.
Read more