mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 06:30:15 +08:00
5a834a05ea
* Fix header size to fit the viewport Setting the header to border-box means that the padding is factored in when calculating its width. If this is not done, the header width would be 100% of the viewport width + any padding when set on it. That causes some parts of the header to be rendered off-screen and causes horizontal scrolling. * prevent code in posts from causing horizontal overflow We are currently not wrapping code in posts in the crawler view. This affects both unformatted code and inline code blocks. This commit forces such code to wrap in order to prevent horizontal overflow which the Google bot complains about since it causes some content to be rendered outside of the viewport for the mobile crawler.
34 lines
575 B
SCSS
34 lines
575 B
SCSS
body.crawler {
|
|
> header {
|
|
width: 100%;
|
|
position: absolute;
|
|
top: 0;
|
|
z-index: z("max");
|
|
background-color: #fff;
|
|
padding: 10px;
|
|
box-shadow: shadow("header");
|
|
box-sizing: border-box;
|
|
}
|
|
div.topic-list div[itemprop="itemListElement"] {
|
|
padding: 10px 0;
|
|
border-bottom: 1px solid #e9e9e9;
|
|
.page-links a {
|
|
padding: 0 4px;
|
|
}
|
|
}
|
|
div#main-outlet {
|
|
div.post {
|
|
word-break: break-word;
|
|
img {
|
|
max-width: 100%;
|
|
}
|
|
}
|
|
}
|
|
footer nav {
|
|
margin: 50px 0;
|
|
a {
|
|
padding: 15px;
|
|
}
|
|
}
|
|
}
|