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

Change banner style according to width #12810

Merged
merged 3 commits into from
Jun 3, 2022
Merged

Change banner style according to width #12810

merged 3 commits into from
Jun 3, 2022

Conversation

hslee2008
Copy link
Contributor

@hslee2008 hslee2008 commented May 5, 2022

Problem

As clearly seen below, the Support Ukraine 🇺🇦 Banner is not changing to fit the screen.
The banenr takes up a lot of space.

Code

Devtools Investigation

As seen on a screenshot of the devtools, it shows us the default style of the banner.
Everything is fine.
However, there is no code for changing the banner style to fit the screen.

File

Looking at the file that contains the style for the banner (website/src/pages/index.module.css), media exists.

@media only screen and (max-width: 768px) {
  .announcement {
    font-size: 18px;
  }
}

@media only screen and (max-width: 500px) {
  .announcement {
    font-size: 15px;
    line-height: 22px;
    padding: 6px 30px;
  }
}

However, the class is set to .announcement and there is no element by the class of .announcement.
But there is an element (the banner) that has the class of announcementBar_yyVl.
I concluded the class should be div[class^='announcementBarContent'].

Screenshots

jestjs io_

Tested

deploy-preview-12810--jestjs netlify app_

Support Ukraine 🇺🇦 Banner did not change style to fit the screen.
Changed to class to the correct class.
@SimenB
Copy link
Member

SimenB commented May 5, 2022

Yeah, I noticed this as well on mobile, thanks for sending a PR!. @dmitryvinn does this seem fine? I assume it was copied across Meta projects.

@SimenB
Copy link
Member

SimenB commented Jun 3, 2022

Ping @dmitryvinn

@github-actions
Copy link

github-actions bot commented Jul 4, 2022

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants