Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scale promo piece size relative to screen width #2111

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions src/styl/game.styl
Original file line number Diff line number Diff line change
Expand Up @@ -280,20 +280,23 @@
background-image url(../../images/pieces/mono/K.svg)

#promotion_choice
--overlay-height 100px
border 1px solid black
background-color rgba(255,255,255, 0.7)
position absolute
top calc((100vh - 100px) / 2)
height 100px
top calc((100vh - var(--overlay-height)) / 2)
height var(--overlay-height)
width 100%
text-align center
display flex
justify-content center
align-items center
column-gap 5px
piece
position relative
display inline-block
width 60px
height 60px
margin 0 5px
top 17px
width calc(min(12.5%, var(--overlay-height)))
// CSS hack: padding-bottom is calculated based on width of parent, so we can get a square div here
height 0
padding-bottom calc(min(12.5%, var(--overlay-height)))

.tableHeader
display flex
Expand Down