Skip to content

fix: text color detection bug fixed #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

fix: text color detection bug fixed #19

wants to merge 1 commit into from

Conversation

Kitenite
Copy link

Description

When selecting text elements in the editor (particularly headings), the properties panel was displaying text color as #000000 (black) even when the actual text had a different color (like red). This created a disconnect between what users saw in the editor and what was shown in the color properties panel.

My Approach:

Modified the ColorInput component to better handle text elements (p, h1-h6, span, div) by prioritizing the computed color values directly from the DOM, ensuring that both inherited and applied colors are displayed correctly.

Refined the isColorEmpty utility function to more accurately determine when a color is truly empty, preventing valid color values (such as black) from being incorrectly treated as empty.

Related Issues

closes onlook-dev#1528

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Release
  • Other (please describe):

Screenshots (if applicable)

https://drive.google.com/file/d/1e8t2h5EoVcqeLmFiZyMKZ_ft6KkSCEBH/view?usp=drive_link

Additional Notes

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.

[bug] Style panel doesn't recognize text color
2 participants