var sheet = findSheet(/style\.css$/);
if (!sheet) { return; }
// build PL switcher UI and hook toggle event
- $(buildSwitcher(Object.keys(languages)))
+ var $switcher = $(buildSwitcher(Object.keys(languages)))
.prependTo('div.documentwrapper')
.on('click', 'li', function (e) {
$(e.target).addClass('active')
].join('');
sheet.deleteRule(lastIndex);
sheet.insertRule(sel + '{' + content + '}', lastIndex);
- });
+ });
+ $switcher.affix();
})(); }
color: white;
width: auto !important;
float: none !important;
- position: fixed;
+ position: absolute;
display: -webkit-flex;
display: flex;
-webkit-justify-content: flex-end;
margin: 0;
z-index: 5;
}
+.stripe .switcher.affix {
+ position: fixed;
+ top: 0;
+}
.stripe .switcher li {
background-color: #0f131a;
padding: 0.4em 1em;
}
.stripe .switcher li:first-child {
border-left-width: 1px;
- border-radius: 5px 0 0 5px;
+ border-radius: 0 0 0 5px;
}
.stripe .switcher li:last-child {
- border-radius: 0 5px 5px 0;
+ border-radius: 0 0 5px 0;
}
.stripe .switcher li:hover {
background-color: #222;
width: auto !important;
float: none !important;
- position: fixed;
+ position: absolute;
display: -webkit-flex;
display: flex;
-webkit-justify-content: flex-end;
padding: 0;
margin: 0;
z-index: 5;
+ &.affix {
+ position: fixed;
+ top: 0;
+ }
li {
background-color: #0f131a;
cursor: pointer;
&:first-child {
border-left-width: 1px;
- border-radius: 5px 0 0 5px;
+ border-radius: 0 0 0 5px;
}
&:last-child {
- border-radius: 0 5px 5px 0;
+ border-radius: 0 0 5px 0;
}
&:hover {
background-color: #222;