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

Rendering issue of styled buttons (psychonautwiki.org) #18991

Open
19h opened this issue Oct 23, 2017 · 10 comments
Open

Rendering issue of styled buttons (psychonautwiki.org) #18991

19h opened this issue Oct 23, 2017 · 10 comments

Comments

@19h
Copy link

@19h 19h commented Oct 23, 2017

Hey,

there's a weird style rendering issue affecting styled buttons on PsychonautWiki:

screen shot 2017-10-23 at 12 01 26

I couldn't exactly pin down the issue, but it seems to be related to either the gradient or background styling.

-- K

@KiChjang
Copy link
Member

@KiChjang KiChjang commented Oct 23, 2017

Can you give us the URL of the page you're visiting?

@19h
Copy link
Author

@19h 19h commented Oct 23, 2017

Oh, sorry about that. One of the URLs affected: https://psychonautwiki.org/wiki/Main_Page.

@KiChjang
Copy link
Member

@KiChjang KiChjang commented Oct 24, 2017

I can reproduce this issue on latest master.

@KiChjang
Copy link
Member

@KiChjang KiChjang commented Oct 24, 2017

Running servo with incremental layout disabled would not reproduce the issue.

@CYBAI
Copy link
Collaborator

@CYBAI CYBAI commented Oct 25, 2017

Hi @KiChjang
If I'd like to help to fix this issue, could you give me some advises?
Thanks!

@emilio
Copy link
Member

@emilio emilio commented Oct 25, 2017

@CYBAI nobody has pin-pointed the cause yet (modulo it being related to incremental layout), so we don't know how easy or hard it is to fix.

The first step would be to create a reduced test-case that reproduces the issue, and then investigate it.

@KiChjang
Copy link
Member

@KiChjang KiChjang commented Oct 25, 2017

FTR I tried to make a reduced test case to no avail 2 days ago.

@CYBAI
Copy link
Collaborator

@CYBAI CYBAI commented Oct 25, 2017

@emilio @KiChjang Got it, thanks!

@CYBAI
Copy link
Collaborator

@CYBAI CYBAI commented Oct 25, 2018

<style>
  .container {
    display: flex;
    width: 139px
  }

  .container div a {
    padding: .3em .75em;
  }

  .container div#former a {
    background: #ffefc8;
  }

  .container div#latter a {
    background: #e9f6fd;
  }

  .container div#former a:hover {
    background: #ffdfa8;
  }

  .container div#latter a:hover {
    background: #effffd;
  }
</style>
<div class="container">
  <div id="former">
    <a href="https://psychonautwiki.org/wiki/Donate">Donate</a>
  </div>
  <div id="latter">
    <a href="https://psychonautwiki.org/wiki/Contact_us">Contact</a>
  </div>
</div>

Just tried to make a small test case from the page. From this test case, when you hover on the button, another one will become longer.

If you tried to comment this rule

.container div a {
  padding: .3em .75em;
}

Then the buttons won't become longer on hover.

image

@CYBAI
Copy link
Collaborator

@CYBAI CYBAI commented Oct 26, 2018

For above reduced test case, I found if setting padding for .container div a with px, it will work fine. But once setting padding with em, we can reproduce the issue.

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

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.