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

Remove blue border from Ondifo buttons on hover #23699

Merged
merged 3 commits into from
Jul 28, 2023
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
3 changes: 2 additions & 1 deletion src/components/Onfido/BaseOnfidoWeb.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ function initializeOnfido({sdkToken, onSuccess, onError, onUserExit, preferredLo
borderRadiusButton: `${variables.buttonBorderRadius}px`,
colorBackgroundSurfaceModal: themeColors.appBG,
colorBorderDocTypeButton: themeColors.border,
colorBorderDocTypeButtonHover: themeColors.link,
colorBorderDocTypeButtonHover: themeColors.transparent,
colorBorderButtonPrimaryHover: themeColors.transparent,
colorBackgroundButtonPrimary: themeColors.success,
colorBackgroundButtonPrimaryHover: themeColors.successHover,
colorBackgroundButtonPrimaryActive: themeColors.successHover,
Expand Down
17 changes: 17 additions & 0 deletions src/components/Onfido/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,23 @@
position: relative;
}

#onfido-mount button:focus,
#onfido-mount button:focus[data-focusvisible-polyfill],
#onfido-mount button:active {
box-shadow: none !important;
}

#onfido-mount .-action--primary:focus,
#onfido-mount .-action--primary:focus[data-focusvisible-polyfill],
#onfido-mount .-action--primary:active {
border-color: transparent;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This works without important rule, so i didn't add that

}

#onfido-mount button:focus-visible {
outline: 0;
box-shadow: inset 0px 0px 0px 1px #5AB0FF !important;
}

/* This is needed to dsiable the blue outline that shows up once the payment page is opened through keyboard */
#onfido-mount [tabindex="-1"]:focus-visible,
#onfido-mount [tabindex="-1"]:focus[data-focusvisible-polyfill] {
Expand Down
Loading