0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-22 23:33:15 -05:00
forgejo/web_src/css
silverwind 9934931f1f
[PORT] gitea##30237: Fix and rewrite contrast color calculation, fix project-related bugs
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.

Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Giteabot <teabot@gitea.io>

---
Conflict resolution: Trivial.
(cherry picked from commit 36887ed3921d03f1864360c95bd2ecf853bfbe72)
(cherry picked from commit f6c0c39f1a)
2024-05-14 15:50:47 +02:00
..
chroma [Port] gitea#30014: Various code view improvements 2024-03-28 16:43:14 +01:00
codemirror
editor
features [PORT] gitea##30237: Fix and rewrite contrast color calculation, fix project-related bugs 2024-05-14 15:50:47 +02:00
markup [PORT] gitea#30282: Markup color and font size fixes 2024-04-07 19:53:55 +00:00
modules Tweak and fix toggle checkboxes (#30527) (#30531) 2024-04-21 18:08:18 +02:00
repo [PORT] gitea##30237: Fix and rewrite contrast color calculation, fix project-related bugs 2024-05-14 15:50:47 +02:00
shared Migrate gt-hidden to tw-hidden (#30046) 2024-03-30 07:17:29 +01:00
standalone
themes [PORT] gitea##30237: Fix and rewrite contrast color calculation, fix project-related bugs 2024-05-14 15:50:47 +02:00
actions.css Fix various overflows on actions view (#30344) (#30505) 2024-04-21 18:07:00 +02:00
admin.css
base.css Fix dropdown text ellipsis (#30628) 2024-04-22 19:31:26 +00:00
dashboard.css Remove fomantic label module (#30081) 2024-03-30 07:17:31 +01:00
explore.css [Port] gitea#29982 Introduce .secondary-nav and handle .page-content spacing universally 2024-03-28 16:43:09 +01:00
font_i18n.css
form.css Fix colour contrast issues 2024-04-30 05:49:30 +00:00
helpers.css Add class tw-break-anywhere 2024-05-11 18:13:28 +00:00
home.css
index.css Remove fomantic checkbox module (#30162) (#30168) 2024-04-08 11:28:31 +02:00
install.css Fix install page checkboxes and dropdown width (#30526) (#30538) 2024-04-21 18:08:51 +02:00
org.css Remove fomantic checkbox module (#30162) (#30168) 2024-04-08 11:28:31 +02:00
repo.css [PORT] gitea##30237: Fix and rewrite contrast color calculation, fix project-related bugs 2024-05-14 15:50:47 +02:00
review.css Fix: The interface is broken when modifying code comments under mobile devices (#30125) 2024-03-30 07:17:31 +01:00
user.css [v7.0/forgejo] Add optional pronoun field in user settings (#3076) 2024-04-06 13:23:43 +00:00