Skip to content

Commit

Permalink
Merge branch 'main' into gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
cjgammon committed Sep 2, 2024
2 parents 02f5a95 + a266b05 commit 495e295
Showing 1 changed file with 15 additions and 84 deletions.
99 changes: 15 additions & 84 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
--primary-color: #646cff;
}

a {
font-weight: 500;
color: #646cff;
color: var(--primary-color);
text-decoration: inherit;
}
a:hover {
Expand Down Expand Up @@ -50,27 +51,6 @@ h1 {
align-items: center;
}

.logo {
height: 6em;
padding: 1.5em;
will-change: filter;
transition: filter 300ms;
}
.logo:hover {
filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.vanilla:hover {
filter: drop-shadow(0 0 2em #f7df1eaa);
}

.card {
padding: 2em;
}

.read-the-docs {
color: #888;
}

button {
border-radius: 8px;
border: 1px solid transparent;
Expand All @@ -83,30 +63,19 @@ button {
transition: border-color 0.25s;
}
button:hover {
border-color: #646cff;
border-color: var(--primary-color);
}
button:focus,
button:focus-visible {
outline: 4px auto -webkit-focus-ring-color;
}

@media (prefers-color-scheme: light) {
:root {
color: #213547;
background-color: #ffffff;
}
a:hover {
color: #747bff;
}
button {
background-color: #f9f9f9;
}
}

/* Add these new styles for the game grid */
#game-grid-container {
padding: 5px;
border-radius: 4px;
padding: 10px;
border-radius: 10px;
background: linear-gradient(to bottom, #1a1a1a, #000000);
border: 2px solid #2a2a2a;
}

#game-grid {
Expand All @@ -125,28 +94,12 @@ button:focus-visible {
font-size: 24px;
cursor: pointer;
border-radius: 4px;
transition: background-color 0.3s;
outline: 2px solid transparent;
transition: background-color 0.3s, outline 0.2s;
/* Add this line to ensure the cell can receive dropped items */
min-height: 40px;
}

.grid-cell:hover {
background-color: #2a2a2a;
}

/* Add this media query at the end of the file */
@media (prefers-color-scheme: light) {
/* ... existing light mode styles ... */

.grid-cell {
background-color: #f0f0f0;
}

.grid-cell:hover {
background-color: #d0d0d0;
}
}

/* Add styles for the Tetris piece bank */
#game-container {
display: flex;
Expand All @@ -163,7 +116,7 @@ button:focus-visible {
}

.tetris-piece {
border: 2px solid #646cff;
border: 2px solid var(--primary-color);
border-radius: 4px;
cursor: grab;
padding: 5px;
Expand Down Expand Up @@ -211,25 +164,16 @@ button:focus-visible {
background-color: transparent;
}

/* Update this media query */
@media (prefers-color-scheme: light) {
/* ... existing light mode styles ... */

.tetris-piece {
border-color: #535bf2;
background-color: rgba(0, 0, 0, 0.1);
}
}

/* Add styles for the hover preview */
.grid-cell.preview {
outline: 2px solid #00f;
outline: 2px solid var(--primary-color);
background-color: rgba(255, 255, 255, 0.1);
z-index: 1;
position: relative;
}

.tetris-piece.selected {
box-shadow: 0 0 10px #646cff;
box-shadow: 0 0 10px var(--primary-color);
}

/* Add styles for the score display */
Expand All @@ -244,7 +188,7 @@ button:focus-visible {
margin-top: 20px;
padding: 10px 20px;
font-size: 16px;
background-color: #646cff;
background-color: var(--primary-color);
color: white;
border: none;
border-radius: 5px;
Expand All @@ -253,18 +197,5 @@ button:focus-visible {
}

#reset-button:hover {
background-color: #535bf2;
}

/* Update this media query */
@media (prefers-color-scheme: light) {
/* ... existing light mode styles ... */

#reset-button {
background-color: #535bf2;
}

#reset-button:hover {
background-color: #4449d0;
}
background-color: color-mix(in srgb, var(--primary-color) 80%, white);
}

0 comments on commit 495e295

Please sign in to comment.