Skip to content
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 src/components/Checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function Checkbox(props) {
onPress={firePressHandlerOnClick}
onMouseDown={props.onMouseDown}
ref={props.forwardedRef}
style={props.style}
style={[props.style, styles.checkboxPressable]}
onKeyDown={handleSpaceKey}
accessibilityRole="checkbox"
accessibilityState={{checked: props.isChecked}}
Expand All @@ -89,8 +89,6 @@ function Checkbox(props) {
props.disabled && styles.cursorDisabled,
props.isChecked && styles.borderColorFocus,
]}
// Used as CSS selector to customize focus-visible style
dataSet={{checkbox: true}}
>
{props.isChecked && (
<Icon
Expand Down
2 changes: 1 addition & 1 deletion src/components/ReportActionItem/TaskPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function TaskPreview(props) {
accessibilityRole="button"
accessibilityLabel={props.translate('newTaskPage.task')}
>
<View style={[styles.flex1, styles.flexRow, styles.alignItemsCenter]}>
<View style={[styles.flex1, styles.flexRow, styles.alignItemsStart]}>
<Checkbox
style={[styles.mr2]}
containerStyle={[styles.taskCheckbox]}
Expand Down
13 changes: 10 additions & 3 deletions src/styles/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -2453,13 +2453,20 @@ const styles = {
alignItems: 'center',
},

checkboxPressable: {
borderRadius: 6,
padding: 2,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✋ Coming from #27703

The padding here makes the checkbox a few pixels far to the right and does not align with the left line of other inputs. More details #27703 (comment)

justifyContent: 'center',
alignItems: 'center',
},

checkboxContainer: {
backgroundColor: themeColors.componentBG,
borderRadius: 2,
borderRadius: 4,
height: 20,
width: 20,
borderColor: themeColors.icon,
borderWidth: 1,
borderColor: themeColors.borderLighter,
borderWidth: 2,
justifyContent: 'center',
alignItems: 'center',
},
Expand Down
3 changes: 0 additions & 3 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@
select:focus-visible, select:focus[data-focusvisible-polyfill] {
box-shadow: none;
}
div[role="checkbox"]:focus-visible > div[data-checkbox], div[role="checkbox"]:focus[data-focusvisible-polyfill] > div[data-checkbox] {
border-color: #03D47C !important;
}
::-ms-reveal {
display: none;
}
Expand Down