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

[Docs] Improve Navigation panel column layout for landscape/portrait #7669

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 23 additions & 3 deletions website/src/react-native/css/react-native.css
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ h1:hover .hash-link, h2:hover .hash-link, h3:hover .hash-link, h4:hover .hash-li
border-bottom: 0;
}

@media screen and (max-device-width: 960px) {
@media only screen and (max-device-width: 1024px) {
.nav-docs {
position: fixed;
z-index: 90;
Expand Down Expand Up @@ -555,18 +555,38 @@ h1:hover .hash-link, h2:hover .hash-link, h3:hover .hash-link, h4:hover .hash-li
}
}

@media screen and (min-device-width: 641px) and (max-device-width: 1024px) {
/**
* Multicolumn layout for phone (landscape only) & tablet (regardless its screen orientation)/
*/
@media only screen and (min-device-width : 375px) and (max-device-width : 1024px) {
.nav-docs-section ul {
display: flex;
flex-wrap: wrap;
}

/* Display 2 columns on tablet */
.nav-docs-section li {
width: 100%;
}
}

/* 2 columns layout */
@media
/*Phone, landscape screen orientation*/
only screen and (min-device-width : 375px) and (max-device-width : 1024px) and (orientation : landscape),
/*Tablet, portrait screen orientation*/
only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : portrait) {
.nav-docs-section li {
width: 50%;
}
}

/* 3 columns layout on tablet (landscape screen orientation) */
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape) {
.nav-docs-section li {
width: 33%;
}
}

.nav-blog li {
margin-bottom: 5px;
}
Expand Down