mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-25 20:14:31 +01:00
fw sync: L-324 Creative page spacing back to upstream's default (section gap, roomy margin, rail side); the port's inset spacing is left for the opt-in variant (fwg-optin), whose trial a_page_fitted_to_the_width_keeps_the_theme_side_margin must opt in
This commit is contained in:
1 file changed
+8
-12
@@ -92,18 +92,14 @@ impl Component for PageMetrics {
|
||||
fn style(cx: &StyleCx<'_>, _: PageMetricsStyleKey) -> PageMetricsStyle {
|
||||
let tokens = cx.tokens;
|
||||
match cx.set() {
|
||||
// The creative set's spacing is the theme's page insets.
|
||||
ComponentSet::Creative => {
|
||||
let inset = tokens.space.inset;
|
||||
PageMetricsStyle {
|
||||
metrics: Metrics::new(),
|
||||
gap: inset.page_gap,
|
||||
margin: inset.page_margin,
|
||||
side: inset.page_side,
|
||||
white_space_pad: tokens.space.gap.inline,
|
||||
seam: tokens.stroke.thin,
|
||||
}
|
||||
}
|
||||
ComponentSet::Creative => PageMetricsStyle {
|
||||
metrics: Metrics::new(),
|
||||
gap: tokens.space.gap.section,
|
||||
margin: tokens.space.pad.roomy,
|
||||
side: tokens.size.rail.width,
|
||||
white_space_pad: tokens.space.gap.inline,
|
||||
seam: tokens.stroke.thin,
|
||||
},
|
||||
ComponentSet::Productivity => {
|
||||
let gap = tokens.space.gap.section * PRODUCTIVITY_GAP_RATIO;
|
||||
PageMetricsStyle {
|
||||
|
||||
Reference in new issue
Block a user