@@ -20,17 +20,25 @@ $ns: bp6;
2020// Alias for BP users outside this repo
2121$bp-ns : $ns ;
2222
23- // easily the most important variable, so it comes up top
24- // (so other variables can use it to define themselves)
23+ // Legacy 10px-based grid size variable, kept for backward compatibility.
24+ // New spacing values should use $pt-spacing instead (multiply by 2.5 to convert).
25+ // This variable will eventually be deprecated in favor of the 4px-based system.
2526$pt-grid-size : 10px !default ;
2627
28+ // Primary spacing unit for Blueprint's 4px-based spacing system.
29+ // This is the most important spacing variable, so it comes up early
30+ // (so other variables can use it to define themselves).
31+ // This replaces $pt-grid-size as the foundation for consistent spacing throughout components.
32+ // Use multiples of this value for all margins, padding, and sizing calculations.
33+ $pt-spacing : 4px !default ;
34+
2735// Icon variables
2836
2937$icons16-family : " blueprint-icons-16" !default ;
3038$icons20-family : " blueprint-icons-20" !default ;
3139
32- $pt-icon-size-standard : 16 px !default ;
33- $pt-icon-size-large : 20 px !default ;
40+ $pt-icon-size-standard : $pt-spacing * 4 !default ;
41+ $pt-icon-size-large : $pt-spacing * 5 !default ;
3442
3543// Typography
3644
@@ -51,32 +59,32 @@ $pt-font-family:
5159
5260$pt-font-family-monospace : monospace !default ;
5361
54- $pt-font-size : $pt-grid-size * 1.4 !default ;
55- $pt-font-size-large : $pt-grid-size * 1.6 !default ;
56- $pt-font-size-small : $pt-grid-size * 1.2 !default ;
62+ $pt-font-size : $pt-spacing * 3.5 !default ;
63+ $pt-font-size-large : $pt-spacing * 4 !default ;
64+ $pt-font-size-small : $pt-spacing * 3 !default ;
5765
5866// a little bit extra to ensure the height comes out to just over 18px (and browser rounds to 18px)
59- // equivalent to: math.div($pt-grid-size * 1.8 , $pt-font-size) + 0.0001
67+ // equivalent to: math.div($pt-spacing * 4.5 , $pt-font-size) + 0.0001
6068$pt-line-height : 1.28581 !default ;
6169
6270// Grids & dimensions
6371
64- // equivalent to: floor(math.div( $pt-grid-size, 5))
72+ // equivalent to: $pt-spacing * 0.5
6573$pt-border-radius : 2px !default ;
6674
6775// Buttons
68- $pt-button-height : $pt-grid-size * 3 !default ;
69- $pt-button-height-small : $pt-grid-size * 2.4 !default ;
70- $pt-button-height-smaller : $pt-grid-size * 2 !default ;
71- $pt-button-height-large : $pt-grid-size * 4 !default ;
76+ $pt-button-height : $pt-spacing * 7.5 !default ;
77+ $pt-button-height-small : $pt-spacing * 6 !default ;
78+ $pt-button-height-smaller : $pt-spacing * 5 !default ;
79+ $pt-button-height-large : $pt-spacing * 10 !default ;
7280
7381// Inputs
74- $pt-input-height : $pt-grid-size * 3 !default ;
75- $pt-input-height-large : $pt-grid-size * 4 !default ;
76- $pt-input-height-small : $pt-grid-size * 2.4 !default ;
82+ $pt-input-height : $pt-spacing * 7.5 !default ;
83+ $pt-input-height-large : $pt-spacing * 10 !default ;
84+ $pt-input-height-small : $pt-spacing * 6 !default ;
7785
7886// Others
79- $pt-navbar-height : $pt-grid-size * 5 !default ;
87+ $pt-navbar-height : $pt-spacing * 12. 5 !default ;
8088
8189// Z-indices
8290$pt-z-index-base : 0 !default ;
0 commit comments