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

Modernizes visual appearance of tabs #751

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

rauhul
Copy link
Contributor

@rauhul rauhul commented Jun 28, 2024

Updates the .interactive-tabs class to take a more layered appearance.
Hover and selection states are visually distinct and rely on the
existing color palette for layers.

Adds support for "prefers-contrast: more" to use the previous higher
contrast style.

Moves the css for tabs to a common location so it can be easily found
and reused between pages.

Builds on top of #743 and #749

Unifies the banner and cta css styles used on multiple pages.

Moves the element to a common location so the it can be found in the
source easily and be reused across pages.
Removes figure-gray-secondary-alt in favor of figure-gray-tertiary which
already had the exact same color values.

Fixes fill-quaternary to have different colors in dark and light mode.
Updates the .interactive-tabs class to take a more layered appearance.
Hover and selection states are visually distinct and rely on the
existing color palette for layers.

Adds support for "prefers-contrast: more" to use the previous higher
contrast style.

Moves the css for tabs to a common location so it can be easily found
and reused between pages.
@rauhul
Copy link
Contributor Author

rauhul commented Jun 28, 2024

After <- Before

Note: I messed up the order of the windows when taking screenshots so the new style is the left side and old style is right.

Light Default

Screenshot 2024-06-28 at 1 10 29 PM

Light Increase Contrast

Screenshot 2024-06-28 at 1 09 02 PM

Dark Default

Screenshot 2024-06-28 at 1 10 20 PM

Dark Increase Contrast

Screenshot 2024-06-28 at 1 09 11 PM

@rauhul
Copy link
Contributor Author

rauhul commented Jun 28, 2024

@swift-ci test

@alexandersandberg alexandersandberg added the workgroup-to-discuss Issue/PR to be discussed by the SWWG in the next meeting label Jun 29, 2024
@dempseyatgithub
Copy link
Contributor

From the screen shots, the contrast seems very low for the default in both light and dark mode.

Possibly a higher contrast border on the selected item would make it more clear which item is selected.

@kubamracek
Copy link
Contributor

This PR looks like moving into the right direction to me.

@shahmishal shahmishal removed the workgroup-to-discuss Issue/PR to be discussed by the SWWG in the next meeting label Jul 30, 2024
@kaishin
Copy link
Member

kaishin commented Aug 10, 2024

@rauhul As @dempseyatgithub asked, can we increase the contrast between active and inactive tabs? If you're unable to do it let me know and I'll make the change before merging.

Copy link
Member

@kaishin kaishin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides the contrast comment above, let's get the other PRs this depends on merged first so it's easier to review the relevant changes.

border-radius: var(--border-radius);
color: var(--color-text);

// FIXME: Sink prefers-constrast lower into the color stack so each element doesn't need to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// FIXME: Sink prefers-constrast lower into the color stack so each element doesn't need to
// FIXME: Sink prefers-contrast lower into the color stack so each element doesn't need to

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.

None yet

6 participants