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

Fixes focus indicator on input checkbox for Firefox #15612

Merged
merged 5 commits into from
Jan 17, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 0 additions & 5 deletions packages/apputils/style/dialog.css
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,6 @@ button.jp-Dialog-close-button {
padding-right: 5px;
}

.jp-Dialog-checkbox > input:focus-visible {
outline: 1px solid var(--jp-input-active-border-color);
outline-offset: 1px;
}

Comment on lines -124 to -128
Copy link
Contributor Author

Choose a reason for hiding this comment

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

(Specifically for checkboxes in dialogs)
for context, this styling is applied by packages/apputils/src/dialog.tsx by using the label class as its initial selector.

image

But further down the execution create footer calls Styling.style(footer.node); which adds jp-mod-styled to the checkbox element. Deleting this styling inpackages/apputils/style/dialog.css reduces code duplication.
image

.jp-Dialog-spacer {
flex: 1 1 auto;
}
Expand Down
5 changes: 5 additions & 0 deletions packages/ui-components/style/styling.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ input.jp-mod-styled:focus {
box-shadow: inset 0 0 4px var(--md-blue-300);
}

input[type='checkbox'].jp-mod-styled:focus-visible {
outline: var(--jp-border-width) solid var(--jp-input-active-border-color);
outline-offset: 1px;
}

.jp-select-wrapper {
display: flex;
position: relative;
Expand Down