Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] Corriger l'affichage des icônes sur les composants (PIX-15304) #761

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 37 additions & 9 deletions addon/styles/_pix-banner.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
&--information {
color: var(--pix-info-700);
background-color: var(--pix-info-50);
fill: var(--pix-info-700);

.pix-icon-button {
color: currentcolor;
background-color: var(--pix-info-50);

&:hover:enabled,
Expand All @@ -52,9 +52,9 @@
&--warning {
color: var(--pix-warning-700);
background-color: var(--pix-warning-50);
fill: var(--pix-warning-700);

.pix-icon-button {
color: currentcolor;
background-color: var(--pix-warning-50);

&:hover:enabled,
Expand All @@ -72,9 +72,9 @@
&--error {
color: var(--pix-error-700);
background-color: var(--pix-error-50);
fill: var(--pix-error-700);

.pix-icon-button {
color: currentcolor;
background-color: var(--pix-error-50);

&:hover:enabled,
Expand All @@ -92,18 +92,46 @@
&--communication {
color: var(--pix-neutral-0);
background-color: var(--pix-primary-500);
fill: var(--pix-neutral-0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Malheureusement les boutons restent noir et ne prennent pas la color plus haut.

Capture d’écran 2024-11-14 à 17 02 17

Proposition : créer une classe sur le pixIconButton de la PixBanner et y faire un color dessus ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C'est corrigé, j'ai réutilisé le .pix-icon-button pour ce modifier et les bannières de com Pix Orga / Pix Certif.

Je te laisse vérifier 😄


&-orga {
.pix-icon-button {
color: currentcolor;

&:hover:enabled,
&:focus:enabled,
&:active:enabled {
background-color: var(--pix-primary-300);
}
}
}

&--communication-orga {
color: var(--pix-neutral-0);
background-color: var(--pix-orga-500);
fill: var(--pix-neutral-0);

.pix-icon-button {
color: currentcolor;

&:hover:enabled,
&:focus:enabled,
&:active:enabled {
background-color: var(--pix-communication-light);
}
}
}

&-certif {
&--communication-certif {
color: var(--pix-neutral-0);
background-color: var(--pix-certif-500);
fill: var(--pix-neutral-0);

.pix-icon-button {
color: currentcolor;

&:hover:enabled,
&:focus:enabled,
&:active:enabled {
background-color: var(--pix-content-light);
}
}
}
}
}

9 changes: 0 additions & 9 deletions addon/styles/_pix-button-base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
&--primary {
color: var(--pix-neutral-0);
background-color: var(--pix-primary-500);
fill: var(--pix-neutral-0);

&:not([aria-disabled="true"]) {
&:hover {
Expand All @@ -54,13 +53,11 @@
&--primary-bis {
color: var(--pix-neutral-900);
background-color: var(--pix-secondary-500);
fill: var(--pix-neutral-900);

&:not([aria-disabled="true"]) {
&:hover {
color: var(--pix-neutral-0);
background-color: var(--pix-secondary-700);
fill: var(--pix-neutral-0);
}

&:focus,
Expand All @@ -69,14 +66,12 @@
background-color: var(--pix-secondary-700);
outline: 1px solid var(--pix-neutral-0);
outline-offset: -4px;
fill: var(--pix-neutral-0);
}

&:active {
color: var(--pix-neutral-0);
background-color: var(--pix-secondary-900);
outline: none;
fill: var(--pix-neutral-0);
}
}
}
Expand All @@ -85,7 +80,6 @@
color: var(--pix-primary-700);
background-color: transparent;
border: 2px solid var(--pix-primary-700);
fill: var(--pix-primary-700);

&:not([aria-disabled="true"]) {
&:hover {
Expand Down Expand Up @@ -115,7 +109,6 @@
color: var(--pix-neutral-800);
text-decoration: underline;
background-color: transparent;
fill: var(--pix-neutral-800);

&:not([aria-disabled="true"]) {
&:hover,
Expand All @@ -133,7 +126,6 @@
&--success {
color: var(--pix-neutral-0);
background-color: var(--pix-success-500);
fill: var(--pix-neutral-0);

&:not([aria-disabled="true"]) {
&:hover {
Expand All @@ -157,7 +149,6 @@
&--error {
color: var(--pix-neutral-0);
background-color: var(--pix-error-500);
fill: var(--pix-neutral-0);

&:not([aria-disabled="true"]) {
&:hover {
Expand Down
3 changes: 1 addition & 2 deletions addon/styles/_pix-collapsible.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
font-size: 1rem;
line-height: 1.25;
border: none;
fill: var(--pix-neutral-800);

&:hover,
&[aria-expanded='true'] {
Expand All @@ -59,7 +58,7 @@

&__icon {
margin-right: var(--pix-spacing-2x);
fill: var(--pix-neutral-500);
color: var(--pix-neutral-500);
}
}

Expand Down
6 changes: 3 additions & 3 deletions addon/styles/_pix-icon-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
min-width: 2.375rem;
height: 2.375rem;
padding: 0;
color: var(--pix-neutral-800);
background-color: transparent;
border: none;
border-radius: 50%;
outline: none;
cursor: pointer;
fill: var(--pix-neutral-800);

&__icon {
width: 1.35rem;
Expand All @@ -34,16 +34,16 @@
}

&:focus:enabled {
color: var(--pix-neutral-0);
background-color: var(--pix-neutral-800);
outline: 1px solid var(--pix-neutral-0);
outline-offset: -3px;
fill: var(--pix-neutral-0);
}

&:active:enabled {
color: var(--pix-neutral-800);
background-color: var(--pix-neutral-100);
outline: 0;
fill: var(--pix-neutral-800);
}

&--background {
Expand Down
12 changes: 6 additions & 6 deletions addon/styles/_pix-indicator-card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,31 @@

&--grey,
&--neutral {
color: var(--pix-neutral-500);
background-color: var(--pix-neutral-20);
fill: var(--pix-neutral-500);
}

&--blue,
&--primary {
color: var(--pix-primary-700);
background-color: var(--pix-primary-10);
fill: var(--pix-primary-700);
}

&--green,
&--success {
color: var(--pix-success-700);
background-color: var(--pix-success-50);
fill: var(--pix-success-700);
}

&--purple,
&--tertiary {
color: var(--pix-tertiary-900);
background-color: var(--pix-tertiary-100);
fill: var(--pix-tertiary-900);
}

&--warning {
color: var(--pix-warning-700);
background-color: var(--pix-warning-50);
fill: var(--pix-warning-700);
}
}

Expand Down Expand Up @@ -93,6 +93,6 @@
width: 1rem;
height:1rem;
margin: 0 var(--pix-spacing-2x);
fill: var(--pix-neutral-500);
color: var(--pix-neutral-500);
}
}
2 changes: 1 addition & 1 deletion addon/styles/_pix-input-password.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@
width: 1rem;
height: 1rem;
padding: 2px;
color: var(--pix-neutral-0);
border-radius: 50%;
fill: var(--pix-neutral-0);
}

&__error-icon {
Expand Down
2 changes: 0 additions & 2 deletions addon/styles/_pix-label-wrapped.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,13 @@
--state-border-color: var(--pix-success-300);

color: var(--pix-success-700);
fill: var(--pix-success-700);
}

&.pix-label-wrapped--state-error {
--state-background-color: var(--pix-neutral-0);
--state-border-color: var(--pix-error-500);

color: var(--pix-error-700);
fill: var(--pix-error-700);
}

& .pix-label-wrapped__state-icon {
Expand Down
5 changes: 0 additions & 5 deletions addon/styles/_pix-message.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,25 @@
&.pix-message--info {
color: var(--pix-info-700);
background-color: var(--pix-info-50);
fill: var(--pix-info-700);
}

&.pix-message--alert {
color: var(--pix-error-700);
background-color: var(--pix-error-50);
fill: var(--pix-info-700);
}

&.pix-message--error {
color: var(--pix-error-700);
background-color: var(--pix-error-50);
fill: var(--pix-error-700);
}

&.pix-message--success {
color: var(--pix-success-700);
background-color: var(--pix-success-50);
fill: var(--pix-success-700);
}

&.pix-message--warning {
color: var(--pix-warning-700);
background-color: var(--pix-warning-50);
fill: var(--pix-warning-700);
}
}
4 changes: 2 additions & 2 deletions addon/styles/_pix-multi-select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
}

&__search-icon {
fill: var(--pix-neutral-900);
color: var(--pix-neutral-900);
}

&__title {
Expand All @@ -58,8 +58,8 @@
&__dropdown-icon {
@extend %pix-body-s;

color: var(--pix-neutral-900);
pointer-events: none;
fill: var(--pix-neutral-900);
}
}

Expand Down
6 changes: 3 additions & 3 deletions addon/styles/_pix-select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
cursor: pointer;

&__icon {
fill: var(--pix-neutral-900);
color: var(--pix-neutral-900);
}

&--error {
Expand All @@ -119,8 +119,8 @@
&__dropdown-icon {
@extend %pix-body-s;

color: var(--pix-neutral-900);
pointer-events: none;
fill: var(--pix-neutral-900);
}
}

Expand Down Expand Up @@ -198,6 +198,6 @@

&__icon {
margin: auto var(--pix-spacing-1x);
fill: var(--pix-neutral-100)
color: var(--pix-neutral-100)
}
}
Loading