Skip to content

Commit 4938130

Browse files
annevkdomenic
authored andcommitted
Dev edition: adjust styling for smaller screens
Fixes whatwg#3284.
1 parent a53db50 commit 4938130

1 file changed

Lines changed: 24 additions & 16 deletions

File tree

dev/styles.css

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ body {
6363
line-height: 1.45em;
6464
font-family: "Droid Serif", Georgia, serif;
6565
color: #222;
66-
width: 760px;
66+
max-width: 760px;
6767
margin: 4em auto;
6868
padding: 0 1em;
6969
}
@@ -199,7 +199,7 @@ p {
199199

200200
p, ul, ol, dl {
201201
margin-bottom: 1em;
202-
width: 520px;
202+
max-width: 520px;
203203
}
204204

205205
hr {
@@ -306,7 +306,7 @@ var > var::after {
306306
(http://developers.whatwg.org/introduction.html#typographic-conventions)
307307
*/
308308
.note, .example, .XXX, .warning, pre {
309-
width: 580px;
309+
max-width: 580px;
310310
}
311311

312312
.note {
@@ -353,11 +353,14 @@ var > var::after {
353353
/* Header */
354354

355355
header#head {
356-
position: relative;
356+
display: flex;
357+
--logo-width: 100px;
358+
--logo-margin: 20px;
359+
margin-left: calc(-1 * (var(--logo-width) + var(--logo-margin)));
357360
}
358361

359362
header#head hgroup {
360-
width: 580px;
363+
flex: 1;
361364
}
362365

363366
header#head h1 {
@@ -390,18 +393,11 @@ header#head h2 {
390393
}
391394

392395
header#head .logo {
393-
position: absolute;
394-
left: -120px;
396+
margin-right: var(--logo-margin);
395397
}
396398

397399
/* Search bar */
398400

399-
#search {
400-
position: absolute;
401-
top: 0;
402-
right: 0;
403-
}
404-
405401
#search, #search input {
406402
width: 150px;
407403
}
@@ -521,6 +517,12 @@ html:not(.index) ol.toc ol {
521517

522518
/* RESPONSIVE STYLES */
523519

520+
@media screen and (max-width: 1000px) {
521+
header#head {
522+
margin-left: 0;
523+
}
524+
}
525+
524526
@media screen and (max-width: 767px) {
525527
body {
526528
font-size: 110%;
@@ -532,6 +534,7 @@ html:not(.index) ol.toc ol {
532534

533535
header#head {
534536
text-align: center;
537+
display: block;
535538
}
536539

537540
header#head .logo {
@@ -550,7 +553,7 @@ html:not(.index) ol.toc ol {
550553
}
551554

552555
.note, .example, .XXX, .warning, pre {
553-
width: 560px;
556+
max-width: 560px;
554557
}
555558

556559
pre {
@@ -565,9 +568,14 @@ html:not(.index) ol.toc ol {
565568
margin-left: 0.5em;
566569
}
567570

571+
h2 .secno {
572+
position: static;
573+
display: inline;
574+
}
575+
568576
.status {
569-
left: auto;
570-
right: -8.9em;
577+
position: static;
578+
margin: 0;
571579
}
572580

573581
/* Search */

0 commit comments

Comments
 (0)