Skip to content

Commit 7ba98e4

Browse files
Mnickiigavinbarron
andauthored
fix: add login custom styles, removes style not in use (#2587)
* remove style not in use, add custom styling tokens * fix account-item hover --------- Co-authored-by: Gavin Barron <[email protected]>
1 parent 9013fd2 commit 7ba98e4

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

packages/mgt-components/src/components/mgt-login/mgt-login.scss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ $signed-out-bg: padding-box linear-gradient(var(--neutral-fill-rest), var(--neut
1414
$signed-out-background: #{var(--login-signed-out-button-background, $signed-out-bg)};
1515
$signed-out-hover-background: #{var(--login-signed-out-button-hover-background, var(--neutral-fill-stealth-hover))};
1616
$login-popup-background-color: #{var(--login-popup-background-color, var(--neutral-layer-1))};
17+
$login-account-item-hover-bg-color: #{var(--login-account-item-hover-bg-color, var(--neutral-fill-stealth-hover))};
1718
$button-padding: var(--login-button-padding, 0);
19+
$login-flyout-command-text-color: #{var(--login-flyout-command-text-color, var(--accent-foreground-rest))};
1820

1921
:host {
2022
.signed-in-person {
@@ -108,13 +110,15 @@ $button-padding: var(--login-button-padding, 0);
108110
list-style-type: none;
109111

110112
&:hover {
111-
background: var(--neutral-fill-stealth-hover);
113+
background: $login-account-item-hover-bg-color;
114+
115+
--person-background-color: $login-account-item-hover-bg-color;
112116
}
113117
}
114118

115119
.flyout {
116120
.flyout-command {
117-
color: var(--accent-foreground-rest);
121+
color: $login-flyout-command-text-color;
118122
}
119123

120124
.popup {

packages/mgt-components/src/components/mgt-login/mgt-login.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ type PersonViewConfig = {
7171
* @cssprop --login-signed-out-button-text-color - {Color} the background color of the component when signed out.
7272
* @cssprop --login-button-padding - {Length} the padding of the button. Default is 0px.
7373
* @cssprop --login-popup-background-color - {Color} the background color of the popup.
74-
* @cssprop --login-popup-text-color - {Color} the color of the text in the popup.
7574
* @cssprop --login-popup-command-button-background-color - {Color} the color of the background to the popup command button.
7675
* @cssprop --login-popup-padding - {Length} the padding applied to the popup card. Default is 16px.
7776
* @cssprop --login-add-account-button-text-color - {Color} the color for the text and icon of the add account button.
@@ -80,6 +79,8 @@ type PersonViewConfig = {
8079
* @cssprop --login-command-button-text-color - {Color} the color for the text of the command button.
8180
* @cssprop --login-command-button-background-color - {Color} the color for the background of the command button.
8281
* @cssprop --login-command-button-hover-background-color - {Color} the color for the background of the command button on hovering.
82+
* @cssprop --login-account-item-hover-bg-color - {Color} the background color of the account item on hover.
83+
* @cssprop --login-flyout-command-text-color - {Color} the color for the text of the flyout command button.
8384
*/
8485
@customElement('login')
8586
export class MgtLogin extends MgtTemplatedComponent {

stories/components/login/login.styles.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ export const customCSSProperties = () => html`
2525
--login-signed-in-hover-background: green;
2626
--login-button-padding:5px;
2727
--login-popup-background-color: blue;
28-
--login-popup-text-color: brown;
2928
--login-popup-command-button-background-color: orange;
3029
--login-popup-padding: 8px;
3130
--login-add-account-button-text-color: yellow;
@@ -34,6 +33,8 @@ export const customCSSProperties = () => html`
3433
--login-command-button-background-color: orange;
3534
--login-command-button-hover-background-color: purple;
3635
--login-command-button-text-color: black;
36+
--login-account-item-hover-bg-color: black;
37+
--login-flyout-command-text-color: maroon;
3738
3839
/** person component tokens **/
3940
--person-line1-text-color: whitesmoke;

0 commit comments

Comments
 (0)