Skip to content

fix: style the baseline grid toggle on standalone examples - #5836

Open
samuelmbabhazi wants to merge 1 commit into
canonical:mainfrom
samuelmbabhazi:fix/standalone-baseline-toggle
Open

fix: style the baseline grid toggle on standalone examples#5836
samuelmbabhazi wants to merge 1 commit into
canonical:mainfrom
samuelmbabhazi:fix/standalone-baseline-toggle

Conversation

@samuelmbabhazi

Copy link
Copy Markdown

Done

  • Compile the switch styles into the standalone examples stylesheet, following the triage suggestion to include them the same way as the theme switch segmented control, so the baseline grid toggle renders as a proper switch
  • Make the switch pattern's disabled-state @extend optional, so the pattern also compiles in contexts that do not compile the base form styles alongside; the missing %vf-disabled-element placeholder is what failed CI on the previous attempt (Fix baseline grid toggle styling on standalone examples #5684)
  • Bump version to 4.59.1

Fixes #5286

QA

  • Open a standalone example that does not import the switch on its own, for example /docs/examples/standalone/patterns/buttons/combined?theme=light
  • Verify the "Toggle baseline grid" control at the bottom renders as a styled switch instead of a bare checkbox, and still toggles the baseline grid
  • Verify a standalone example that does import the switch styles is unchanged
  • The compiled library CSS is unaffected: after a full yarn build-scss, build/css/docs/example.css is the only output file whose content changes. Every build that compiles the base form styles still defines the placeholder, so the extend behaves exactly as before there

Check if PR is ready for release

  • Bug 🐛 label (I cannot set labels on this repository)
  • Version bumped to 4.59.1: bugfix only, no CSS class or macro API changes
  • No component class name or macro changes, so no releases.yml entry needed

The switch styles were not compiled into the standalone examples
stylesheet, so the toggle rendered as a bare checkbox. The switch
pattern's disabled-state extend now tolerates contexts that do not
compile the base form styles alongside, which is what broke the
previous attempt, and the compiled library CSS is unchanged.
@webteam-app

Copy link
Copy Markdown

samuelmbabhazi is not a collaborator of the repo

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Baseline grid toggle is unstyled on standalone examples

2 participants