You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/web_src/css
silverwind 36887ed392
Fix and rewrite contrast color calculation, fix project-related bugs (#30237)
1. The previous color contrast calculation function was incorrect at
least for the `#84b6eb` where it output low-contrast white instead of
black. I've rewritten these functions now to accept hex colors and to
match GitHub's calculation and to output pure white/black for maximum
contrast. Before and after:
<img width="94" alt="Screenshot 2024-04-02 at 01 53 46"
src="https://github.com/go-gitea/gitea/assets/115237/00b39e15-a377-4458-95cf-ceec74b78228"><img
width="90" alt="Screenshot 2024-04-02 at 01 51 30"
src="https://github.com/go-gitea/gitea/assets/115237/1677067a-8d8f-47eb-82c0-76330deeb775">

2. Fix project-related issues:

- Expose the new `ContrastColor` function as template helper and use it
for project cards, replacing the previous JS solution which eliminates a
flash of wrong color on page load.
- Fix a bug where if editing a project title, the counter would get
lost.
- Move `rgbToHex` function to color utils.

@HesterG fyi

---------

Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Giteabot <teabot@gitea.io>
12 months ago
..
chroma Various code view improvements (#30014) 1 year ago
codemirror Remove EasyMDE focus outline on text (#25328) 2 years ago
editor Clean up diff header css and reduce global textarea min-height (#29232) 1 year ago
features Fix and rewrite contrast color calculation, fix project-related bugs (#30237) 12 months ago
markup Markup color and font size fixes (#30282) 12 months ago
modules Add `--page-spacing` variable, fix admin dashboard notice (#30302) 12 months ago
repo Fix and rewrite contrast color calculation, fix project-related bugs (#30237) 12 months ago
shared Migrate `gt-hidden` to `tw-hidden` (#30046) 1 year ago
standalone Add toasts to UI (#25449) 2 years ago
themes Fix and rewrite contrast color calculation, fix project-related bugs (#30237) 12 months ago
actions.css Action view mobile improvements and fixes (#30309) 12 months ago
admin.css User details page (#26713) 2 years ago
base.css Add `--page-spacing` variable, fix admin dashboard notice (#30302) 12 months ago
dashboard.css Remove fomantic label module (#30081) 1 year ago
explore.css Introduce `.secondary-nav` and handle `.page-content` spacing universally (#29982) 1 year ago
font_i18n.css Fix `@font-face` overrides (#24855) 2 years ago
form.css Fix checkboxes on mobile view, remove some dead css (#30308) 12 months ago
helpers.css Move and simplify tab-size helpers (#30196) 1 year ago
home.css avoid hard-coding height in language dropdown menu (#25986) 2 years ago
index.css Remove fomantic list module (#30281) 12 months ago
install.css Make "install page" respect environment config (#25648) 2 years ago
org.css Remove fomantic checkbox module (#30162) 1 year ago
repo.css Fix and rewrite contrast color calculation, fix project-related bugs (#30237) 12 months ago
review.css Fix: The interface is broken when modifying code comments under mobile devices (#30125) 1 year ago
user.css Introduce `.secondary-nav` and handle `.page-content` spacing universally (#29982) 1 year ago