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

Website CSS issue when HN post contains preformatted code #226

Open
hongshaoyang opened this issue Mar 20, 2022 · 0 comments · May be fixed by #227
Open

Website CSS issue when HN post contains preformatted code #226

hongshaoyang opened this issue Mar 20, 2022 · 0 comments · May be fixed by #227

Comments

@hongshaoyang
Copy link

hongshaoyang commented Mar 20, 2022

  1. Search for this story Show HN: HN Avatars in 357 bytes on HN search desktop using Firefox
  2. Scroll to the right
  3. Preformatted code doesn't wrap properly:

Screenshot 2022-03-20 at 12 46 57 PM

suggested solution

  • the Story_data class is a flexbox that is taking taking up width when a code, pre node is present. set a maxwidth on Story_data
  • Set code, pre to overflow: scroll
.Story_data {
  flex: auto;
  max-width: 50%;
}

code, pre {
  overflow: scroll;
}

.experimental .Story_share {
  /* flex: 1 1; */
  flex: 140px;
}
hongshaoyang added a commit to hongshaoyang/hn-search that referenced this issue Mar 20, 2022
@hongshaoyang hongshaoyang linked a pull request Mar 20, 2022 that will close this issue
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 a pull request may close this issue.

1 participant