willofindie / vscode-cssvar

VSCode extension to support CSS Variables Intellisense
https://marketplace.visualstudio.com/items?itemName=phoenisx.cssvar
MIT License
251 stars 4 forks source link

[Bug] color swatch for propagated properties has invisible text #113

Open T3sT3ro opened 12 months ago

T3sT3ro commented 12 months ago

Describe the bug I declare the following properties

--a: red;
--b: var(--a);

When the color widget is clicked on --a it shows the text in the header with color info, but when clicked on --b it shows invisible text in the header (it's not interactive, but hovering over there shows tooltips).

To Reproduce Steps to reproduce the behavior:

  1. Create file with the snippet above
  2. click on the color swatch next to --b property

Expected behavior the header of the widget should show name of the color and should be interactive

Screenshots image

Details (please complete the following information):

phoenisx commented 11 months ago

Hi @T3sT3ro

Thanks for raising the issue. Is there any specific need for showing the color label in the popup? I intentionally removed this feature a long time ago, since showing a label makes the highlighted range editable when clicking on the popup's colour label. Since var() is already dynamic and shows details of the color in the color swatch, it felt enough and disabling color label in the popup made the var() uneditable from color popup.


What I am trying to say is supporting your feature makes the CSS var editable from the Color Popup, as shown in below screen recording:

https://github.com/willofindie/vscode-cssvar/assets/11786283/5c1987b3-cd3e-45f1-b8ff-8ed141c52ebc

T3sT3ro commented 11 months ago

I noticed it when I wanted to copy the hsl value for some testing and I thought the whole picker is broken until had a hunch to follow the chain to the top. I think the use cases for that aren't common, but sometimes it was just useful to see the values when still working on the colors.

Editability in this place would indeed be an unwanted effect, but sometimes seeing the value could be valuable (pun not intended)

phoenisx commented 11 months ago

I'll keep this issue open, in case there are more demands for this feature. As of now, I'll keep this on hold, till I or someone else get time to work on this. 👍🏽

NOTE: This looks like a breaking feature, though no user flows will be directly affected. Only if someone clicks on the color popup title will this cause an unexpected result.