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

don't use backdrop for dialogs #9649

Merged
merged 1 commit into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion war/src/main/scss/abstracts/_theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ $semantics: (
--dialog-backdrop-background: hsla(240, 10%, 20%, 0.8);
}

--dialog-backdrop-filter: brightness(3) blur(50px);
--dialog-box-shadow: 0 10px 40px rgba(0, 0, 20, 0.15),
0 2px 15px rgba(0, 0, 20, 0.05),
inset 0 0 2px 2px rgba(255, 255, 255, 0.025);
Expand Down
2 changes: 0 additions & 2 deletions war/src/main/scss/components/_dialogs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ $jenkins-dialog-padding: 1.3rem;
.jenkins-dialog {
border-radius: 0.6rem;
border: none;
background: transparent;
box-shadow: var(--dialog-box-shadow);
backdrop-filter: var(--dialog-backdrop-filter);
Comment on lines -6 to -8
Copy link
Contributor

@janfaracik janfaracik Aug 24, 2024

Choose a reason for hiding this comment

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

Could we potentially keep the backdrop filter but remove the brightness() (which needs to be removed anyway as it's breaking on HDR displays...):

  background-color: color-mix(in srgb, var(--background) 85%, transparent);
  box-shadow: var(--dialog-box-shadow), 0 0 0 100vmax rgba(23, 28, 37, 0.6);
  backdrop-filter: blur(30px);
  animation: jenkins-dialog-animate-in 0.25s cubic-bezier(0, 0.68, 0.5, 1.5);
  overflow: hidden;
  padding: $jenkins-dialog-padding 0 0 0;
  display: flex;
  flex-direction: column;
  gap: $jenkins-dialog-padding;

  &__title {
    font-size: 1.125rem;
    font-weight: 500;
    padding: 0 $jenkins-dialog-padding;
    color: var(--text-color);
  }

Something like the above - the blur is still there just drastically toned down (so we still get a little colour bleed, but nothing overtly distracting like it is now). ::backdrop has been killed in favour of the increased box-shadow as backdrop appears behind the dialog, darkening it, whereas box shadow masks as expected.

Very exaggerated example where the above still looks alright:

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would prefer that the dialog has a clear one color only background. It should not be influenced by what is behind the dialog in any way.
btw the same applies to drop down menus and tooltips
image
It just looks not good I think

animation: jenkins-dialog-animate-in 0.25s cubic-bezier(0, 0.68, 0.5, 1.5);
overflow: hidden;
padding: $jenkins-dialog-padding 0 0 0;
Expand Down
Loading