Skip to content

Inline border does not enclose inline-block #7681

Closed

Description

@notriddle
<!DOCTYPE html>
<html>
<head>
<style>
    .outer {border:solid 1px}
    .inner {display:inline-block}
</style>
</head>
<body>
    <span class="outer">
        <span class="inner">text</span>
        next
    </span>
</body>
</html>

screenshot from 2015-09-18 15-53-31

Activity

  1. mbrubeck commented on Apr 4, 2016

    @mbrubeck
    Contributor

    I think this code is supposed to draw the border when building the display list for span#outer, but is incorrectly using node.style from the child node, rather than self.style.

  2. notriddle commented on Apr 4, 2016

    @notriddle
    ContributorAuthor

    Are you sure about that? As a reminder, <span style="border:red"><span style="border:black">TEST</span></span> is expected to work, too, even though there will only be one fragment (inline elements don't generate flows, and fragments are never nested). I'm pretty sure that's what the inline_contexts.nodes list is for.

  3. mbrubeck commented on Apr 4, 2016

    @mbrubeck
    Contributor

    Oh yes, I misunderstood what that code was doing.

  4. notriddle commented on Apr 4, 2016

    @notriddle
    ContributorAuthor

    I pretty much understand what the problem is: the inner block flow isn't drawing a border, because there's nothing that would make it do so, and the fragment isn't drawing a border because it's not a primary fragment.

    If I remove the is_primary_fragment conditional, it draws the rest of the border... sort of. It's offset wrong, probably for the same reason (if you look closely) that the text is already off the baseline.

  5. added a commit that references this issue on Apr 6, 2016
  6. nox commented on Sep 30, 2017

    @nox
    Contributor

    This is still true.

  7. added
    C-has-manual-testcase
    on Sep 30, 2017
  8. Loirooriol commented on Dec 12, 2024

    @Loirooriol
    Contributor

    Fixed in layout 2020

    • Layout 2013:
    • Layout 2020:
    • Firefox:
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