mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-11-24 06:24:22 +00:00
fix(overflow): 🐛 align scroll buttons with content margin
This commit is contained in:
parent
cbf60030f1
commit
4b457dfa08
|
@ -158,8 +158,14 @@ class OverflowElement {
|
|||
this.content = content;
|
||||
|
||||
if ( this.isPointerDevice ) {
|
||||
const elementStyles = window.getComputedStyle( this.element );
|
||||
const topMargin = parseInt( elementStyles.marginTop );
|
||||
const bottomMargin = parseInt( elementStyles.marginBottom );
|
||||
|
||||
const nav = document.createElement( 'div' );
|
||||
nav.className = 'citizen-overflow-nav';
|
||||
nav.style.marginTop = `${ topMargin }px`;
|
||||
nav.style.marginBottom = `${ bottomMargin }px`;
|
||||
|
||||
const leftButton = document.createElement( 'button' );
|
||||
leftButton.className =
|
||||
|
|
|
@ -55,11 +55,10 @@
|
|||
inset: 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: var( --space-md );
|
||||
margin-bottom: var( --space-md );
|
||||
}
|
||||
|
||||
&-navButton {
|
||||
width: @overflow-affordnance-size;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
appearance: none;
|
||||
|
@ -67,8 +66,15 @@
|
|||
background: transparent;
|
||||
border: 0;
|
||||
border-radius: var( --border-radius--small );
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.hideOverflowButton();
|
||||
|
||||
&::before {
|
||||
width: 1.25rem;
|
||||
}
|
||||
|
||||
&-left {
|
||||
.citizen-overflow--left & {
|
||||
.showOverflowButton();
|
||||
|
|
Loading…
Reference in a new issue