Skip to content

Rework checkbox styling, remove input border hover effect#36870

Merged
silverwind merged 11 commits intogo-gitea:mainfrom
silverwind:nativecheck
Mar 23, 2026
Merged

Rework checkbox styling, remove input border hover effect#36870
silverwind merged 11 commits intogo-gitea:mainfrom
silverwind:nativecheck

Conversation

@silverwind
Copy link
Copy Markdown
Member

@silverwind silverwind commented Mar 8, 2026

  • Rework all checkbox styling to be consistent inside and outside markup.
  • Remove input border hover effect. Was too subtle and honestly unneeded, consistent with GitHub.
  • Increase input border contrast slightly.
  • Some small spacing fixes in Markup (nested tasklist and spacing after checkbox).
Screenshot 2026-03-09 at 08 18 19 Screenshot 2026-03-09 at 08 18 10 Screenshot 2026-03-09 at 08 17 32 Screenshot 2026-03-09 at 08 17 07 Screenshot 2026-03-09 at 08 21 04

Remove custom checkbox CSS in markup that used appearance: none with
SVG mask images for check/indeterminate states. Markup checkboxes now
render with native browser styling, consistent with the rest of the app.

Also remove the now-unused --checkbox-mask-checked and
--checkbox-mask-indeterminate CSS variables from base.css.

Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 8, 2026
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 removes the custom “masked SVG” checkbox styling from rendered markup content so task list checkboxes use native browser rendering, and cleans up the related now-unused CSS variables.

Changes:

  • Removed custom .markup input[type="checkbox"] styling that forced appearance: none and used SVG mask images for checked/indeterminate states.
  • Adjusted task list checkbox margins in markup rendering.
  • Removed unused --checkbox-mask-checked / --checkbox-mask-indeterminate CSS variables from base.css.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
web_src/css/markup/content.css Drops custom checkbox rendering in markup and tweaks task-list checkbox layout.
web_src/css/base.css Removes unused checkbox mask CSS variables after markup styling removal.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Mar 9, 2026
@silverwind
Copy link
Copy Markdown
Member Author

Comparing GitHub's implementation, they do some color alterations, I will check what can be done. Especially the disabled style of native checkboxes needs some tuning as browsers often render those with too-low contrast.

@silverwind silverwind marked this pull request as draft March 9, 2026 05:45
Replace Fomantic UI checkbox/radio with custom appearance:none styling
using CSS mask-image for the checkmark, matching GitHub Primer approach.

- Add global checkbox styling with inline-grid layout and clip-path
  checkmark animation via ::before pseudo-element
- Add global radio styling with thick-border checked state
- Add disabled state with monochrome colors
- Exclude checkbox/radio from generic form input styling rules
- Remove unused --color-input-border-hover variable
- Slightly increase --color-input-border contrast
- Reduce checkbox size from 15px to 14px
- Add spacing for nested task lists in markup

Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
@silverwind silverwind changed the title Use native checkbox styling in markup Use native checkbox and radio styling globally Mar 9, 2026
@silverwind silverwind changed the title Use native checkbox and radio styling globally Rework checkbox styling Mar 9, 2026
@silverwind silverwind requested a review from lunny March 9, 2026 07:26
@GiteaBot GiteaBot added lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Mar 9, 2026
@silverwind silverwind marked this pull request as ready for review March 9, 2026 07:26
@silverwind
Copy link
Copy Markdown
Member Author

This is now a more comprehensive rework of the checkbox styling. PR description updated.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Mar 9, 2026
Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
@silverwind silverwind added the type/enhancement An improvement of existing functionality label Mar 10, 2026
@silverwind silverwind changed the title Rework checkbox styling Rework checkbox styling, disable input hover border hover effect Mar 10, 2026
@silverwind silverwind requested a review from Copilot March 10, 2026 06:02
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

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Add -webkit-mask-image, -webkit-mask-size, -webkit-mask-repeat, and
-webkit-mask-position to checkbox ::before pseudo-elements, matching
the existing pattern used elsewhere in the codebase (e.g. base.css
native select arrow).

Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
@silverwind silverwind changed the title Rework checkbox styling, disable input hover border hover effect Rework checkbox styling, remove input border hover effect Mar 10, 2026
@lunny
Copy link
Copy Markdown
Member

lunny commented Mar 18, 2026

last call @go-gitea/technical-oversight-committee

@lunny lunny added this to the 1.26.0 milestone Mar 18, 2026
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Mar 23, 2026
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 23, 2026
@silverwind silverwind enabled auto-merge (squash) March 23, 2026 17:39
@silverwind silverwind merged commit 788200d into go-gitea:main Mar 23, 2026
26 checks passed
@silverwind silverwind deleted the nativecheck branch March 23, 2026 17:41
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 23, 2026
zjjhot added a commit to zjjhot/gitea that referenced this pull request Mar 24, 2026
* giteaofficial/main:
  [skip ci] Updated translations via Crowdin
  Make PUBLIC_URL_DETECTION default to "auto" (go-gitea#36955)
  Fix user settings sidebar showing disabled features on some pages (go-gitea#36958)
  Update GitHub Actions to latest major versions (go-gitea#36964)
  Fix various trivial problems (go-gitea#36953)
  Rework checkbox styling, remove `input` border hover effect (go-gitea#36870)
  Add `DEFAULT_DELETE_BRANCH_AFTER_MERGE` setting (go-gitea#36917)
  Update Nix flake (go-gitea#36943)
  Update to eslint 10 (go-gitea#36925)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/frontend type/enhancement An improvement of existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants