Skip to content

Commit

Permalink
Update styles.css
Browse files Browse the repository at this point in the history
improvements made to the CSS for better visual appearance, consistent card sizing, and improved drag-and-drop functionality.
  • Loading branch information
nikki-05 authored Jul 2, 2024
1 parent 011810f commit 7bd6df9
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions Games/Single_Player_Solitaire/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ body {
#game-board {
display: grid;
grid-template-areas:
"stock waste foundations foundations foundations foundations"
"tableau tableau tableau tableau tableau tableau tableau";
"stock waste . . foundations foundations foundations foundations"
"tableau tableau tableau tableau tableau tableau tableau tableau";
gap: 10px;
padding: 10px;
background-color: #388E3C;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
max-width: 90%;
}

.card-pile {
Expand All @@ -44,7 +45,8 @@ body {
}

.foundation {
flex: 1;
width: 100px;
height: 140px;
}

#tableau {
Expand All @@ -57,6 +59,7 @@ body {
flex: 1;
display: flex;
flex-direction: column;
position: relative;
}

.card {
Expand All @@ -65,21 +68,22 @@ body {
border-radius: 10px;
background-color: white;
border: 2px solid #000;
position: absolute;
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
user-select: none;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
transition: transform 0.2s;
transition: transform 0.2s, box-shadow 0.2s;
font-family: 'Georgia', serif;
font-weight: bold;
color: #000;
position: absolute;
}

.card.dragging {
opacity: 0.5;
z-index: 1000;
}

.card.face-down {
Expand Down Expand Up @@ -125,6 +129,7 @@ body {
.card.spades .suit {
color: black;
}

#controls {
margin-top: 20px;
text-align: center;
Expand All @@ -135,6 +140,16 @@ body {
padding: 10px 20px;
font-size: 16px;
cursor: pointer;
background-color: #abc1ac;
color: white;
border: none;
border-radius: 5px;
transition: background-color 0.3s;
}

#new-game-button:hover,
#hint-button:hover {
background-color: #bad2bb;
}

#win-message {
Expand Down

0 comments on commit 7bd6df9

Please sign in to comment.