Automattic / _s

Hi. I'm a starter theme called _s, or underscores, if you like. I'm a theme meant for hacking so don't use me as a Parent Theme. Instead try turning me into the next, most awesome, WordPress theme out there. That's what I'm here for.
http://underscores.me/
GNU General Public License v2.0
10.96k stars 3.12k forks source link

negative margin in content-sidebar.css #1342

Closed sterndata closed 4 years ago

sterndata commented 5 years ago

The layout for content-sidebar is

.content-area {
    float: left;
    margin: 0 -25% 0 0;
    width: 100%;
}

This causes problems in old browsers. Changing that to

.content-area {
    float: left;
    margin: 0;
    width: 75%;
}

seems to accomplish the same thing. Are the negative margins necessary? If not, should I make the changes and do a PR?

jj-wd commented 5 years ago

I just came across this as IE11 rendered the sidebar over the content using this template. And I don't think using 75% with 0 margin does accomplish the same thing. I had the same idea, but 75% width just fixes it for IE as it calculates 75% of the whole site. Chrome for example uses 75% of the "correct" container size, creating 25% space between sidebar and content. The actual fix for IE would be adding display: block; to .site-main I guess.

Ismail-elkorchi commented 4 years ago

Thanks @sterndata, @jj-wd for your suggestions. I am going to close this issue since the negative margins were removed in https://github.com/Automattic/_s/pull/1251.