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

Allow transparent backgrounds for banners #1796

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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 assets/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -1196,7 +1196,6 @@ summary::-webkit-details-marker {
/* component-media */
.media {
display: block;
background-color: rgba(var(--color-foreground), 0.1);
position: relative;
overflow: hidden;
}
Expand Down
9 changes: 0 additions & 9 deletions assets/section-image-banner.css
Original file line number Diff line number Diff line change
Expand Up @@ -318,21 +318,12 @@
@media screen and (min-width: 750px) {
.banner--desktop-transparent .banner__box {
background: transparent;
--color-foreground: 255, 255, 255;
--color-button: 255, 255, 255;
--color-button-text: 0, 0, 0;
Comment on lines -321 to -323
Copy link
Contributor

Choose a reason for hiding this comment

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

Those changes are on declarations within a media query @media screen and (min-width: 750px) { so they're only impacting the wider screens.
If you're on mobile the colour scheme is never applied and the default is white.

So it can make for a confusing experience. As it's working on desktop and applying the colour scheme accordingly when a container is and isn't showing but not on mobile.

Also the info next to the colour scheme setting needs to be updated:

max-width: 89rem;
border: none;
border-radius: 0;
box-shadow: none;
}

.banner--desktop-transparent .button--secondary {
--color-button: 255, 255, 255;
--color-button-text: 255, 255, 255;
--alpha-button-background: 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we should be removing the alpha value here. If the button is using the outline style it should keep a transparent background 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

On mobile it looks good but not on desktop: recording.

}

.banner--desktop-transparent .content-container:after {
display: none;
}
Expand Down