Skip to content

Commit

Permalink
Try adding some additional padding to the modal component. (#16690)
Browse files Browse the repository at this point in the history
* Add additional padding to the modal component.

* Update block manager padding to match the new modal padding.

* Make ($grid-size * 3) into a variable
  • Loading branch information
kjellr authored and gziolo committed Aug 29, 2019
1 parent e0561b2 commit e5241a4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions assets/stylesheets/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ $mobile-text-min-font-size: 16px; // Any font size below 16px will cause Mobile
$grid-size-small: 4px;
$grid-size: 8px;
$grid-size-large: 16px;
$grid-size-xlarge: 24px;

// Widths, heights & dimensions
$panel-padding: 16px;
Expand Down
6 changes: 3 additions & 3 deletions packages/components/src/modal/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
.components-modal__header {
box-sizing: border-box;
border-bottom: $border-width solid $light-gray-500;
padding: 0 $grid-size-large;
padding: 0 $grid-size-xlarge;
display: flex;
flex-direction: row;
justify-content: space-between;
Expand All @@ -71,7 +71,7 @@
position: sticky;
top: 0;
z-index: z-index(".components-modal__header");
margin: 0 -#{ $grid-size-large } $grid-size-large;
margin: 0 -#{$grid-size-xlarge} $grid-size-xlarge;

// Rules inside this query are only run by Microsoft Edge.
// Edge has bugs around position: sticky;, so it needs a separate top rule.
Expand Down Expand Up @@ -114,7 +114,7 @@
.components-modal__content {
box-sizing: border-box;
height: 100%;
padding: 0 $grid-size-large $grid-size-large;
padding: 0 $grid-size-xlarge $grid-size-xlarge;

// Rules inside this query are only run by Microsoft Edge.
// This is a companion top padding to the fixed rule in line 77.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@
.edit-post-manage-blocks-modal__results {
height: 100%;
overflow: auto;
margin-left: -1 * $grid-size-large;
margin-right: -1 * $grid-size-large;
padding-left: $grid-size-large;
padding-right: $grid-size-large;
margin-left: -$grid-size-xlarge;
margin-right: -$grid-size-xlarge;
padding-left: $grid-size-xlarge;
padding-right: $grid-size-xlarge;
border-top: $border-width solid $light-gray-500;
}

0 comments on commit e5241a4

Please sign in to comment.