Skip to content

Commit 71cb398

Browse files
author
Mateus Medeiros
committed
Fix reflow problem
1 parent 6723731 commit 71cb398

3 files changed

Lines changed: 46 additions & 40 deletions

File tree

src/webapp/src/app/home/home.component.html

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,20 @@ <h1 class="hero-headline text-display">
1919

2020
<!-- Value chips -->
2121
<div class="value-chips">
22-
<mat-chip-listbox aria-label="Key features">
23-
<mat-chip-option disabled>
24-
<mat-icon>newspaper</mat-icon>
25-
Daily news
26-
</mat-chip-option>
27-
<mat-chip-option disabled>
28-
<mat-icon>flash_on</mat-icon>
29-
Instant feedback
30-
</mat-chip-option>
31-
<mat-chip-option disabled>
32-
<mat-icon>trending_up</mat-icon>
33-
Beginner → Advanced
34-
</mat-chip-option>
35-
</mat-chip-listbox>
22+
<ul class="value-chip-list" aria-label="Key features">
23+
<li class="value-chip" aria-disabled="true">
24+
<mat-icon aria-hidden="true">newspaper</mat-icon>
25+
<span>Daily news</span>
26+
</li>
27+
<li class="value-chip" aria-disabled="true">
28+
<mat-icon aria-hidden="true">flash_on</mat-icon>
29+
<span>Instant feedback</span>
30+
</li>
31+
<li class="value-chip" aria-disabled="true">
32+
<mat-icon aria-hidden="true">trending_up</mat-icon>
33+
<span>Beginner → Advanced</span>
34+
</li>
35+
</ul>
3636
</div>
3737

3838
<!-- Mini stats row -->

src/webapp/src/app/home/home.component.scss

Lines changed: 32 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -93,34 +93,42 @@
9393
// Value chips
9494
.value-chips {
9595
margin-top: 0.5rem;
96+
}
9697

97-
mat-chip-listbox {
98-
display: flex;
99-
gap: 0.5rem;
100-
flex-wrap: wrap;
101-
pointer-events: none;
98+
.value-chip-list {
99+
display: flex;
100+
gap: 0.5rem;
101+
flex-wrap: wrap;
102+
list-style: none;
103+
margin: 0;
104+
padding: 0;
105+
}
106+
107+
@media (max-width: 600px) {
108+
.value-chip-list {
109+
justify-content: center;
102110
}
111+
}
103112

104-
mat-chip-option {
105-
pointer-events: none;
106-
background-color: rgba(58, 125, 255, 0.1) !important;
107-
color: vars.$color-primary !important;
108-
border: 1px solid rgba(58, 125, 255, 0.2);
109-
font-weight: 500;
110-
padding: 0.5rem 1rem;
111-
display: inline-flex !important;
112-
align-items: center !important;
113-
gap: 0.35rem;
114-
line-height: 1.125rem;
113+
.value-chip {
114+
background-color: rgba(58, 125, 255, 0.1);
115+
color: vars.$color-primary;
116+
border: 1px solid rgba(58, 125, 255, 0.2);
117+
font-weight: 500;
118+
padding: 0.5rem 1rem;
119+
display: inline-flex;
120+
align-items: center;
121+
gap: 0.35rem;
122+
line-height: 1.125rem;
123+
border-radius: 999px;
115124

116-
mat-icon {
117-
font-size: 1.125rem;
118-
width: 1.125rem;
119-
height: 1.125rem;
120-
line-height: 1.125rem;
121-
vertical-align: middle;
122-
margin-top: -0.125rem;
123-
}
125+
mat-icon {
126+
font-size: 1.125rem;
127+
width: 1.125rem;
128+
height: 1.125rem;
129+
line-height: 1.125rem;
130+
vertical-align: middle;
131+
margin-top: -0.125rem;
124132
}
125133
}
126134

src/webapp/src/app/home/home.component.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { CommonModule } from '@angular/common';
33
import { RouterLink } from '@angular/router';
44
import { MatButtonModule } from '@angular/material/button';
55
import { MatIconModule } from '@angular/material/icon';
6-
import { MatChipsModule } from '@angular/material/chips';
76
import { MatCardModule } from '@angular/material/card';
87
import { ExerciseGridComponent } from '../shared/exercise-grid/exercise-grid.component';
98
import { BrowserService } from '../core/services/browser.service';
@@ -17,7 +16,6 @@ import { SeoService } from '../core/services/seo.service';
1716
RouterLink,
1817
MatButtonModule,
1918
MatIconModule,
20-
MatChipsModule,
2119
MatCardModule,
2220
ExerciseGridComponent,
2321
],

0 commit comments

Comments
 (0)