Skip to content

Commit 985512d

Browse files
Use pixels for @media queries
These `@media` queries are concerned with displaying a side panel that is explicitly 300px wide. Therefore, they should be expressed in terms of pixels instead of variable-width units. Also note that `em` in a `@media` query is based on the default font size of the browser configured by the user, _not_ the font size of `<body>`, which seems to have been the intention with these (40 * 15px == 600px => equal space for panel and content).
1 parent 864444f commit 985512d

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lib/rdoc/generator/template/rails/resources/css/main.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ body {
2323
grid-template-columns: 100%;
2424
}
2525

26-
@media (min-width: 40em) {
26+
@media (min-width: 600px) {
2727
body {
2828
grid-template-rows: min-content min-content auto min-content;
2929
grid-template-columns: 300px auto;
@@ -238,7 +238,7 @@ pre
238238
margin: 1em;
239239
}
240240

241-
@media (min-width: 40em) {
241+
@media (min-width: 600px) {
242242
#content {
243243
max-width: 980px;
244244
margin: 2em 3.5em;

lib/rdoc/generator/template/rails/resources/css/panel.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
display: none;
55
}
66

7-
@media (max-width: 39.99em) {
7+
@media (max-width: 599px) {
88
.panel_mobile_button {
99
display: block;
1010
height: 40px;
@@ -90,7 +90,7 @@
9090
line-height: 1;
9191
}
9292

93-
@media (max-width: 39.99em) {
93+
@media (max-width: 599px) {
9494
.panel
9595
{
9696
transition: left 0s ease-in-out;
@@ -122,7 +122,7 @@
122122
text-align: center;
123123
}
124124

125-
@media (max-width: 39.99em) {
125+
@media (max-width: 599px) {
126126
.panel .logo img {
127127
width: 50%;
128128
}
@@ -143,7 +143,7 @@
143143
overflow-x: hidden;
144144
}
145145

146-
@media (max-width: 39.99em) {
146+
@media (max-width: 599px) {
147147
.panel .header
148148
{
149149
width: 100%;
@@ -164,7 +164,7 @@
164164
outline: none;
165165
}
166166

167-
@media (max-width: 39.99em) {
167+
@media (max-width: 599px) {
168168
.panel .header input
169169
{
170170
width: 70%;

0 commit comments

Comments
 (0)