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

Text inside of an element with display: inline-block should flow with text outside of it. #13143

Open
Permutatrix opened this issue Aug 31, 2016 · 2 comments

Comments

@Permutatrix
Copy link
Contributor

@Permutatrix Permutatrix commented Aug 31, 2016

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
  </head>
  <body>
    <span id="outer" style="border: 1px solid #000">
      Test 3
      <span id="inner" style="display: inline-block; width: 100px; height: 100px">XYZ</span>
    </span>
  </body>
</html>

Firefox:
Firefox's correct rendering

Chromium:
Chromium's correct rendering

Servo:
Servo's incorrect rendering

If #inner is set to overflow: hidden, Firefox and Chrome will match Servo in the placement of the text but will still render the full border, whereas Servo will cut it off, as reported in #13142.

@nox
Copy link
Member

@nox nox commented Oct 4, 2017

capture d ecran 2017-10-05 a 00 58 20

Better but still incorrect.

@Permutatrix
Copy link
Contributor Author

@Permutatrix Permutatrix commented Oct 4, 2017

That is a lot better. It seems the "XYZ" is shifted one pixel down.

When I change the border width, the vertical shift of the "XYZ" changes to match—removing the border eliminates the disparity.

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
3 participants
You can’t perform that action at this time.