-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Add :hover styleRule for modebar.bgcolor #3397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
... and .ease-bg class to match modebar button opacity
transition
|
Ping @antoinerg - could you take a look at this today? I'll ❤️ to include this in 1.43.2. Thanks! |
| Lib.addRelatedStyleRule(modeBarId, '#' + modeBarId + ' .modebar-btn .icon path', 'fill: ' + fullLayout.modebar.color); | ||
| Lib.addRelatedStyleRule(modeBarId, '#' + modeBarId + ' .modebar-btn:hover .icon path', 'fill: ' + fullLayout.modebar.activecolor); | ||
| Lib.addRelatedStyleRule(modeBarId, '#' + modeBarId + ' .modebar-btn.active .icon path', 'fill: ' + fullLayout.modebar.activecolor); | ||
| Lib.addRelatedStyleRule(modeBarId, bgSelector + '#' + modeBarId, 'background-color: ' + style.bgcolor); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this work without bgSelector? modeBarId should already be unique so this might not be necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe there's a way (not a CSS expert here), but I think that :hover pseudo-class must be tagged onto the graph div class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok thanks for the explanation. This makes sense!
test/jasmine/tests/modebar_test.js
Outdated
| }); | ||
|
|
||
| it('changes background color (displayModeBar: true)', function(done) { | ||
| function getStyleRule() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nonblocking but this function is the same as the one above. Could be DRYed for bonus points!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call. Done in -> a4fb8cd
|
Thanks for the fix and the nice tests @etpinard 💃 |
... and a
.ease-bgclass to match modebar button opacity transition.fixes #3388 - for example:
cc @plotly/plotly_js - I would appreciate if modebar-expert @antoinerg would test this one out. Thanks!