Skip to content
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

Periodic button background color change in 3.0.0 #4860

Closed
cintaccs opened this issue Jun 26, 2019 · 3 comments
Closed

Periodic button background color change in 3.0.0 #4860

cintaccs opened this issue Jun 26, 2019 · 3 comments
Labels

Comments

@cintaccs
Copy link

cintaccs commented Jun 26, 2019

Bug report

Periodically I get this new behavior with the latest release:

Taskbar icon buttons:
Screenshot 2019-06-26 at 23 46 57

Becomes:
Screenshot 2019-06-26 at 23 46 40

The HTML originally inserted in DOM:
<button tabindex="1" id="button_profile" title="Your profile" class="material-icons mdc-top-app-bar__action-item">account_circle</button>

the HTML (after being init (new mdc.topAppBar.MDCTopAppBar(appBar);)) looks like this:
<button tabindex="1" id="button_profile" title="Your profile" class="material-icons mdc-top-app-bar__action-item mdc-ripple-upgraded--unbounded mdc-ripple-upgraded" style="--mdc-ripple-fg-size:86px; --mdc-ripple-fg-scale:1.67351; --mdc-ripple-left:29px; --mdc-ripple-top:-29px;">account_circle</button>

I also have the issue that Checkbox hover - appears as a solid circle - but also periodically working???

Steps to reproduce

Reloading the document makes the error go away - and then after a few reloads - it is back again.

Actual behavior

This is new behavior with the latest release - it has worked consistently without issues since many versions ago.

Expected behavior

Consistent button appearance.

Screenshots

see above

Your Environment:

Chrome latest

Software Version(s)
MDC Web 3.0.0
Browser Chrome 75
Operating System Win 10

Additional context

I still have the issue with BLACK hover over list items sometimes. (previously reported - but not consistently reproducable)

@cintaccs cintaccs added the bug label Jun 26, 2019
@moog16
Copy link
Contributor

moog16 commented Jun 26, 2019

@cintaccs just to clarify this is specifically in the mdc-top-app-bar?

It looks like you're missing the mdc-icon-button class. Please see this glitch for correct usage. Please also see docs for correct html structure. Besides the MDCTopAppBar styles, you will also now need to import the mdc-icon-button styles:

@import "@material/top-app-bar/mdc-top-app-bar";
@import "@material/icon-button/mdc-icon-button";

Hope this helps!

@moog16 moog16 closed this as completed Jun 26, 2019
@cintaccs
Copy link
Author

@moog16 Thanks! That seems to help! (adding the additional mdc-icon-button to the element classes seems to solve it). The weird thing is that it worked every "second" time after reloading the page... anyway... thanks a lot for very quick reply and solution!! And sorry for not checking the HTML in the docs first! (FYI: I am using the minified version of CSS/js - not importing the individual components) - and yes it was specifically in the mdc-top-app-bar.

@moog16
Copy link
Contributor

moog16 commented Jun 27, 2019

Yeah I also thought that was strange! My thinking is that the material styles didn't have enough time to be applied, but not sure what would make it look "correct".

And no worries :) Happy to help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants