Skip to content

Commit

Permalink
Tidy up icon button styles
Browse files Browse the repository at this point in the history
  • Loading branch information
talldan committed Jul 12, 2019
1 parent c41940f commit 3576b26
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions packages/block-library/src/table/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@


.wp-block-table {
// Remove default <figure> style.
margin: 0;

// Pad the container so that table/column/row selection buttons have adequate space.
padding: 20px 0 0 20px;
margin: -8px 0 0 -8px;
padding: 30px 0 0 30px;
width: 100%;

table {
Expand Down Expand Up @@ -109,31 +107,38 @@
justify-content: center;
}

&__table-selection-button {
&__table-selection-button,
&__row-selection-button,
&__column-selection-button {
position: absolute;

// Ensure the icon is centered, even when the button is very narrow.
padding: 0;
justify-content: center;

.dashicon {
margin: 0 auto;
}
}

&__table-selection-button {
top: -31px;
left: -31px;
width: 30px;
height: 30px;
}

&__row-selection-button {
position: absolute;
top: 0;
left: -31px;
width: 30px;
height: 100%;
}

&__column-selection-button {
position: absolute;
top: -31px;
left: 0;
width: 100%;
height: 30px;

.dashicon {
margin: 0 auto;
}
}
}

0 comments on commit 3576b26

Please sign in to comment.