Skip to content

Commit 468e628

Browse files
authored
fix: Adjust HTML styles for small screens (#67)
1 parent bd33c71 commit 468e628

File tree

4 files changed

+40
-7
lines changed

4 files changed

+40
-7
lines changed

src/public/error_stack/style.css

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ html.dark {
2424
display: flex;
2525
justify-content: space-between;
2626
align-items: center;
27-
padding: 10px 16px;
27+
padding: calc(2vw + 7px);
2828
border-radius: var(--radius) var(--radius) 0 0;
2929
}
3030

@@ -61,17 +61,22 @@ html.dark {
6161
.stack-frame-contents {
6262
background: var(--frame-bg);
6363
display: flex;
64-
padding: 0 12px;
64+
padding: 0 calc(1vw + 3px);
6565
align-items: center;
6666
justify-content: space-between;
6767
}
68+
6869
.stack-frame:not(.stack-frame-native) .stack-frame-contents:hover {
6970
background: var(--card-bg);
7071
}
7172
.stack-frame:last-child:not(.expanded) .stack-frame-contents {
7273
border-radius: 0 0 var(--radius) var(--radius);
7374
}
7475

76+
.stack-frame-filepath {
77+
max-width: 100%;
78+
}
79+
7580
.stack-frame-location {
7681
display: flex;
7782
flex-direction: column;
@@ -83,6 +88,7 @@ html.dark {
8388
color: inherit;
8489
font: inherit;
8590
padding: 9px 0;
91+
align-items:start;
8692
}
8793

8894
.stack-frame-location a {
@@ -194,6 +200,14 @@ html.dark {
194200
}
195201

196202
@media (min-width: 768px) {
203+
.stack-frame-contents {
204+
padding: 0 12px;
205+
}
206+
207+
#stack-frames-header {
208+
padding: 10px 16px;
209+
}
210+
197211
.stack-frame-location {
198212
flex-direction: row;
199213
}

src/public/error_stack_source/style.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ html.dark {
3030
font-size: 12px;
3131
font-family: var(--font-mono);
3232
position: relative;
33-
padding: 10px 12px 12px 12px;
33+
padding: calc(2vw + 4px) calc(2vw + 6px) calc(2vw + 4px) calc(2vw + 6px);
3434
}
3535
[class*='shj-lang-'] * {
3636
-webkit-font-smoothing: initial;
@@ -118,5 +118,6 @@ html.dark {
118118
@media (min-width: 768px) {
119119
[class*='shj-lang-'] {
120120
border-top: none;
121+
padding: 10px 12px 12px 12px;
121122
}
122123
}

src/public/header/style.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#toggle-theme-container {
77
position: relative;
88
display: inline-block;
9-
padding-right: 10px;
9+
padding-right: 0px;
1010
}
1111

1212
#toggle-theme-container input[type='checkbox'] {
@@ -50,6 +50,7 @@
5050
#light-theme-indicator {
5151
display: none;
5252
}
53+
5354
#toggle-theme-container input[type='checkbox']:checked + #toggle-theme-label #dark-theme-indicator {
5455
display: flex;
5556
}

src/public/layout/style.css

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ input[type='checkbox']:disabled + span {
321321
}
322322
.dumper-dump pre {
323323
font-size: 13px;
324+
padding: calc(0.5vw + 8px);
324325
}
325326
.dumper-dump .dumper-toggle span {
326327
font-size: 12px;
@@ -336,14 +337,14 @@ input[type='checkbox']:disabled + span {
336337
display: flex;
337338
flex-direction: column;
338339
gap: 24px;
339-
padding: 40px;
340+
padding: calc(1vw + 15px);
340341
}
341342

342343
.card {
343344
background: var(--card-bg);
344345
box-shadow: var(--card-shadow);
345346
border-radius: var(--radius);
346-
padding: 22px 30px;
347+
padding: calc(2vw + 7px);
347348
display: flex;
348349
flex-direction: column;
349350
gap: 12px;
@@ -387,7 +388,7 @@ input[type='checkbox']:disabled + span {
387388

388389
.card-table td {
389390
border-bottom: 1px solid var(--border);
390-
padding: 6px 12px;
391+
padding: calc(0.8vw + 4px) calc(0.8vw + 8px);
391392
word-wrap: break-word;
392393
}
393394

@@ -402,9 +403,25 @@ input[type='checkbox']:disabled + span {
402403
}
403404

404405
@media (min-width: 768px) {
406+
#layout {
407+
padding: 40px;
408+
}
409+
410+
.card {
411+
padding: 22px 30px;
412+
}
413+
414+
.card-table td {
415+
padding: 6px 12px;
416+
}
417+
405418
.card-table td.table-key {
406419
width: 180px;
407420
}
421+
422+
.dumper-dump pre {
423+
padding: 10px 15px;
424+
}
408425
}
409426

410427
@media (min-width: 1024px) {

0 commit comments

Comments
 (0)