[Bug]: Can not get initial value of sp-color-slider without assigning color first
Code of conduct
- [X] I agree to follow this project's code of conduct.
Impacted component(s)
color-slider
Expected behavior
color property of ColorSlider should return the default value even when no color was previously assigned.
Actual behavior
color returns the message "No color format applied.". This behavior is different from ColorArea which returns ff0000 (initial state).
Screenshots
No response
What browsers are you seeing the problem in?
Chrome
How can we reproduce this issue?
- Go to https://studio.webcomponents.dev/edit/gXmv8TiE97lhOhzezr4p/
- See that area has an initial value and the slider doesn't
Sample code that illustrates the problem
No response
Logs taken while reproducing problem
No response
ColorWheel behaves in the same way, so maybe ColorArea has a bug and should return "No color format applied." when no color was assigned.
It does appear that Color Area is the one missing this "no format" return, which points to you being right. However, we do want to ensure that users are able to get a quality experience from our elements regardless of their input. This might make a good addition to #2308 where we could have DEV MODE warn on this reality but still return a color to ensure that applications "just work". Thanks for submitting this!