Skip to content

Add an independent Rail Gap control for Sidecar anatomy #200

Description

@georgeolaru

Problem

The distance between Sidecar content and adjacent rails is currently coupled to the global rhythm:

--nb-sidecar-gap: calc(var(--nb-spacing) * 2);

On the Single Post editorial composition this resolves to 56.5px in the 1090px Site Editor canvas and 70px at a 1720px frontend viewport. Rail Scale, Rail Base, and Rail Pitch change rail widths, while Spacing Level changes the entire site rhythm. There is no way to tune only the content-to-rail relationship.

Using Spacing Level for this correction is too broad and encourages destructive extremes such as level 0. Reusing Content Inset would also conflate reading measure with rail gutter.

Proposed contract

Style Manager owns a new global sm_rail_gap multiplier in Layout, located after the rail width controls. Nova Blocks consumes it with the current value as the compatibility fallback:

--nb-sidecar-gap: calc(var(--nb-spacing) * var(--sm-rail-gap, 2));

Suggested range: 1 to 2.5, step 0.25, default 2.

Suggested semantic landmarks:

  • Tight: 1
  • Balanced: 1.5
  • Open: 2, current rendering
  • Airy: 2.5

The initial implementation is site-wide. A Sidecar-level Inherit / Tight / Balanced / Open override should be deferred until recurring editorial evidence justifies it.

Acceptance criteria

  • Existing sites with no saved value remain visually identical at multiplier 2.
  • Layout exposes Rail Gap separately from Spacing Level and rail width controls.
  • Changing Rail Gap updates the Site Editor preview live.
  • The emitted --sm-rail-gap token is available on the frontend.
  • Nova Blocks uses the token for left and right Sidecar gutters.
  • Changing Rail Gap does not mutate sm_spacing_level, content inset, or rail width tokens.
  • The behavior has focused contract tests in Style Manager and Nova Blocks.
  • The Single Post Studio composition can select Balanced, about 42px in the current editor canvas, without changing global rhythm.

Implementation ownership

  • pixelgrade/style-manager: setting, UI, CSS token, live preview and contract test.
  • pixelgrade/nova-blocks: consume the token with fallback 2 and add the CSS contract test.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions