Fix windowControls padding

main
Jake Dexheimer 7 years ago
parent 2ee9bb0da5
commit dd40da7328

@ -51,8 +51,7 @@ const DEFAULT_SETTINGS = {
// create styles // create styles
const containerStyle = { const containerStyle = {
background: config.background, background: config.background,
padding: `${config.paddingVertical} ${config.paddingHorizontal}`, padding: `${config.paddingVertical} ${config.paddingHorizontal}`
paddingTop: `calc(${config.paddingVertical} - 19px)` // TODO fix hack: accomodates for space taken up by window controls
} }
// set content to spinner if loading, else editor // set content to spinner if loading, else editor

@ -61,10 +61,14 @@ export default () => (
.CodeMirror__container .CodeMirror { .CodeMirror__container .CodeMirror {
height: auto; height: auto;
min-width: 680px; min-width: 680px;
padding: 40px 18px 24px; padding: 24px 18px;
border-radius: 5px; border-radius: 5px;
} }
.window-controls + .CodeMirror__container > .CodeMirror {
padding-top: 40px;
}
.cm-s-dracula .CodeMirror-cursor { .cm-s-dracula .CodeMirror-cursor {
border-left: solid 2px #159588; border-left: solid 2px #159588;
} }

@ -1,7 +1,7 @@
import React from 'react' import React from 'react'
export default () => ( export default () => (
<div> <div className="window-controls">
<svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"> <svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14">
<g fill="none" fillRule="evenodd" transform="translate(1 1)"> <g fill="none" fillRule="evenodd" transform="translate(1 1)">
<circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" strokeWidth=".5"/> <circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" strokeWidth=".5"/>
@ -11,6 +11,7 @@ export default () => (
</svg> </svg>
<style jsx>{` <style jsx>{`
div { div {
margin-top: -19px;
position: relative; position: relative;
top: +30px; top: +30px;
margin-left: 18px; margin-left: 18px;

Loading…
Cancel
Save