Skip to content

Commit fbb79be

Browse files
committed
Refactor editor SVG positioning
1 parent d3172e3 commit fbb79be

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

src/components/RunicEditor/index.css

+15-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@
9090
}
9191

9292
.runic-editor__svg-container {
93-
height: 100%;
93+
position: relative;
94+
height: 15em;
9495
padding: 1em;
9596
display: grid;
9697
place-items: center;
@@ -121,8 +122,20 @@
121122
background-repeat: repeat;
122123
}
123124

125+
/* Desktop */
126+
127+
@media (min-width: 1024px) {
128+
.runic-editor__svg-container {
129+
height: 100%;
130+
}
131+
}
132+
124133
.runic-editor__svg-container > .runic-svg {
125-
max-height: 15em;
134+
position: absolute;
135+
top: 0;
136+
left: 0;
137+
width: 100%;
138+
height: 100%;
126139
}
127140

128141
details {

src/components/RunicEditor/index.tsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ import { h, Component, VNode } from "preact";
44
import { RuneSVG } from "components/RuneSVG";
55
import { translateSentence } from "src/ipa";
66
import { RangeInput } from "components/RangeInput";
7-
import { downloadURI, drawSVGToCanvas, svgToImageBlob, svgToUri } from "./utils";
7+
import {
8+
downloadURI,
9+
drawSVGToCanvas,
10+
svgToImageBlob,
11+
svgToUri,
12+
} from "./utils";
813
import {
914
CenterAlignIcon,
1015
CopyIcon,

0 commit comments

Comments
 (0)