Skip to content

Commit

Permalink
Added component padding variable (#2679)
Browse files Browse the repository at this point in the history
  • Loading branch information
guywillis authored and oliverfoster committed Mar 9, 2020
1 parent f241841 commit 72d59fd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions src/core/less/_defaults/_variables.less
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@
@block-padding-hoz: 0.5rem;
// --------------------------------------------------

// --------------------------------------------------
// Component padding
// --------------------------------------------------
@component-padding-hoz: 0.5rem;
// --------------------------------------------------

// --------------------------------------------------
// Navigation height
// --------------------------------------------------
Expand Down
8 changes: 4 additions & 4 deletions src/core/less/core/component.less
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,25 @@

@media (min-width: @device-width-medium) {
&.is-left {
padding-right: 0.5rem;
padding-right: @component-padding-hoz;
width: 50%;

.dir-rtl & {
padding-right: inherit;
padding-left: 0.5rem;
padding-left: @component-padding-hoz;
}
}

&.is-right {
margin-left: auto;
padding-left: 0.5rem;
padding-left: @component-padding-hoz;
width: 50%;

.dir-rtl & {
margin-left: inherit;
margin-right: auto;
padding-left: inherit;
padding-right: 0.5rem;
padding-right: @component-padding-hoz;
}
}
}
Expand Down

0 comments on commit 72d59fd

Please sign in to comment.