Skip to content

Commit

Permalink
Unify markup between More block and Pagination block
Browse files Browse the repository at this point in the history
This adds a white background, and some things, to the Pagination block. This will only be visible if a user loads a stylesheet into the editor.

Fixes #1467 (comment), cc @swissspidy.
  • Loading branch information
Joen Asmussen committed Apr 12, 2018
1 parent cf0d3b9 commit cb7f3ee
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 35 deletions.
20 changes: 14 additions & 6 deletions blocks/library/more/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,40 @@
text-align: center;
}

.gutenberg .wp-block-more {
.gutenberg .wp-block-more { // needs specificity
display: block;
text-align: center;
white-space: nowrap;

// Label
input {
font-size: 12px;
text-transform: uppercase;
font-weight: 600;
font-family: $default-font;
color: $dark-gray-300;
padding-left: 8px;
padding-right: 8px;
background: $white;
border: none;
box-shadow: none;
white-space: nowrap;
text-align: center;
margin: 0;
border-radius: 4px;
background: $white;
padding: 6px 8px;
height: $icon-button-size-small;

&:focus {
box-shadow: none;
}
}

// Dashed line
&:before {
content: '';
position: absolute;
top: calc( 50% );
left: $block-side-ui-padding + $block-padding;
right: $block-side-ui-padding + $block-padding;
left: 0;
right: 0;
border-top: 3px dashed $light-gray-700;
z-index: z-index( '.editor-block-list__block .wp-block-more:before' );
}
Expand Down
53 changes: 24 additions & 29 deletions blocks/library/nextpage/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,31 @@
.wp-block-nextpage {
display: block;
text-align: center;
overflow: hidden;
white-space: nowrap;
}

.wp-block-nextpage > span {
position: relative;
display: inline-block;
font-size: 12px;
text-transform: uppercase;
font-weight: 600;
font-family: $default-font;
color: $dark-gray-300;
}

.wp-block-nextpage > span:before,
.wp-block-nextpage > span:after {
content: '';
position: absolute;
top: 50%;
width: 100vw;
border-top: 3px dashed $light-gray-700;
margin-top: -2px;
}

.wp-block-nextpage > span:before {
right: 100%;
margin-right: 20px;
}
// Label
> span {
position: relative;
display: inline-block;
font-size: 12px;
text-transform: uppercase;
font-weight: 600;
font-family: $default-font;
color: $dark-gray-300;
border-radius: 4px;
background: $white;
padding: 6px 8px;
height: $icon-button-size-small;
}

.wp-block-nextpage > span:after {
left: 100%;
margin-left: 20px;
// Dashed line
&:before {
content: '';
position: absolute;
top: calc( 50% );
left: 0;
right: 0;
border-top: 3px dashed $light-gray-700;
z-index: z-index( '.editor-block-list__block .wp-block-more:before' );
}
}

0 comments on commit cb7f3ee

Please sign in to comment.