Skip to content

Commit

Permalink
Fix to adjust the breakpoint for left nav (#13735)
Browse files Browse the repository at this point in the history
* fix left nav below 1280

* commit assets

---------

Co-authored-by: Sean Holung <[email protected]>
  • Loading branch information
interurban and sean1588 authored Jan 2, 2025
1 parent 5e4a2e4 commit bbca44c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 18 deletions.
6 changes: 3 additions & 3 deletions assets/css/bundle.css
Original file line number Diff line number Diff line change
Expand Up @@ -3922,7 +3922,7 @@ div.highlight .copy-button{
border-radius:6px
}

@media(min-width: 1280px){
@media(min-width: 1024px){
.docs-list-main .docs-main-nav-toggle-wrapper .docs-main-nav{
width:240px;
flex-basis:240px;
Expand Down Expand Up @@ -4065,7 +4065,7 @@ div.highlight .copy-button{
}
}

@media(min-width: 1280px){
@media(min-width: 1024px){
.docs-list-main .docs-main-content-wrapper .docs-main-content{
margin-left:24px;
max-width:700px;
Expand Down Expand Up @@ -4136,7 +4136,7 @@ div.highlight .copy-button{
}
}

@media(min-width: 1280px){
@media(min-width: 1024px){
.docs-list-main .docs-main-content-wrapper .docs-table-of-contents{
min-width:340px
}
Expand Down
2 changes: 1 addition & 1 deletion assets/js/bundle.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions theme/src/scss/docs/_docs-main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ body.section-registry {
}
}

@media (min-width: 1280px) {
@media (min-width: 1024px) {
width: 240px;
flex-basis: 240px;
box-shadow: none;
Expand Down Expand Up @@ -354,7 +354,7 @@ body.section-registry {
flex-direction: column;
}

@media (min-width: 1280px) {
@media (min-width: 1024px) {
margin-left: 24px;
max-width: 700px;
min-width: 0;
Expand Down Expand Up @@ -422,7 +422,7 @@ body.section-registry {
width: 240px;
}

@media (min-width: 1280px) {
@media (min-width: 1024px) {
min-width: 340px;
}
}
Expand Down
16 changes: 5 additions & 11 deletions theme/src/ts/docs-main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ $(window).on("load", function() {
})(document, jQuery);

function setDocsMainNavPosition() {
if ($(this).width() <= 1280) {
if ($(this).width() <= 1024) {
if (docsMainNavToggleWrapper.hasClass("docs-nav-show")) {
docsNavToggleIcon.removeClass("open-docs-main-nav")
docsNavToggleIcon.addClass("close-docs-main-nav");
Expand All @@ -100,7 +100,7 @@ function setDocsMainNavPosition() {
}
}

if ($(this).width() > 1280) {
if ($(this).width() > 1024) {
docsMainNavToggleWrapper.removeClass("docs-nav-show");
docsMainNavToggleWrapper.removeClass("docs-nav-hide");
} else if (!docsMainNavToggleWrapper.hasClass("docs-nav-hide") && !docsMainNavToggleWrapper.hasClass("docs-nav-show")) {
Expand All @@ -111,16 +111,10 @@ function setDocsMainNavPosition() {
function setTableOfContentsVisibility() {
let docsTableOfContents = $(".docs-toc-desktop");

if (window.innerWidth > 1024 && window.innerWidth <= 1280) {
if (docsMainNavToggleWrapper.hasClass("docs-nav-show")) {
docsTableOfContents.hide();
} else {
docsTableOfContents.show();
}
} else if (window.innerWidth > 1280) {
docsTableOfContents.show();
} else {
if (window.innerWidth < 1280) {
docsTableOfContents.hide();
} else {
docsTableOfContents.show();
}
}

Expand Down

0 comments on commit bbca44c

Please sign in to comment.