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

Update Woo rebrand auth signin and magic link pages #97058

Merged
merged 2 commits into from
Dec 5, 2024
Merged
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
4 changes: 1 addition & 3 deletions client/blocks/login/continue-as-user.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,7 @@ export default function ContinueAsUser( {
busy={ validatingPath }
href={ validatedPath || '/' }
>
{ `${ translate( 'Continue as', {
context: 'Continue as an existing WordPress.com user',
} ) } ${ userName }` }
{ translate( 'Continue' ) }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changes meant outside of feature flag

</Button>
</div>
);
Expand Down
4 changes: 2 additions & 2 deletions client/blocks/login/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,8 @@ class Login extends Component {
headerText = <h3>{ translate( 'Log in to your account' ) }</h3>;
const poweredByWpCom = (
<>
{ translate( 'Log in with your WordPress.com account.' ) }
<br />
{ translate( 'Log in with your WordPress.com account.' ) }{ ' ' }
<br className="hide-on-desktop" />
</>
);

Expand Down
138 changes: 101 additions & 37 deletions client/layout/masterbar/woo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,87 @@

$breakpoint-mobile: 660px;

@mixin button-primary {
background-color: var(--woo-purple-40);
border-radius: 8px; /* stylelint-disable-line scales/radii */

&:hover,
&:focus {
background-color: var(--woo-purple-60);
}

&:disabled {
background-color: var(--studio-gray-5);
color: var(--studio-gray-50);
}
}

@mixin button-secondary {
border: 2px solid var(--woo-purple-40);
background-color: transparent;
border-radius: 8px; /* stylelint-disable-line scales/radii */

&:hover,
&:focus {
background-color: var(--woo-purple-70);
}

&:disabled {
background-color: var(--studio-gray-5);
color: var(--studio-gray-50);
}
}

@mixin button-tertiary {
background-color: transparent;
color: var(--woo-purple-40);
border-radius: 8px; /* stylelint-disable-line scales/radii */

&:hover,
&:focus {
background-color: var(--woo-purple-0);
color: var(--woo-purple-60);
}

&:disabled {
background-color: transparent;
color: var(--studio-gray-50);
}
}

@mixin button-size-small {
padding: 5.5px 16px;
font-weight: 500;
font-size: rem(14px);
line-height: 21px;
}

@mixin button-size-base {
padding: 12px 24px;
font-weight: 500;
font-size: rem(16px);
line-height: 24px;
}

@mixin button-size-large {
padding: 14.5px 24px;
font-weight: 500;
font-size: rem(18px);
line-height: 27px;
}

@mixin link-woo {
color: var(--woo-purple-40);
text-decoration: underline;
text-underline-offset: 4px;
font-weight: 400;

&:hover,
&:focus {
color: var(--woo-purple-60);
}
}

.woo {
--woo-purple-40: #966ccf;
--woo-purple-50: #7f54b3;
Expand Down Expand Up @@ -349,6 +430,12 @@ $breakpoint-mobile: 660px;
@media (max-width: $break-mobile) {
text-align: left;
}

@media (min-width: $break-large) {
br.hide-on-desktop {
display: none;
}
}
}

.magic-login__form-action {
Expand Down Expand Up @@ -1681,6 +1768,7 @@ $breakpoint-mobile: 660px;

strong {
font-weight: 600;
display: inline-block;
}
}

Expand Down Expand Up @@ -2123,6 +2211,7 @@ $breakpoint-mobile: 660px;

.woo.feature-flag-woocommerce-rebrand-2-0,
.woo.feature-flag-woocommerce-rebrand-2-0.is-woo-passwordless {
--woo-purple-0: #F2EDFF;
--woo-purple-40: #873EFF;
--woo-purple-50: #720EEC;
--woo-purple-60: #6108CE;
Expand All @@ -2132,13 +2221,7 @@ $breakpoint-mobile: 660px;
.security-key-form__help-text,
.formatted-header__subtitle {
a {
color: var(--woo-purple-40);
text-decoration: underline;
text-underline-offset: 4px;

&:hover {
color: var(--woo-purple-60);
}
@include link-woo;
}
}
}
Expand Down Expand Up @@ -2167,51 +2250,32 @@ $breakpoint-mobile: 660px;
.button.is-primary,
.login .button.is-primary,
.magic-login.is-white-login .magic-login__form-action .button.is-primary:not([disabled]) {
background-color: var(--woo-purple-40);

&:hover {
background-color: var(--woo-purple-60);
}
@include button-primary;
}

.notice__text a,
.notice__text a:visited {
color: var(--woo-purple-40);
text-decoration: underline;
text-underline-offset: 4px;

&:hover {
color: var(--woo-purple-60);
}
@include link-woo;
}

.login__header-subtitle a {
color: var(--woo-purple-40);
text-decoration: underline;
text-underline-offset: 4px;

&:hover {
color: var(--woo-purple-60);
}
@include link-woo;
}

.continue-as-user__change-user-link {
color: var(--woo-purple-50);

&:hover {
color: var(--woo-purple-70);
}
@include button-tertiary;
@include button-size-small;
}

.magic-login__footer a {
color: var(--woo-purple-50);

&:hover {
color: var(--woo-purple-40);
}
@include link-woo;
}

.auth-form__social-buttons-tos a {
text-underline-offset: 2px;
}
}

.login__lost-password-link {
@include link-woo;
}
}
Loading