Skip to content

Commit 2ee23fc

Browse files
authored
Update custom.css to format nicely on mobile views
1 parent e03ca49 commit 2ee23fc

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

src/css/custom.css

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,39 @@
2828
--ifm-color-primary-lightest: #4fddbf;
2929
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
3030
}
31+
32+
/* Targeting screens smaller than 996px (Docusaurus mobile/tablet breakpoint) */
33+
@media screen and (max-width: 996px) {
34+
:root {
35+
/* Reduce the base font size globally for mobile */
36+
--ifm-font-size-base: 14px;
37+
38+
/* Shrink button padding and font size */
39+
--ifm-button-padding-vertical: 6px;
40+
--ifm-button-padding-horizontal: 12px;
41+
--ifm-button-font-size: 0.8rem;
42+
}
43+
44+
/* Specific fix for input fields and textareas */
45+
input,
46+
textarea,
47+
select {
48+
font-size: 16px !important; /* Prevents iOS from auto-zooming on focus */
49+
padding: 8px !important;
50+
width: 100%; /* Ensures they don't overflow the container */
51+
box-sizing: border-box;
52+
}
53+
54+
/* Adjust standard button classes if they feel too bulky */
55+
.button {
56+
margin-bottom: 0.5rem;
57+
display: inline-block;
58+
width: auto;
59+
}
60+
61+
/* If your inputs are inside a specific container that is too wide */
62+
.container {
63+
padding-left: 1rem;
64+
padding-right: 1rem;
65+
}
66+
}

0 commit comments

Comments
 (0)