Skip to content

Commit

Permalink
fix(css): remove screen condition from media queries (#11142)
Browse files Browse the repository at this point in the history
* fix(css): remove `screen and` from MQ

* Remove the rest of screen-ands

---------

Co-authored-by: Claas Augner <caugner@mozilla.com>
  • Loading branch information
pepelsbey and caugner authored Jun 5, 2024
1 parent 654c2ad commit a814540
Show file tree
Hide file tree
Showing 68 changed files with 198 additions and 200 deletions.
4 changes: 2 additions & 2 deletions client/src/about/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
margin-top: 3rem;
}

@media screen and (min-width: $screen-md) {
@media (min-width: $screen-md) {
h1 {
font-size: 3.5rem;
}
Expand Down Expand Up @@ -48,7 +48,7 @@

.heading-break {
display: none;
@media screen and (min-width: $screen-md) {
@media (min-width: $screen-md) {
display: block;
}
}
Expand Down
8 changes: 4 additions & 4 deletions client/src/about/testimonial/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
padding: 2rem 0;
width: 100%;

@media screen and (min-width: $screen-md) {
@media (min-width: $screen-md) {
flex-direction: row;
}

iframe {
height: 50vw;
padding: 0;

@media screen and (min-width: $screen-md) {
@media (min-width: $screen-md) {
height: initial;
width: 48%;
}
Expand All @@ -26,15 +26,15 @@
max-width: 18rem;
text-align: center;

@media screen and (min-width: $screen-md) {
@media (min-width: $screen-md) {
margin: initial;
text-align: initial;
}

img {
margin: 0 auto;

@media screen and (min-width: $screen-md) {
@media (min-width: $screen-md) {
margin: initial;
}
}
Expand Down
6 changes: 3 additions & 3 deletions client/src/advertising/with_us/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ main.advertise-with-us {
display: grid;
gap: 0.3em;

@media screen and (max-width: $screen-md) {
@media (max-width: $screen-md) {
grid-template-columns: 1fr 1fr;
}

@media screen and (max-width: $screen-sm) {
@media (max-width: $screen-sm) {
grid-template-columns: 1fr;
}

@media screen and (min-width: $screen-md) {
@media (min-width: $screen-md) {
grid-template-columns: 1fr 1fr 1fr 1fr;
}

Expand Down
4 changes: 2 additions & 2 deletions client/src/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
);
}

@media screen and (min-width: $screen-md) {
@media (min-width: $screen-md) {
:root {
--type-heading-h1: 600 var(--type-heading-h1-font-size) /
var(--heading-line-height) var(--font-heading);
Expand Down Expand Up @@ -139,7 +139,7 @@ body {
scrollbar-color: var(--scrollbar-color) var(--scrollbar-bg);

&.mobile-overlay-active {
@media screen and (max-width: $screen-md) {
@media (max-width: $screen-md) {
overflow: hidden;
}
}
Expand Down
2 changes: 1 addition & 1 deletion client/src/blog/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
display: grid;
grid-template-columns: 1fr 1fr;

@media screen and (max-width: $screen-lg) {
@media (max-width: $screen-lg) {
grid-template-columns: auto;
}
}
Expand Down
14 changes: 7 additions & 7 deletions client/src/blog/post.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@
"newsletter";
width: 100%;

@media screen and (min-width: $screen-lg) {
@media (min-width: $screen-lg) {
grid-template-areas:
"post toc"
"newsletter toc";
grid-template-columns: minmax(auto, 100%) minmax(0, 12rem);
}

@media screen and (min-width: $screen-xl) {
@media (min-width: $screen-xl) {
grid-template-areas:
"nothing post toc"
"nothing newsletter toc";
grid-template-columns: minmax(auto, 1fr) minmax(0, 52rem) minmax(15rem, 1fr);
}

@media screen and (min-width: $screen-xxl) {
@media (min-width: $screen-xxl) {
grid-template-areas:
"toc post place"
"toc newsletter place";
Expand All @@ -36,7 +36,7 @@
--offset: var(--top-nav-height);
display: none;

@media screen and (min-width: $screen-lg) {
@media (min-width: $screen-lg) {
display: flex;
flex-direction: column;
grid-area: toc;
Expand All @@ -45,7 +45,7 @@
margin-top: 2rem;
}
}
@media screen and (min-width: $screen-xxl) {
@media (min-width: $screen-xxl) {
display: contents;

.place.side,
Expand Down Expand Up @@ -91,7 +91,7 @@
display: flex;
gap: 1rem;

@media screen and (max-width: $screen-md) {
@media (max-width: $screen-md) {
flex-direction: column-reverse;
}

Expand All @@ -110,7 +110,7 @@
background: none;
}

@media screen and (min-width: $screen-md) {
@media (min-width: $screen-md) {
&.previous,
&.next {
&::before,
Expand Down
6 changes: 3 additions & 3 deletions client/src/community/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ main.contribute {
display: grid;
gap: 0.3em;

@media screen and (max-width: $screen-md) {
@media (max-width: $screen-md) {
grid-template-columns: 1fr 1fr;
}

@media screen and (max-width: $screen-sm) {
@media (max-width: $screen-sm) {
grid-template-columns: 1fr;
}

@media screen and (min-width: $screen-md) {
@media (min-width: $screen-md) {
grid-template-columns: 1fr 1fr 1fr 1fr;
}

Expand Down
Loading

0 comments on commit a814540

Please sign in to comment.