Rollup merge of #47810 - GuillaumeGomez:fix-theme-but-position, r=QuietMisdreavus
Fix rendering issues on mobile Fixes #47723 r? @QuietMisdreavus
This commit is contained in:
commit
185f258801
3 changed files with 55 additions and 4 deletions
|
@ -47,6 +47,8 @@
|
||||||
// 2 for "In Return Types"
|
// 2 for "In Return Types"
|
||||||
var currentTab = 0;
|
var currentTab = 0;
|
||||||
|
|
||||||
|
var themesWidth = null;
|
||||||
|
|
||||||
function hasClass(elem, className) {
|
function hasClass(elem, className) {
|
||||||
if (elem && className && elem.className) {
|
if (elem && className && elem.className) {
|
||||||
var elemClass = elem.className;
|
var elemClass = elem.className;
|
||||||
|
@ -121,10 +123,25 @@
|
||||||
sidebar.appendChild(div);
|
sidebar.appendChild(div);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
var themeChoices = document.getElementById("theme-choices");
|
||||||
|
if (themeChoices) {
|
||||||
|
if (!themesWidth) {
|
||||||
|
var savedState = themeChoices.style.display;
|
||||||
|
themeChoices.style.display = 'block';
|
||||||
|
themesWidth = themeChoices.offsetWidth + 'px';
|
||||||
|
themeChoices.style.display = savedState;
|
||||||
|
}
|
||||||
|
themeChoices.style.position = "fixed";
|
||||||
|
themeChoices.style.width = themesWidth;
|
||||||
|
themeChoices.style.top = '78px';
|
||||||
|
themeChoices.style.left = '250px';
|
||||||
|
}
|
||||||
document.getElementsByTagName("body")[0].style.marginTop = '45px';
|
document.getElementsByTagName("body")[0].style.marginTop = '45px';
|
||||||
var themePicker = document.getElementById("theme-picker");
|
var themePicker = document.getElementById("theme-picker");
|
||||||
if (themePicker) {
|
if (themePicker) {
|
||||||
themePicker.style.position = "fixed";
|
themePicker.style.position = "fixed";
|
||||||
|
themePicker.style.top = "50px";
|
||||||
|
themePicker.style.left = "250px";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,6 +160,15 @@
|
||||||
var themePicker = document.getElementById("theme-picker");
|
var themePicker = document.getElementById("theme-picker");
|
||||||
if (themePicker) {
|
if (themePicker) {
|
||||||
themePicker.style.position = "absolute";
|
themePicker.style.position = "absolute";
|
||||||
|
themePicker.style.top = null;
|
||||||
|
themePicker.style.left = null;
|
||||||
|
}
|
||||||
|
var themeChoices = document.getElementById("theme-choices");
|
||||||
|
if (themeChoices) {
|
||||||
|
themeChoices.style.position = 'absolute';
|
||||||
|
themeChoices.style.width = null;
|
||||||
|
themeChoices.style.top = null;
|
||||||
|
themeChoices.style.left = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -870,6 +870,7 @@ span.since {
|
||||||
display: block;
|
display: block;
|
||||||
border-bottom: 1px solid;
|
border-bottom: 1px solid;
|
||||||
border-right: 1px solid;
|
border-right: 1px solid;
|
||||||
|
height: 45px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-elems {
|
.sidebar-elems {
|
||||||
|
@ -889,13 +890,19 @@ span.since {
|
||||||
}
|
}
|
||||||
|
|
||||||
nav.sub {
|
nav.sub {
|
||||||
margin: 0 auto;
|
width: calc(100% - 32px);
|
||||||
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
margin-left: 0px;
|
margin-left: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#main {
|
||||||
|
margin-top: 50px;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.content .in-band {
|
.content .in-band {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
@ -1042,6 +1049,24 @@ h4 > .important-traits {
|
||||||
|
|
||||||
.show-it {
|
.show-it {
|
||||||
display: block;
|
display: block;
|
||||||
|
width: 246px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.show-it > .block.items {
|
||||||
|
margin: 8px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.show-it > .block.items > ul {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.show-it > .block.items > ul > li {
|
||||||
|
text-align: center;
|
||||||
|
margin: 2px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.show-it > .block.items > ul > li > a {
|
||||||
|
font-size: 21px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Because of ios, we need to actually have a full height sidebar title so the
|
/* Because of ios, we need to actually have a full height sidebar title so the
|
||||||
|
@ -1198,8 +1223,8 @@ kbd {
|
||||||
|
|
||||||
@media (max-width: 700px) {
|
@media (max-width: 700px) {
|
||||||
.theme-picker {
|
.theme-picker {
|
||||||
left: 109px;
|
left: 10px;
|
||||||
top: 7px;
|
top: 54px;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -383,6 +383,6 @@ kbd {
|
||||||
|
|
||||||
@media (max-width: 700px) {
|
@media (max-width: 700px) {
|
||||||
#theme-picker {
|
#theme-picker {
|
||||||
background: #353535;
|
background: #f0f0f0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue