You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Phase 5 (styling) of the swc-menu-separator migration. Stacked on #6888 (Phase 4) and targets the menu-separator-migration feature branch, so the diff includes earlier phases until they merge.
Ports the .spectrum-Menu-divider rule from Spectrum CSS (spectrum-two) to menu-separator.css: block margin centering the line in the 12px menu-item-section-divider-height container, inline margin from base-padding-horizontal-medium, gray-200 fill, and forced-colors support (CanvasText).
The separator does not set its own thickness. It reads the inherited --swc-menu-separator-thickness, which swc-menu sets to divider-thickness-medium (2px) on ::slotted(swc-menu-separator), along with padding: 0. A separator outside a menu renders a 0px line.
No public --swc-* custom properties are exposed (B4), so no @cssprop JSDoc.
Adds a minimal stories file (Playground, Overview, Anatomy; no autodocs tag, since Phase 7 adds an MDX page) for visual verification. Accessibility story and docs prose are deferred to Phase 7.
Ticks the Styling checklist in the migration plan.
Open items
Q3: the container height depends on a spacing token update (5px to 7px) that no published @adobe/spectrum-tokens version has. It uses 12px until then.
Contrast (1.4.11) of gray-200 against the menu surface is not yet verified and stays unticked.
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
If the changes are expected, update the current_golden_images_cache hash in the circleci config to accept the new images. Instructions are included in that file.
If the changes are unexpected, you can investigate the cause of the differences and update the code accordingly.
Two questions on the CSS. (1) Spectrum CSS uses menu-item-label-inline-edge-to-content for margin-inline. That token doesn't exist in tokens.css, so I substituted base-padding-horizontal-medium. Please confirm with design that this gives the same inset as the menu item label edge, or record it as an intentional divergence in the plan. (2) The 12px container height is a placeholder for Q3 (spacing token update pending). The block margin is computed from it, so the line position will change when the token changes. The plan's Styling section should list it as a known drift risk. (Update: thickness is now supplied by swc-menu, so the earlier thickness concern no longer applies.)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Phase 5 (styling) of the
swc-menu-separatormigration. Stacked on #6888 (Phase 4) and targets themenu-separator-migrationfeature branch, so the diff includes earlier phases until they merge..spectrum-Menu-dividerrule from Spectrum CSS (spectrum-two) tomenu-separator.css: block margin centering the line in the 12pxmenu-item-section-divider-heightcontainer, inline margin frombase-padding-horizontal-medium,gray-200fill, and forced-colors support (CanvasText).--swc-menu-separator-thickness, whichswc-menusets todivider-thickness-medium(2px) on::slotted(swc-menu-separator), along withpadding: 0. A separator outside a menu renders a 0px line.--swc-*custom properties are exposed (B4), so no@csspropJSDoc.autodocstag, since Phase 7 adds an MDX page) for visual verification. Accessibility story and docs prose are deferred to Phase 7.Open items
@adobe/spectrum-tokensversion has. It uses 12px until then.gray-200against the menu surface is not yet verified and stays unticked.Validation
npx stylelintonmenu-separator.css: passednpx eslint gen2/packages/swc/components/menu-separator: passednpx prettier --checkon the component and plan docs: passedyarn workspace @spectrum-web-components/gen2 build: passed