New issue
Advanced search Search tips

Issue 595467 link

Starred by 9 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

currentColor in linear/radial/conic gradient not picked up on hover

Reported by mvilr...@gmail.com, Mar 16 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36

Example URL:
http://codepen.io/mvilrokx/pen/QNdENp

Steps to reproduce the problem:
1. Create a block that has a linear gradient that uses "currentColor" as it's color
2. Wrap this block with another block that sets the color to color1 and to color2 on hover.
3. Hover over the block

What is the expected behavior?
When hovering over the block, it should change color

What went wrong?
When hovering over the block, it does not change color

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? Yes 

Chrome version: 49.0.2623.87  Channel: stable
OS Version: OS X 10.11.3
Flash Version: 

This works fine in FF and Safari, just not in Chrome, tested both in stable and canary.
It also starts working when I simultaneously set the border on hover (see codepen, uncomment border in .colorpicker:hover.
This also works fine with a plain background (remove the striped class from the example div)
 
Owner: manoranj...@chromium.org
Status: Assigned (was: Unconfirmed)
mvilrokx@, Thank you for filing. I am working on providing bisect information.
Components: -Blink Blink>CSS
Labels: -OS-Mac OS-All
Owner: timloh@chromium.org
Below is the 'Blink' narrow bisect URL:

https://chromium.googlesource.com/chromium/blink/+log/86ce4af33b763b24cf2365d8cd19a2ebade676c3..09bd97099a92cf983363f8db6c6c2178b0cd7c6a

39.0.2171.70 - Bad
38.0.2063.0 - Good

timloh@, could you please look into this change (https://chromium.googlesource.com/chromium/blink/+/585314c3dfc63971200c93adfff7ef6b10a2c014) if possible? Please feel free to re-assign in-case if this is not your's.

Thank you!

Comment 4 by timloh@chromium.org, Mar 17 2016

I guess bool ComputedStyle::hasBackgroundRelatedColorReferencingCurrentColor() needs to take gradients into account. Probably gradients in other properties don't handle this right either.

Comment 5 by timloh@chromium.org, Mar 17 2016

Another similar case below. The border repaints (probably because LayoutObject::adjustStyleDifference just checks hasBorder() for the color case), but the content doesn't seem to ever repaint.

<style>
div { color: green; }
div:hover { color: teal; }

div:before {
  content: linear-gradient(to bottom, orange 0%, currentColor 100%);
  border: 25px solid currentColor;
}
</style>
<div></div>

Comment 6 by timloh@chromium.org, Mar 17 2016

Cc: timloh@chromium.org
Labels: -Type-Bug Hotlist-Interop Type-Bug-Regression
Owner: ----
Status: Available (was: Assigned)
Labels: -Type-Bug-Regression hasbisect Type-Bug
Labels: -Type-Bug Type-Bug-Regression
Owner: timloh@chromium.org
Status: Assigned (was: Available)
Friendly ping from this week's CSS bug sheriff.
Owner: ----
Status: Available (was: Assigned)
I don't have time to look at this.

Comment 12 by meade@chromium.org, Oct 13 2016

Labels: Regressed-39

Comment 13 by meade@chromium.org, Nov 22 2016

Labels: -Type-Bug-Regression Type-Bug
Hi,

I know that this issue is not your top priority. But I would like to give you some information about it.

I made some tests here: http://codepen.io/7studio/pen/Lxxwgg and it seems that if you:

- set `box-shadow` on the element;
- set `position:relative; z-index:1;` in `:hover` declaration;
- repeat the same `background-image` in `:hover` declaration.

the value of the `currentColor` keyword is correctly updated.

I hope you will fix this issue soon ;)
Labels: Update-Quarterly

Comment 16 by f...@opera.com, Apr 10 2017

Cc: kkaluri@chromium.org
 Issue 709731  has been merged into this issue.

Comment 17 by f...@opera.com, Apr 10 2017

Summary: currentColor in linear/radial/conic gradient not picked up on hover (was: currentColor in (linear) gradient not picked up on hover)
Labels: Code-RecalcStyle

Comment 19 by shend@chromium.org, Oct 31 2017

Labels: ApproachableBug
Labels: -Update-Quarterly
Project Member

Comment 21 by sheriffbot@chromium.org, Dec 6

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Available (was: Untriaged)

Sign in to add a comment