skins: Fixes #3510 show/hide line numbers

This commit is contained in:
Sebastian Castro 2018-11-15 11:34:32 +01:00
parent 4c7ae65ac4
commit 2ce195747b
4 changed files with 13 additions and 15 deletions

View file

@ -975,9 +975,8 @@ function Ace2Inner(){
showsuserselections: setClassPresenceNamed(root, "userSelections"),
showslinenumbers : function(value){
hasLineNumbers = !! value;
// disable line numbers on mobile devices
if (browser.mobile) hasLineNumbers = false;
setClassPresence(sideDiv, "sidedivhidden", !hasLineNumbers);
setClassPresence(sideDiv.parentNode, "sidediv-hidden", !hasLineNumbers);
fixView();
},
grayedout: setClassPresenceNamed(outerWin.document.body, "grayedout"),

View file

@ -1,7 +1,6 @@
#sidediv {
background-color: transparent;
border: none;
display: block;
}
#sidedivinner>div:before {

View file

@ -26,7 +26,11 @@
}
#outerdocbody.ep_author_neat {
padding-left: 120px;
padding-left: 120px; /* more space for sidediv */
}
#outerdocbody.sidediv-hidden {
padding-left: 0; /* sidediv hidden */
}
#outerdocbody iframe {
@ -34,7 +38,6 @@
position: relative;
left: 0 !important;
top: 0;
}
#outerdocbody iframe, .timeslider #editorcontainerbox {
@ -117,7 +120,7 @@
padding: 15px !important;
width: calc(100% - 30px) !important; /* 100% - padding */
}
#sidediv {
#sidediv:not(.sidedivhidden) {
display: block;
top: 15px !important; /* = #outerdocbody iframe padding-top */
}

View file

@ -1,8 +1,5 @@
/*
custom css files are loaded after core css files. Simply use the same selector to override a style.
Example:
#editbar LI {border:1px solid #000;}
overrides
#editbar LI {border:1px solid #d5d5d5;}
from pad.css
*/
@media (max-width:600px) {
#sidediv {
display: none !important;
}
}