switch: style fix when padding==0
This commit is contained in:
parent
0922382e70
commit
c319b5a357
2 changed files with 14 additions and 1 deletions
|
|
@ -116,6 +116,14 @@ class Switch extends MenuBase {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
setCssVariables() {
|
||||
|
||||
super.setCssVariables()
|
||||
|
||||
this.container.classList.toggle('padding-0', this.getProp('padding') === -1)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Switch.cssVariables = Switch.prototype.constructor.cssVariables.concat(
|
||||
|
|
|
|||
|
|
@ -66,7 +66,6 @@
|
|||
&:before {
|
||||
margin: var(--widget-spacing);
|
||||
}
|
||||
padding:20rem;
|
||||
|
||||
inner {
|
||||
position: relative;
|
||||
|
|
@ -78,6 +77,12 @@
|
|||
|
||||
}
|
||||
|
||||
&.padding-0 inner {
|
||||
// style fix for padding == 0
|
||||
margin: 0;
|
||||
|
||||
}
|
||||
|
||||
&.layout-horizontal inner {
|
||||
|
||||
flex-direction: row;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue