Skip to content

Commit d11c26d

Browse files
committed
Styling around emulator
1 parent 8866b0d commit d11c26d

3 files changed

Lines changed: 15 additions & 4 deletions

File tree

apps/web/public/style.css

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,19 @@ code {
142142
}
143143

144144
.desktop .CodeMirror {
145-
height: calc(100vh - 177px) !important;
145+
/* Match the fixed-size emulator frame on the right:
146+
screen (zoom 2 = 480px) + keyboard (256px) + 2px frame border = 738px. */
147+
box-sizing: border-box;
148+
height: 738px !important;
149+
max-height: 738px !important;
150+
border: 1px solid #5B5B5B;
151+
border-radius: 5px;
152+
}
153+
154+
.desktop .emulator-frame {
146155
border: 1px solid #5B5B5B;
147156
border-radius: 5px;
157+
overflow: hidden;
148158
}
149159

150160
.mobile .CodeMirror {

apps/web/src/components/Emulator.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ export function Emulator(props) {
2121
}, []);
2222

2323
return (
24-
<>
24+
<div className="emulator-frame">
2525
<div id="jsspeccy-screen"/>
2626
<Keyboard width={width}/>
27-
</>
27+
</div>
2828
)
2929
}

apps/web/src/components/Keyboard.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ export function Keyboard(props) {
1717
}, []);
1818

1919
let style = {
20-
imageRendering: 'auto'
20+
imageRendering: 'auto',
21+
display: 'block'
2122
};
2223

2324
if (!isMobile) {

0 commit comments

Comments
 (0)