mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-06 12:52:31 +02:00
fix: consistently use max-width: 996px
in media queries (#6815)
* fix: consistently use `max-width: 996px` in media queries Follow `docusaurus-theme-classic` and use `996px` as the cutoff between desktop and mobile screen width. * revert example changes Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
This commit is contained in:
parent
8a24d56783
commit
2e3eec2d08
3 changed files with 4 additions and 4 deletions
|
@ -10,7 +10,7 @@
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 966px) {
|
@media screen and (max-width: 996px) {
|
||||||
.heroBanner {
|
.heroBanner {
|
||||||
padding: 2rem;
|
padding: 2rem;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 966px) {
|
@media screen and (max-width: 996px) {
|
||||||
.heroBanner {
|
.heroBanner {
|
||||||
padding: 2rem;
|
padding: 2rem;
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,14 +129,14 @@ In light mode, the `<html>` element has a `data-theme="light"` attribute; and in
|
||||||
|
|
||||||
### Mobile View {#mobile-view}
|
### Mobile View {#mobile-view}
|
||||||
|
|
||||||
Docusaurus uses `966px` as the cutoff between mobile screen width and desktop. If you want your layout to be different in the mobile view, you can use media queries.
|
Docusaurus uses `996px` as the cutoff between mobile screen width and desktop. If you want your layout to be different in the mobile view, you can use media queries.
|
||||||
|
|
||||||
```css
|
```css
|
||||||
.banner {
|
.banner {
|
||||||
padding: 4rem;
|
padding: 4rem;
|
||||||
}
|
}
|
||||||
/** In mobile view, reduce the padding */
|
/** In mobile view, reduce the padding */
|
||||||
@media screen and (max-width: 966px) {
|
@media screen and (max-width: 996px) {
|
||||||
.heroBanner {
|
.heroBanner {
|
||||||
padding: 2rem;
|
padding: 2rem;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue