Skip to content

input's height is affected by parent's line-height #10532

Closed

Description

@kaksmet

Test case:

<div style="line-height: 100px;">
    <input placeholder="foobar">
</div>

Firefox:
firefox

Servo:
servo

Activity

  1. added
    C-has-manual-testcase
    on Apr 11, 2016
  2. jdm commented on Apr 11, 2016

    @jdm
    Member

    I guess we should set this in servo.css as well.

  3. added
    E-less-complex
    on Apr 11, 2016
  4. iamajoe commented on Apr 12, 2016

    @iamajoe

    I never know how to start to contribute back... I guess it's my time!
    This seems simple for me to solve! I'll try to do this today or tomorrow.

  5. added
    C-assigned
    on Apr 12, 2016
  6. jdm commented on Apr 12, 2016

    @jdm
    Member

    Great! Ask questions here if anything is confusing :)

  7. iamajoe commented on Apr 12, 2016

    @iamajoe

    Solution: #10553

  8. added a commit that references this issue on Apr 23, 2016
    758f41c
  9. added
    C-has-open-pr
    on Apr 27, 2016
  10. added 5 commits that reference this issue on Apr 29, 2016
    3a1706d
    9a56c82
    cbb2a96
    a66e353
    10d4da7
  11. 3 remaining items

  12. kaksmet commented on May 10, 2016

    @kaksmet
    ContributorAuthor

    This only seems partially fixed.

    Servo

    servo

    Firefox

    firefox

    foo
    <div style="line-height: 100px;">
        <input placeholder="bar">
    </div>
    baz
  13. removed
    C-assigned
    C-has-open-pr
    E-less-complex
    on May 10, 2016
  14. reopened this on May 10, 2016
  15. aethanyc commented on May 11, 2016

    @aethanyc
    Contributor

    I'm interested in this bug. I would like to give it a try.

  16. shinglyu commented on May 11, 2016

    @shinglyu
    Contributor

    @aethanyc is a layout expert!

  17. aethanyc commented on Oct 19, 2016

    @aethanyc
    Contributor

    The screenshot in #10532 (comment) seems like a bug in old version of firefox. It's correct that the div block should respect line-height property.

    I open tests/wpt/mozilla/tests/css/input_line_height.html in Firefox 49, Chome, and Safari, and they all rendered like servo. We should close this bug.

  18. jdm commented on Oct 19, 2016

    @jdm
    Member

    Hooray!

  19. aethanyc commented on Oct 19, 2016

    @aethanyc
    Contributor

    I want to correct my previous comment, it's not the old Firefox bug. If the html does not specify <!DOCTYPE html>, the line-height will be ignore just like #10532 (comment) shown. Both Chrome and Webkit do the same. I guess this is for web-compat. I guess servo does not worry about web-compat for now :)

  20. jdm commented on Oct 19, 2016

    @jdm
    Member

    Ah, that's a different matter, in that case. We do actually care about web compatibility!

  21. reopened this on Oct 19, 2016
  22. nox commented on Oct 1, 2017

    @nox
    Contributor

    This looks ok now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-layout/inlineC-has-manual-testcase

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions