5

In mobile.css (the mobile version of Stack Overflow) there's a CSS rule:

.post-text :last-child {
    margin-bottom: 0;
}

Currently this rule applies to every element in .post-text that is the last child of its parent, even if the parent is not .post-text. As you can see in the following screenshot, this also sets the bottom margin to zero on the last elements in each li and so on:

Current CSS - highlighted elements

When I add the child combinator (.post-text > :last-child), everything works as expected:

Proposed CSS - highlighted elements

(The answer in the screenshots is https://stackoverflow.com/a/53251603). This only applies to the mobile layout of SO, so you'll probably need to test this with a mobile user-agent.

1 Answer 1

2

I don't think I see a visible difference in the layout between the two screenshots. We're (albeit slowly) working on deprecating mobile views in favor of a responsive UI. Given that this doesn't seem to be breaking anything, we're gonna leave the mobile styling as is at this time.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .