Skip to content

Commit 0961be2

Browse files
committed
Make sure current word is not transparent
1 parent 7e7f442 commit 0961be2

2 files changed

Lines changed: 28 additions & 18 deletions

File tree

src/Rounds.module.css

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
.container {
22
height: 35%;
3-
mask-image: linear-gradient(transparent, rgb(0 0 0 / 100%));
4-
overflow: hidden;
5-
6-
gap: 1.5vw;
73
}
84

95
/* double specificity to override other style */
10-
.container.container {
6+
.container.container,
7+
.innerContainer.innerContainer {
118
justify-content: flex-end;
129
}
10+
11+
.innerContainer {
12+
flex-grow: 1;
13+
mask-image: linear-gradient(transparent, rgb(0 0 0 / 100%));
14+
}
15+
16+
.container,
17+
.innerContainer {
18+
gap: 1.5vw;
19+
overflow: hidden;
20+
}

src/Rounds.tsx

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,21 @@ type Props = {
1212
export default function Rounds({ currentRound, finishedRounds }: Props) {
1313
return (
1414
<div className={`${styles.container} centered-container flex-col`}>
15-
{finishedRounds.map(({ wordUnscrambled: word, status }, index) => (
16-
<Word
17-
key={index}
18-
word={word}
19-
color={
20-
status === "guessed"
21-
? "positive"
22-
: status === "skipped"
23-
? "negative"
24-
: undefined
25-
}
26-
/>
27-
))}
15+
<div className={`${styles.innerContainer} centered-container flex-col`}>
16+
{finishedRounds.map(({ wordUnscrambled: word, status }, index) => (
17+
<Word
18+
key={index}
19+
word={word}
20+
color={
21+
status === "guessed"
22+
? "positive"
23+
: status === "skipped"
24+
? "negative"
25+
: undefined
26+
}
27+
/>
28+
))}
29+
</div>
2830
{currentRound && <Word word={currentRound.wordScrambled} />}
2931
</div>
3032
);

0 commit comments

Comments
 (0)