Skip to content

Commit

Permalink
refactor(style): center canvas vertically and horizontally
Browse files Browse the repository at this point in the history
  • Loading branch information
remarkablemark committed Feb 17, 2024
1 parent d282452 commit 84fc6a3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'kaboom/global';
import './style.css';
import './scenes';

import { Scene } from './constants';
Expand Down
19 changes: 19 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
* {
border: 0;
margin: 0;
padding: 0;
}

html,
body {
width: 100%;
height: 100%;
overflow: hidden;
}

canvas {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}

0 comments on commit 84fc6a3

Please sign in to comment.