Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

fix: fix cookies dialog button contrast #1010

Merged
merged 4 commits into from
Jun 14, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 4 additions & 0 deletions src/app/shared/cookie-popup/_cookie-popup-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
map.get(mat.$dark-theme-foreground-palette, secondary-text)
);
background: if($is-dark-theme, map.get(mat.$grey-palette, 50), #252525);
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems like this isn't working? the two colors are reversed? If it's a dark theme, it should use the black background, i.e. #252525 and not the almost white 50 from the grey palette.

Maybe this would fix it without the need to change any accent/primary colors.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes! is reverse right now!
but i like your idea, so with color=primary & popup background same as the theme we will have:

Screenshot from 2021-06-07 22-49-14
Screenshot from 2021-06-07 22-49-27

looks good to you?
@Splaktar

Copy link
Contributor

Choose a reason for hiding this comment

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

@crisbeto This LGTM. WDYT?

I don't like the idea of popping up a blinding white background dialog in dark mode. But I wanted to check if you had intended that?

Copy link
Member

Choose a reason for hiding this comment

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

I was mimicking the color scheme from the Material snack bar. The only difference is that I made the background ~5% darker to meet the accessibility requirements.


.buttons {
color: if($is-dark-theme, map.get($primary, 600), map.get($accent, default));
}
}
}
}
3 changes: 1 addition & 2 deletions src/app/shared/cookie-popup/cookie-popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
<a
href="https://policies.google.com/technologies/cookies"
mat-button
color="accent"
target="_blank"
rel="noopener">More details</a>
<button mat-button color="accent" (click)="accept()">Ok, Got it</button>
<button mat-button (click)="accept()">Ok, Got it</button>
</div>
</div>