Skip to content

Commit 7015cd0

Browse files
committed
fix(portal-next): adjust colors to m3 palette
1 parent d54354b commit 7015cd0

File tree

8 files changed

+31
-29
lines changed

8 files changed

+31
-29
lines changed

gravitee-apim-portal-webui-next/src/components/api-filter/api-filter.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<mat-icon>expand_more</mat-icon>
3333
</mat-button-toggle>
3434
</mat-button-toggle-group>
35-
<mat-menu #restOfFilters="matMenu">
35+
<mat-menu #restOfFilters="matMenu" xPosition="before">
3636
@for (filter of filterList | slice: 4; track filter.id) {
3737
<button class="m3-label-large" mat-menu-item (click)="selectOption(filter)">{{ filter.name }}</button>
3838
}

gravitee-apim-portal-webui-next/src/components/api-filter/api-filter.component.scss

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,13 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
@import '../../scss/theme/theme';
1716

1817
.api-filter {
1918
--mat-standard-button-toggle-shape: 100px;
20-
21-
height: 40px;
22-
align-items: center;
19+
--mat-standard-button-toggle-selected-state-background-color: var(--mdc-filled-button-container-color);
20+
--mat-standard-button-toggle-selected-state-text-color: var(--mdc-filled-button-label-text-color);
2321

2422
&__button {
25-
padding: 0 12px;
26-
27-
--mat-standard-button-toggle-selected-state-background-color: #eaddff;
23+
min-width: 130px;
2824
}
2925
}

gravitee-apim-portal-webui-next/src/components/nav-bar/nav-bar-button/nav-bar-button.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
-->
1818
<span [routerLink]="path" routerLinkActive #rla="routerLinkActive">
1919
@if (rla.isActive) {
20-
<button [routerLink]="path" mat-flat-button color="accent">
20+
<button [routerLink]="path" mat-flat-button color="primary">
2121
<ng-container *ngTemplateOutlet="buttonLabel"></ng-container>
2222
</button>
2323
} @else {

gravitee-apim-portal-webui-next/src/components/nav-bar/nav-bar.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<app-user-avatar [user]="currentUser()" />
2626
} @else {
2727
<app-nav-bar-button i18n="@@logIn" [path]="['log-in']">Log in</app-nav-bar-button>
28-
<button i18n="@@signUp" mat-flat-button color="primary">Sign up</button>
28+
<button i18n="@@signUp" mat-flat-button class="secondary-button">Sign up</button>
2929
}
3030
</div>
3131
</div>

gravitee-apim-portal-webui-next/src/components/page-tree/page-tree.component.scss

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,17 @@
2222

2323
.file-tree {
2424
&__node {
25-
border-radius: 28px;
26-
font-weight: 600;
25+
border-radius: var(--mat-list-active-indicator-shape);
26+
color: var(--mdc-list-list-item-label-text-color);
27+
font-family: var(--mdc-list-list-item-label-text-font);
28+
font-size: var(--mdc-list-list-item-label-text-size);
29+
font-weight: var(--mdc-list-list-item-label-text-weight);
30+
letter-spacing: var(--mdc-list-list-item-label-text-tracking);
31+
line-height: var(--mdc-list-list-item-label-text-line-height);
2732
transition: 0.1s;
2833

2934
&:hover {
30-
background-color: theme.$secondary-main-color;
35+
background-color: color-mix(in srgb, var(--mdc-list-list-item-hover-state-layer-color), transparent 90%);
3136
}
3237

3338
&__container {
@@ -45,5 +50,6 @@
4550
}
4651

4752
.active {
48-
background-color: theme.$secondary-main-color;
53+
background-color: var(--mat-list-active-indicator-color);
54+
color: var(--mdc-list-list-item-selected-trailing-icon-color);
4955
}

gravitee-apim-portal-webui-next/src/components/user-avatar/user-avatar.component.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
limitations under the License.
1616
1717
-->
18-
<button class="user-avatar m3-title-medium" [matMenuTriggerFor]="user">{{ initials }}</button>
18+
<button mat-stroked-button color="primary" class="user-avatar m3-title-medium" [matMenuTriggerFor]="user">
19+
{{ initials }}
20+
</button>
1921
<mat-menu #user="matMenu">
2022
<button i18n="@@userAvatarMenuLogOut" mat-menu-item [routerLink]="['log-out']">Log out</button>
2123
</mat-menu>

gravitee-apim-portal-webui-next/src/components/user-avatar/user-avatar.component.scss

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,10 @@
1616
@import '../../scss/theme/theme';
1717

1818
.user-avatar {
19+
--mdc-outlined-button-container-height: 48px;
20+
--mdc-outlined-button-container-shape: 50%;
21+
--mdc-outlined-button-label-text-transform: uppercase;
22+
1923
width: 48px;
20-
height: 48px;
21-
border: none;
22-
border-radius: 50%;
23-
background-color: $banner-background-color;
24-
color: $banner-text-color;
25-
cursor: pointer;
26-
text-transform: uppercase;
24+
min-width: 48px;
2725
}

gravitee-apim-portal-webui-next/src/scss/theme/m3-theme.scss

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ NOTE: This file is to be deleted once material 3 has an easier way to create pal
3131
35: hsl($h, $s, calc($l * 0.7)),
3232
40: hsl($h, $s, calc($l * 0.8)),
3333
50: hsl($h, $s, $l),
34-
60: hsl($h, $s, calc($l + (100 - l) * 0.2)),
35-
70: hsl($h, $s, calc($l + (100 - l) * 0.4)),
36-
80: hsl($h, $s, calc($l + (100 - l) * 0.6)),
37-
90: hsl($h, $s, calc($l + (100 - l) * 0.8)),
38-
95: hsl($h, $s, calc($l + (100 - l) * 0.9)),
39-
98: hsl($h, $s, calc($l + (100 - l) * 0.96)),
40-
99: hsl($h, $s, calc($l + (100 - l) * 0.98)),
34+
60: hsl($h, $s, calc($l + (100% - $l) * 0.2)),
35+
70: hsl($h, $s, calc($l + (100% - $l) * 0.4)),
36+
80: hsl($h, $s, calc($l + (100% - $l) * 0.6)),
37+
90: hsl($h, $s, calc($l + (100% - $l) * 0.8)),
38+
95: hsl($h, $s, calc($l + (100% - $l) * 0.9)),
39+
98: hsl($h, $s, calc($l + (100% - $l) * 0.96)),
40+
99: hsl($h, $s, calc($l + (100% - $l) * 0.98)),
4141
100: hsl($h, $s, 100%)
4242
);
4343
}

0 commit comments

Comments
 (0)