Skip to content

Commit

Permalink
Polish font size in inserter, and latest posts
Browse files Browse the repository at this point in the history
This PR does two things

1. It normalizes the font sizes to _two_ sizes instead of 3, and assigns them variables. Notably this makes the font size in the inserter larger.
2. It polishes the Latest Posts block a bit.

To elaborate on #1, there's a separate PR, #1757, which bumps the font sizes. But this actually makes the sizes larger than they are in most of WordPress. As such, I think that one needs more discussion.

In the mean time, this brings the variable cleanup and inserter font size improvements to master before that discussion can conclude.
  • Loading branch information
jasmussen committed Jul 7, 2017
1 parent 6b8c93c commit e975e95
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 13 deletions.
2 changes: 1 addition & 1 deletion blocks/editable/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ figcaption.blocks-editable__tinymce {

input.editable-format-toolbar__link-input {
padding: 10px;
font-size: 13px;
font-size: $default-font-size;
width: 100%;
border: none;
outline: none;
Expand Down
1 change: 1 addition & 0 deletions blocks/library/embed/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { registerBlockType, query } from '../../api';
import Editable from '../../editable';
import BlockControls from '../../block-controls';
import BlockAlignmentToolbar from '../../block-alignment-toolbar';
import BlockDescription from '../../block-description';

const { attr, children } = query;

Expand Down
4 changes: 2 additions & 2 deletions blocks/library/freeform/format-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
z-index: z-index( '.editor-format-list__menu' );

input {
font-size: 13px;
font-size: $default-font-size;
}
}

Expand Down Expand Up @@ -83,4 +83,4 @@
color: $white;
background-color: $dark-gray-500;
}
}
}
12 changes: 9 additions & 3 deletions blocks/library/latest-posts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* WordPress dependencies
*/
import { Component } from 'element';
import { Placeholder } from 'components';
import { Placeholder, Spinner } from 'components';
import { __ } from 'i18n';
import moment from 'moment';

Expand All @@ -15,6 +15,7 @@ import { getLatestPosts } from './data.js';
import InspectorControls from '../../inspector-controls';
import TextControl from '../../inspector-controls/text-control';
import ToggleControl from '../../inspector-controls/toggle-control';
import BlockDescription from '../../block-description';

const MIN_POSTS = 1;
const MAX_POSTS = 100;
Expand Down Expand Up @@ -88,9 +89,10 @@ registerBlockType( 'core/latest-posts', {
if ( ! latestPosts.length ) {
return (
<Placeholder
icon="update"
label={ __( 'Loading latest posts, please wait' ) }
icon="admin-post"
label={ __( 'Latest Posts' ) }
>
<Spinner />
</Placeholder>
);
}
Expand All @@ -101,6 +103,10 @@ registerBlockType( 'core/latest-posts', {
return [
focus && (
<InspectorControls key="inspector">
<BlockDescription>
<p>{ __( 'Shows a list of your site\'s most recent posts.' ) }</p>
</BlockDescription>
<h3>{ __( 'Latest Posts Settings' ) }</h3>
<ToggleControl
label={ __( 'Display post date' ) }
checked={ displayPostDate }
Expand Down
2 changes: 1 addition & 1 deletion components/form-token-field/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ input[type="text"].components-form-token-field__input {
.components-form-token-field__suggestion {
color: $dark-gray-500;
display: block;
font-size: 13px;
font-size: $default-font-size;
padding: 4px 8px;
cursor: pointer;

Expand Down
2 changes: 1 addition & 1 deletion editor/assets/stylesheets/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ body.gutenberg_page_gutenberg-demo {
}

select {
font-size: 13px;
font-size: $default-font-size;
color: $dark-gray-500;
}
}
Expand Down
2 changes: 1 addition & 1 deletion editor/block-switcher/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
padding: 3px 3px 0 3px;

input {
font-size: 13px;
font-size: $default-font-size;
}
}

Expand Down
2 changes: 1 addition & 1 deletion editor/header/mode-switcher/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
cursor: pointer;
box-shadow: none;
padding-right: 0;
font-size: 13px;
font-size: $default-font-size;
height: auto;

@include break-small {
Expand Down
4 changes: 2 additions & 2 deletions editor/inserter/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ input[type="search"].editor-inserter__search {
border: 1px solid transparent;
border-bottom: 1px solid $light-gray-500;
padding: 8px 11px;
font-size: 13px;
font-size: $default-font-size;
position: relative;
z-index: 1;

Expand All @@ -78,7 +78,7 @@ input[type="search"].editor-inserter__search {
.editor-inserter__block {
display: flex;
width: 50%;
font-size: 12px;
font-size: $default-font-size;
color: $dark-gray-500;
margin: 0;
padding: 12px 6px;
Expand Down
2 changes: 1 addition & 1 deletion editor/post-permalink/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
background: $white;
padding: 5px;
font-family: $default-font;
font-size: 13px;
font-size: $default-font-size;
}

.editor-post-permalink__label {
Expand Down

0 comments on commit e975e95

Please sign in to comment.