Skip to content

Commit

Permalink
Merge pull request #258 from WordPress/update/tinymce-single/mock-ups
Browse files Browse the repository at this point in the history
Put type switcher in separate group
  • Loading branch information
ellatrix authored Mar 13, 2017
2 parents 7f3d374 + 93d9af1 commit e04c6a3
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tinymce-single/blocks/elements/headings/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
}
} );

controls.push( 'text-align-left', 'text-align-center', 'text-align-right' );
controls.push( '|', 'text-align-left', 'text-align-center', 'text-align-right' );

return controls;
}
Expand Down
1 change: 1 addition & 0 deletions tinymce-single/blocks/elements/paragraph/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ window.wp.blocks.registerBlock( {
icon: 'gridicons-posts',
controls: [
'text-switcher',
'|',
'text-align-left',
'text-align-center',
'text-align-right'
Expand Down
18 changes: 13 additions & 5 deletions tinymce-single/tinymce/block.css
Original file line number Diff line number Diff line change
Expand Up @@ -150,18 +150,18 @@ svg.gridicon {
transform: rotate( 90deg );
}

div.mce-inline-toolbar-grp {
div.mce-btn-group {
background-color: #fff;
border: 1px solid #e1e6ea;
box-shadow: 0px 3px 20px rgba( 18, 24, 30, .1 ), 0px 1px 3px rgba( 18, 24, 30, .1 );
box-sizing: border-box;
margin-bottom: 8px;
position: absolute;
margin-right: 8px;
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
max-width: 98%;
display: block;
float: left;
}

div.wp-link-preview {
Expand Down Expand Up @@ -201,7 +201,7 @@ div.wp-link-input input {
}
}

div.mce-inline-toolbar-grp.block-toolbar {
div.block-toolbar .mce-btn-group {
border: none;
background: none;
box-shadow: none;
Expand Down Expand Up @@ -311,6 +311,10 @@ div.mce-inline-toolbar-grp.block-toolbar > div.mce-stack-layout {
width: 330px;
}

.insert-menu .mce-btn-group {
margin: 0;
}

.insert-menu .mce-btn {
float: left;
}
Expand Down Expand Up @@ -367,4 +371,8 @@ div.mce-inline-toolbar-grp.block-toolbar > div.mce-stack-layout {
position: relative;
background: none;
color: #12181e;
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
}
2 changes: 1 addition & 1 deletion tinymce-single/tinymce/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@

DOM.setStyles( toolbar, {
position: 'absolute',
left: Math.max( contentRect.left + editorPadding, elementRect.left ) + 8 + blockToolbarWidth + 'px',
left: Math.max( contentRect.left + editorPadding, elementRect.left ) + blockToolbarWidth + 'px',
top: elementRect.top + window.pageYOffset - toolbarRect.height - 8 + 'px'
} );

Expand Down

0 comments on commit e04c6a3

Please sign in to comment.