Fix pastes being centered without JS
This commit is contained in:
parent
fc88a90703
commit
b3e77e37e0
@ -14,9 +14,11 @@ object Css {
|
|||||||
private const val borderpixels = 3
|
private const val borderpixels = 3
|
||||||
private const val bodyPadding = 20
|
private const val bodyPadding = 20
|
||||||
private const val inputPadding = 8
|
private const val inputPadding = 8
|
||||||
|
|
||||||
// Text areas apparently grow beyond their parent element if padding and/or borders are added.
|
// Text areas apparently grow beyond their parent element if padding and/or borders are added.
|
||||||
// They always grow to the right, so we simply add more padding to shift everything back (see usage of this).
|
// They always grow to the right, so we simply add more padding to shift everything back (see usage of this).
|
||||||
private const val bodyShift = bodyPadding + 2 * borderpixels + 2 * inputPadding
|
private const val bodyShift = bodyPadding + 2 * borderpixels + 2 * inputPadding
|
||||||
|
const val fonts = """Hack, "Jetbrains Mono", "Fira Code", "Noto Mono", monospace"""
|
||||||
|
|
||||||
private fun StyledElement.defaultBorder() = border(borderpixels.px, BorderStyle.solid, accent1)
|
private fun StyledElement.defaultBorder() = border(borderpixels.px, BorderStyle.solid, accent1)
|
||||||
|
|
||||||
@ -28,9 +30,8 @@ object Css {
|
|||||||
transition(duration = 400.ms)
|
transition(duration = 400.ms)
|
||||||
}
|
}
|
||||||
body {
|
body {
|
||||||
fontFamily = "Hack, Fira Code, Noto Mono, monospace"
|
fontFamily = fonts
|
||||||
fontSize = 13.pt
|
fontSize = 13.pt
|
||||||
textAlign = TextAlign.center
|
|
||||||
margin = "auto"
|
margin = "auto"
|
||||||
backgroundColor = bgcolor
|
backgroundColor = bgcolor
|
||||||
color = fontcolor
|
color = fontcolor
|
||||||
@ -44,9 +45,10 @@ object Css {
|
|||||||
form {
|
form {
|
||||||
width = 100.pct
|
width = 100.pct
|
||||||
marginTop = 0.px
|
marginTop = 0.px
|
||||||
|
textAlign = TextAlign.center
|
||||||
}
|
}
|
||||||
textarea {
|
textarea {
|
||||||
fontFamily = "Hack, Fira Code, Noto Mono, monospace"
|
fontFamily = fonts
|
||||||
backgroundColor = bgcolor
|
backgroundColor = bgcolor
|
||||||
color = Color.white
|
color = Color.white
|
||||||
fontSize = 13.pt
|
fontSize = 13.pt
|
||||||
@ -61,7 +63,7 @@ object Css {
|
|||||||
width = 95.pct
|
width = 95.pct
|
||||||
height = 100.pct
|
height = 100.pct
|
||||||
textAlign = TextAlign.left
|
textAlign = TextAlign.left
|
||||||
fontFamily = "Hack, Fira Code, Noto Mono, monospace"
|
fontFamily = fonts
|
||||||
fontSize = 13.pt
|
fontSize = 13.pt
|
||||||
display = Display.inline
|
display = Display.inline
|
||||||
position = Position.relative
|
position = Position.relative
|
||||||
|
Loading…
Reference in New Issue
Block a user