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

🚸 Mobile usability fixes #5351

Merged
merged 5 commits into from
Feb 15, 2021
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
2 changes: 1 addition & 1 deletion frontend/scss/components/molecules/code-snippet.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Styles taken and combined from: https://raw.githubusercontent.com/richleland/pyg

pre, code {
@include txt-mono;
white-space: pre-wrap;
white-space: pre;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I thought that not wrapping causes the overflow?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I came up with another way by adding a min-width: 0; rule on children of flex containers. It makes the code blocks look better and not wrap in weird places.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice!

font-size: 0.9rem;
padding: unset;
word-break: initial;
Expand Down
2 changes: 2 additions & 0 deletions frontend/scss/components/molecules/tip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ The tip molecule shows text alongside a contextual icon

&-content {
@include txt-2;
min-width: 0;

h4 {
@include txt-1;
margin: 0 0 0.75em;
Expand Down
2 changes: 1 addition & 1 deletion frontend/scss/components/organisms/teaser-grid.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
display: flex;
flex-wrap: nowrap;
padding: 20px 0;
margin: 0 -20px;
margin: 0 -15px;

@media (min-width: 575px) {
overflow: visible;
Expand Down
10 changes: 10 additions & 0 deletions frontend/scss/components/templates/_default.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@

@media (max-width: 767px) {
padding: 0 15px;

& > div, section {
min-width: 0;
}
}

@media (min-width: 768px) {
Expand Down Expand Up @@ -44,6 +48,12 @@
margin-right: auto;
max-width: 1920px;

@media (max-width: 767px) {
& > div, section {
min-width: 0;
}
}

@media (min-width: 768px) {
display: grid;
grid-gap: 30px;
Expand Down
1 change: 1 addition & 0 deletions frontend/scss/components/templates/use-cases.scss
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
.#{organism('fragment-slider')} {
grid-column: 1 / -1;
margin-top: -76%;
overflow: hidden;
@media (min-width: 768px) {
margin-top: -56%;
}
Expand Down
4 changes: 0 additions & 4 deletions frontend/scss/components/templates/what-is-amp.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@

.#{utility('container-fluid')} {
@include container-fluid;

> div, section {
min-width: 0;
}
}


Expand Down
3 changes: 2 additions & 1 deletion playground/src/fly-in/fly-in.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
.fly-in {
$headerHeight: 64px;

position: absolute;
position: fixed;
z-index: 10000;
top: 0;
display: flex;
Expand All @@ -18,6 +18,7 @@
transition: transform .3s ease, box-shadow .2s ease-in;

@media (min-width: 768px) {
position: absolute;
top: #{$headerHeight};
width: 42%;
max-width: 480px;
Expand Down