Skip to content

Commit

Permalink
move preview frame CSS into separate postCSS file.
Browse files Browse the repository at this point in the history
  • Loading branch information
toolness committed Apr 12, 2016
1 parent 12a5650 commit e18c872
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 20 deletions.
14 changes: 14 additions & 0 deletions css/preview-frame.css
@@ -0,0 +1,14 @@
html, body {
height: 100%;
}

body {
margin: 0;
display: flex;

/* This centers our sketch horizontally. */
justify-content: center;

/* This centers our sketch vertically. */
align-items: center;
}
2 changes: 2 additions & 0 deletions lib/preview-frame.ts
@@ -1,3 +1,5 @@
require("../css/preview-frame.css");

var global = window as any;

function loadP5(version: string, cb?: () => void) {
Expand Down
20 changes: 0 additions & 20 deletions preview-frame.html
@@ -1,25 +1,5 @@
<!DOCTYPE html>
<meta charset="utf-8">
<style>
html, body {
height: 100%;
}

body {
margin: 0;
display: -webkit-box; /* OLD - iOS 6-, Safari 3.1-6, BB7 */
display: -webkit-flex; /* NEW - Safari 6.1+. iOS 7.1+, BB10 */
display: flex;

/* This centers our sketch horizontally. */
-webkit-justify-content: center;
justify-content: center;

/* This centers our sketch vertically. */
-webkit-align-items: center;
align-items: center;
}
</style>
<title>Preview</title>
<body>
<script src="preview-frame.bundle.js"></script>
Expand Down

0 comments on commit e18c872

Please sign in to comment.