Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shadows / Elevation #63757

Open
3 of 6 tasks
Tracked by #53322
jameskoster opened this issue Jul 19, 2024 · 1 comment
Open
3 of 6 tasks
Tracked by #53322

Shadows / Elevation #63757

jameskoster opened this issue Jul 19, 2024 · 1 comment
Labels
Design System Issues related to the system of combining components according to best practices. Needs Design Feedback Needs general design feedback. Needs Design Needs design efforts.

Comments

@jameskoster
Copy link
Contributor

jameskoster commented Jul 19, 2024

Related to #63703

Note

Elevation refers to the vertical distance between two surfaces measured along the z-axis.

As the site editing experience transitions from the Editor to new UIs, there is a need for a more clearly defined elevation scale and shadow styles.

In _variables.scss we find values for modals and popovers only:

$shadow-popover: 0 0.7px 1px rgba($black, 0.1), 0 1.2px 1.7px -0.2px rgba($black, 0.1), 0 2.3px 3.3px -0.5px rgba($black, 0.1);
$shadow-modal: 0 0.7px 1px rgba($black, 0.15), 0 2.7px 3.8px -0.2px rgba($black, 0.15), 0 5.5px 7.8px -0.3px rgba($black, 0.15), 0.1px 11.5px 16.4px -0.5px rgba($black, 0.15);

New UIs now exist with custom shadow values, such as the content/preview frame and the Command Palette. The existing variables do not sufficiently cover these additional use cases. Elements like Snackbars and Tooltips may also require reconsideration.

Systematizing elevation will help create a cohesive experience and avoiding maintenance issues in the future.

Proposed elevation scale

  • Elevation 0: The lowest level for most UI elements, with no shadow. Example: Navigation sidebar.
  • Elevation 1: For large sections and containers that group related content and controls, which may overlap other content. Example: Preview Frame.
  • Elevation 2: For components that provide contextual feedback without being intrusive. Generally non-interruptive. Example: Tooltips, Snackbar.
  • Elevation 3: For components that offer additional actions. Example: Menus, Command Palette.
  • Elevation 4: For components that confirm decisions or handle necessary interruptions. Example: Modals.
Elevation

Does this scale meet the needs of the novel UIs, and does its application / mapping of components make sense? Let's discuss and explore further in this issue.

@jameskoster jameskoster added Needs Design Feedback Needs general design feedback. Needs Design Needs design efforts. labels Jul 19, 2024
@jasmussen
Copy link
Contributor

Nice issue. I wonder, can elevation 2 and 3 be merged? This would improve the contrast between elevations to just have 3 (not conting zero): small, medium, large.

@jameskoster jameskoster added the Design System Issues related to the system of combining components according to best practices. label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Design System Issues related to the system of combining components according to best practices. Needs Design Feedback Needs general design feedback. Needs Design Needs design efforts.
Projects
Status: Now
Development

No branches or pull requests

2 participants