Skip to content

Fix: stop using absolute position to hide Checkbox input#227

Merged
krishan711 merged 1 commit into
mainfrom
fixchk
Oct 16, 2025
Merged

Fix: stop using absolute position to hide Checkbox input#227
krishan711 merged 1 commit into
mainfrom
fixchk

Conversation

@krishan711
Copy link
Copy Markdown
Contributor

Description

Screenshots:

Checklist:

  • I have updated the CHANGELOG with a summary of my changes
  • I have updated the documentation accordingly

Copilot AI review requested due to automatic review settings October 16, 2025 18:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment thread CHANGELOG.md
- [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
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

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

Corrected spelling of 'aboslute' to 'absolute'.

Suggested change
- [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

Copilot uses AI. Check for mistakes.
Comment on lines +123 to +124
width: 0 !important;
height: 0 !important;
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

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

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.

Suggested change
width: 0 !important;
height: 0 !important;
width: 0;
height: 0;

Copilot uses AI. Check for mistakes.
@krishan711 krishan711 merged commit 04f82ea into main Oct 16, 2025
4 checks passed
@krishan711 krishan711 deleted the fixchk branch October 16, 2025 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants