-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added 2048; Cleaned up and organized files.
- Loading branch information
1 parent
a9c80c3
commit 41cd9e9
Showing
9 changed files
with
501 additions
and
68 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,210 @@ | ||
/* MAIN CONTAINERS */ | ||
.overflow-container { | ||
overflow-x: auto; | ||
} | ||
|
||
.game-container, .dashboard { | ||
width: 540px; | ||
margin: 50px auto; | ||
border: 8px outset white; | ||
display: flex; | ||
color: white; | ||
} | ||
|
||
.game-container { | ||
height: 540px; | ||
margin-top: 20px; | ||
} | ||
|
||
.dashboard { | ||
height: 50px; | ||
margin-bottom: 10px; | ||
justify-content: space-around; | ||
align-items: center; | ||
font-size: 24px; | ||
font-weight: bold; | ||
} | ||
|
||
.reset { | ||
font-size: 24px; | ||
height: 36px; | ||
border: 2px outset black; | ||
} | ||
|
||
.reset:hover { | ||
color: white; | ||
background-color: black; | ||
border-style: inset; | ||
} | ||
/* ********** */ | ||
|
||
/* GRID */ | ||
.grid, .grid-row { | ||
display: flex; | ||
flex-wrap: wrap; | ||
} | ||
|
||
.grid { | ||
flex-direction: column; | ||
} | ||
|
||
.grid-row { | ||
border-bottom: 8px solid white; | ||
} | ||
|
||
.grid-row:last-child { | ||
border-bottom: none; | ||
} | ||
|
||
.grid-block { | ||
width: 129px; | ||
height: 129px; | ||
border-right: 8px solid white; | ||
background-color: black; | ||
} | ||
|
||
.grid-block:last-child { | ||
border-right: none; | ||
} | ||
/* ********** */ | ||
|
||
|
||
/*POSITIONS*/ | ||
|
||
.pos-1-1 { | ||
transform: translate(0, 0); | ||
} | ||
|
||
.pos-1-2 { | ||
transform: translate(137px, 0); | ||
} | ||
|
||
.pos-1-3 { | ||
transform: translate(274px, 0); | ||
} | ||
|
||
.pos-1-4 { | ||
transform: translate(411px, 0); | ||
} | ||
|
||
.pos-2-1 { | ||
transform: translate(0, 137px); | ||
} | ||
|
||
.pos-2-2 { | ||
transform: translate(137px, 137px); | ||
} | ||
|
||
.pos-2-3 { | ||
transform: translate(274px, 137px); | ||
} | ||
|
||
.pos-2-4 { | ||
transform: translate(411px, 137px); | ||
} | ||
|
||
.pos-3-1 { | ||
transform: translate(0, 274px); | ||
} | ||
|
||
.pos-3-2 { | ||
transform: translate(137px, 274px); | ||
} | ||
|
||
.pos-3-3 { | ||
transform: translate(274px, 274px); | ||
} | ||
|
||
.pos-3-4 { | ||
transform: translate(411px, 274px); | ||
} | ||
|
||
.pos-4-1 { | ||
transform: translate(0, 411px); | ||
} | ||
|
||
.pos-4-2 { | ||
transform: translate(137px, 411px); | ||
} | ||
|
||
.pos-4-3 { | ||
transform: translate(274px, 411px); | ||
} | ||
|
||
.pos-4-4 { | ||
transform: translate(411px, 411px); | ||
} | ||
/* ********** */ | ||
|
||
/* TILES */ | ||
.tile-container { | ||
position: absolute; | ||
width: 540px; | ||
height: 540px; | ||
} | ||
|
||
@keyframes tile-pop { | ||
50% {transform: scale(1.1);} | ||
100% {transform: scale(1);} | ||
} | ||
|
||
@keyframes tile-grow { | ||
0% {transform: scale(0.1);} | ||
100% {transform: scale(1);} | ||
} | ||
|
||
.tile { | ||
line-height: 129px; | ||
font-size: 48px; | ||
text-align: center; | ||
position: absolute; | ||
width: 129px; | ||
height: 129px; | ||
transition: all 0.25s; | ||
} | ||
|
||
.inner-tile { | ||
color: white; | ||
background-color: #33B5FF; | ||
animation-duration: 0.25s; | ||
animation-timing-function:ease-in; | ||
} | ||
/* ********** */ | ||
|
||
/*MESSAGES*/ | ||
|
||
@keyframes fadeIn { | ||
0% {opacity: 0%;} | ||
100% {opacity: 90%;} | ||
} | ||
|
||
.win-message, .lose-message { | ||
position: absolute; | ||
font-weight: bold; | ||
width: 540px; | ||
height: 540px; | ||
opacity: 0%; | ||
font-size: 48px; | ||
margin-top: auto; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
|
||
.win-message { | ||
color: black; | ||
background-color: gold; | ||
} | ||
|
||
.lose-message { | ||
color: white; | ||
background-color: black; | ||
text-align: center; | ||
} | ||
|
||
.fade-in-animation { | ||
opacity: 90%; | ||
animation-name: fadeIn; | ||
animation-duration: 2s; | ||
} | ||
/* ********** */ |
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
Oops, something went wrong.