Skip to content

Instantly share code, notes, and snippets.

@GauravKhupse
Last active July 26, 2023 04:37
Show Gist options
  • Save GauravKhupse/769cfeb192099ccf1abea9e9062444df to your computer and use it in GitHub Desktop.
Save GauravKhupse/769cfeb192099ccf1abea9e9062444df to your computer and use it in GitHub Desktop.
Fixed show/hide password issue with account page Astra theme.
.woocommerce form .show-password-input, .woocommerce-page form .show-password-input {
position: relative;
cursor: pointer;
}
.woocommerce form .show-password-input::after, .woocommerce-page form .show-password-input::after {
right: 0.7em;
top: 0.4em;
cursor: pointer;
position: absolute;
font-family: WooCommerce;
speak: never;
font-weight: 400;
font-variant: normal;
text-transform: none;
line-height: 1;
-webkit-font-smoothing: antialiased;
margin-left: 0.618em;
content: "";
text-decoration: none;
}
@solaceten
Copy link

solaceten commented Jul 26, 2023

This worked for me - needed to include the link to font-family: dash-icons

Add to your theme stylesheet.

.woocommerce form .password-input, .woocommerce-page form .password-input {
display: flex;
flex-direction: column;
justify-content: center;
position: relative;
}
.woocommerce form .password-input input[type=password], .woocommerce-page form .password-input input[type=password] {
padding-right: 2.5rem;
}
.woocommerce form .show-password-input, .woocommerce-page form .show-password-input {
position: absolute;
right: 0.7em;
top: 0.7em;
cursor: pointer;
}
.woocommerce form .show-password-input::after, .woocommerce-page form .show-password-input::after {
font-family: dashicons;
speak: never;
font-weight: 400;
font-variant: normal;
text-transform: none;
line-height: 1;
-webkit-font-smoothing: antialiased;
margin-left: 0.618em;
content: "\f177";
text-decoration: none;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment