fix: background color of figure was not computed properly#1603
fix: background color of figure was not computed properly#1603martinRenou merged 1 commit intobqplot:0.12.xfrom
Conversation
|
Note that before we would get a different background color in voila and notebook because of style definitions on body. Now we get a white background color for both! :) |
On the screen, it is not the computed background color that is seen by a user. Since DOM elements can be transparent, the background color might be one of the parent elements. This is why we need to traverse the DOM tree to find the background color of the first non-transparent parent element. A more sophisticated solution would be to also use blending when there is a non-fully transparent background color. I think that might be a bit overkill for now. See also spacetelescope/jdaviz#2264 (comment)
084b79c to
ec48175
Compare
|
meeseeksdev please backport to master |
|
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove the If these instructions are inaccurate, feel free to suggest an improvement. |
On the screen, it is not the computed background color that is seen by a user. Since DOM elements can be transparent, the background color might be one of the parent elements. This is why we need to traverse the DOM tree to find the background color of the first non-transparent parent element. A more sophisticated solution would be to also use blending when there is a non-fully transparent background color. I think that might be a bit overkill for now. See also spacetelescope/jdaviz#2264 (comment)
) On the screen, it is not the computed background color that is seen by a user. Since DOM elements can be transparent, the background color might be one of the parent elements. This is why we need to traverse the DOM tree to find the background color of the first non-transparent parent element. A more sophisticated solution would be to also use blending when there is a non-fully transparent background color. I think that might be a bit overkill for now. See also spacetelescope/jdaviz#2264 (comment) Co-authored-by: Maarten Breddels <[email protected]>
On the screen, it is not the computed background color that is seen by a user. Since DOM elements can be transparent, the background color might be one of the parent elements. This is why we need to traverse the DOM tree to find the background color of the first non-transparent parent element.
A more sophisticated solution would be to also use blending when there is a non-fully transparent background color. I think that might be a bit overkill for now.
See also spacetelescope/jdaviz#2264 (comment)