Skip to content

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