Skip to content

Commit 2b61d99

Browse files
committed
Wrap mod list in score page
The original structure was so mods don't really affect overall action alignment but looking again it doesn't seem to really matter anyway.
1 parent 57cc0f2 commit 2b61d99

File tree

2 files changed

+17
-15
lines changed

2 files changed

+17
-15
lines changed

resources/css/bem/score-player.less

+12-8
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
// See the LICENCE file in the repository root for full licence text.
33

44
.score-player {
5-
&__mod {
6-
margin: 3px;
7-
font-size: 22px; // icon size
8-
flex: none;
5+
width: 250px;
6+
max-width: 100%;
7+
@media @desktop {
8+
width: auto;
99
}
1010

1111
&__mods {
12-
margin: -3px;
12+
font-size: 22px; // icon size
1313
display: flex;
14-
position: absolute;
15-
top: -5px;
14+
flex-wrap: wrap;
15+
gap: 2px;
1616
}
1717

1818
&__row {
@@ -29,6 +29,10 @@
2929
grid-template-columns: max-content;
3030
grid-gap: 0 10px;
3131
}
32+
33+
&--score {
34+
display: grid;
35+
}
3236
}
3337

3438
&__rank {
@@ -50,7 +54,7 @@
5054
&__score {
5155
font-size: @font-size--large-4;
5256
font-weight: 300;
53-
margin-bottom: -10px;
57+
line-height: 1;
5458
@media @desktop {
5559
font-size: @font-size--extra-large;
5660
}

resources/js/scores-show/player.tsx

+5-7
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,15 @@ export default function Player(props: Props) {
2828
return (
2929
<div className='score-player'>
3030
<div className='score-player__row score-player__row--score'>
31-
<div className='score-player__score'>
32-
{formatNumber(totalScore(props.score))}
33-
</div>
34-
3531
<div className='score-player__mods'>
3632
{filterMods(props.score).map((mod) => (
37-
<div key={mod.acronym} className='score-player__mod'>
38-
<Mod mod={mod} />
39-
</div>
33+
<Mod key={mod.acronym} mod={mod} />
4034
))}
4135
</div>
36+
37+
<div className='score-player__score'>
38+
{formatNumber(totalScore(props.score))}
39+
</div>
4240
</div>
4341

4442
<div className='score-player__row score-player__row--player'>

0 commit comments

Comments
 (0)