Skip to content

Commit 737e275

Browse files
Merge pull request #230 from DeepLcom/revert-224-revert-219-mobile-breakpoint
Revert "Revert "Fix experience between 880-1024 px widths""
2 parents 25f667f + 335796c commit 737e275

1 file changed

Lines changed: 80 additions & 0 deletions

File tree

tablet-width.css

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
/* These rules allow us to retain most elements of the desktop view between 880px and 1024px.
2+
* We could extend these all the way to the traditional 768px breakpoint,
3+
* but the width of our current left sidebar makes that undesirable.
4+
*
5+
* Mintlify provides an id for most of the areas we want to fix up.
6+
* For the rest, they use a `lg:hidden` class on the element to be shown at desktop
7+
* resolutions, and a just plain `hidden` class on the element to be shown at
8+
* mobile resolution.
9+
*
10+
* Unfortunately in some cases we do need to select elements by using a few of classes.
11+
* Ideally we'd have id's for these too.
12+
*/
13+
14+
@media (min-width: 880px) {
15+
/* Retain the left sidebar, but make it a little narrower */
16+
#sidebar {
17+
display: block;
18+
width: 16rem;
19+
}
20+
21+
/* Retain left padding in main section so it doesn't overlap with the sidebar.
22+
* Don't introduce new left margin in main section.
23+
*/
24+
#content-area {
25+
padding-left: 21.5rem;
26+
margin-left: -3rem;
27+
}
28+
29+
/* Keep left sidebar font at 14px */
30+
#sidebar-content {
31+
font-size: .875em;
32+
}
33+
34+
/* Retain full searchbar */
35+
@supports selector(:has()) {
36+
div:has(> #search-bar-entry) {
37+
display: block;
38+
}
39+
}
40+
41+
@supports not selector(:has()) {
42+
#navbar .h-full .hidden.flex-1.justify-center {
43+
display: block;
44+
}
45+
}
46+
47+
/* Hide little search control */
48+
#search-bar-entry-mobile {
49+
display: none;
50+
}
51+
52+
/* Retain tabs */
53+
@supports selector(:has()) {
54+
div:has(> .nav-tabs) {
55+
display: block;
56+
}
57+
}
58+
59+
@supports not selector(:has()) {
60+
#navbar .hidden.px-12.h-12 {
61+
display: block;
62+
}
63+
}
64+
65+
/* Hide mobile menu */
66+
#navbar button.lg\:hidden {
67+
display: none;
68+
}
69+
}
70+
71+
@media (min-width: 1024px) {
72+
/* Use Mintlify's default styles at this width */
73+
#content-area {
74+
padding-left: 23.7rem;
75+
}
76+
77+
#sidebar {
78+
width: 18rem;
79+
}
80+
}

0 commit comments

Comments
 (0)