-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(app-board): improve widget position and background
- Loading branch information
Showing
9 changed files
with
76 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
packages/game-app/src/gameView/components/Board/Board.styled.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import styled, { css } from 'styled-components'; | ||
|
||
export const BoardContainer = styled.div<{ scale: number }>` | ||
background-color: #eeeeee; | ||
width: 3840px; | ||
height: 2160px; | ||
padding: 16px; | ||
position: relative; | ||
${({ scale }) => | ||
scale > 0 && | ||
css` | ||
background-image: linear-gradient( | ||
0deg, | ||
transparent 24%, | ||
rgba(0, 0, 0, 0.05) 25%, | ||
rgba(0, 0, 0, 0.05) 26%, | ||
transparent 27%, | ||
transparent 74%, | ||
rgba(0, 0, 0, 0.05) 75%, | ||
rgba(0, 0, 0, 0.05) 76%, | ||
transparent 77%, | ||
transparent | ||
), | ||
linear-gradient( | ||
90deg, | ||
transparent 24%, | ||
rgba(0, 0, 0, 0.05) 25%, | ||
rgba(0, 0, 0, 0.05) 26%, | ||
transparent 27%, | ||
transparent 74%, | ||
rgba(0, 0, 0, 0.05) 75%, | ||
rgba(0, 0, 0, 0.05) 76%, | ||
transparent 77%, | ||
transparent | ||
); | ||
`} | ||
${({ scale }) => scale >= 4 && 'background-size:15px 15px;'} | ||
${({ scale }) => scale >= 2 && scale < 4 && 'background-size:30px 30px;'} | ||
${({ scale }) => scale >= 1 && scale < 2 && 'background-size:60px 60px;'} | ||
${({ scale }) => scale > 0 && scale < 1 && 'background-size:120px 120px;'} | ||
`; | ||
|
||
BoardContainer.displayName = 'BoardContainer'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters