Fix: stop using absolute position to hide Checkbox input#227
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR changes the CSS approach for hiding the native checkbox input element, moving away from absolute positioning to an opacity-based solution. This improves accessibility and layout compatibility while maintaining the custom checkbox appearance.
Key changes:
- Replaced absolute positioning with opacity and pointer-events for hiding the native input
- Simplified CSS properties by removing clip-related styling and position attributes
- Updated CHANGELOG to document this as a major version change
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/atoms/checkbox/component.tsx | Updated StyledHiddenCheckbox styling to use opacity instead of absolute positioning |
| CHANGELOG.md | Added entry documenting the checkbox input hiding method change |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| - [PATCH] Corrections for how height is calculated in `MultiLineInput` | ||
| - [MAJOR] Removed `Head` in favor of react 19 inline metadata tags | ||
| - [MINOR] Added `isResizableVertically` and `isResizableHorizontally` to `MultiLineInput` | ||
| - [MAJOR] Fix for `Checkbox` to not use aboslute positioning to hide the input |
There was a problem hiding this comment.
Corrected spelling of 'aboslute' to 'absolute'.
| - [MAJOR] Fix for `Checkbox` to not use aboslute positioning to hide the input | |
| - [MAJOR] Fix for `Checkbox` to not use absolute positioning to hide the input |
| width: 0 !important; | ||
| height: 0 !important; |
There was a problem hiding this comment.
Using !important declarations should be avoided as they make CSS harder to maintain and override. Consider restructuring the CSS specificity instead of forcing these values.
| width: 0 !important; | |
| height: 0 !important; | |
| width: 0; | |
| height: 0; |
Description
Screenshots:
Checklist: