diff options
Diffstat (limited to 'sw-ui')
3 files changed, 8 insertions, 8 deletions
diff --git a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/GlobalStyles.kt b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/GlobalStyles.kt index f9ea80b5..a4ffed64 100644 --- a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/GlobalStyles.kt +++ b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/GlobalStyles.kt @@ -27,15 +27,15 @@ object GlobalStyles : StyleSheet("GlobalStyles", isStatic = true) { val fixedCenter by css { position = Position.fixed - left = 50.pct - top = 50.pct - transform { - translate((-50).pct, (-50).pct) - } + +centerLeftTopTransform } - val centerInParent by css { + val centerInPositionedParent by css { position = Position.absolute + +centerLeftTopTransform + } + + val centerLeftTopTransform by css { left = 50.pct top = 50.pct transform { diff --git a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/PreparedMove.kt b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/PreparedMove.kt index 3cb230e0..1acaacdf 100644 --- a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/PreparedMove.kt +++ b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/PreparedMove.kt @@ -54,7 +54,7 @@ fun RBuilder.preparedMove( private fun StyledDOMBuilder<DIV>.discardText() { styledDiv { css { - +GlobalStyles.centerInParent + +GlobalStyles.centerInPositionedParent +GameStyles.discardMoveText } +"DISCARD" diff --git a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/Tokens.kt b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/Tokens.kt index 846a9f07..3df359ed 100644 --- a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/Tokens.kt +++ b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/Tokens.kt @@ -112,7 +112,7 @@ fun RBuilder.tokenWithCount( tokenImage(tokenName, title = title, size = imgSize) styledSpan { css { - +GlobalStyles.centerInParent + +GlobalStyles.centerInPositionedParent tokenCountStyle(tokenCountSize, brightText, customCountStyle) } +"$count" |