Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try editor heading #3801

Merged
merged 4 commits into from
Dec 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion blocks/library/cover-image/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ registerBlockType( 'core/cover-image', {
<BlockDescription>
<p>{ __( 'Cover Image is a bold image block with an optional title.' ) }</p>
</BlockDescription>
<h3>{ __( 'Cover Image Settings' ) }</h3>
<h2>{ __( 'Cover Image Settings' ) }</h2>
<ToggleControl
label={ __( 'Fixed Background' ) }
checked={ !! hasParallax }
Expand Down
2 changes: 1 addition & 1 deletion blocks/library/gallery/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ class GalleryBlock extends Component {
focus && (
<InspectorControls key="inspector">
{blockDescription}
<h3>{ __( 'Gallery Settings' ) }</h3>
<h2>{ __( 'Gallery Settings' ) }</h2>
{ images.length > 1 && <RangeControl
label={ __( 'Columns' ) }
value={ columns }
Expand Down
2 changes: 1 addition & 1 deletion blocks/library/heading/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ registerBlockType( 'core/heading', {
<BlockDescription>
<p>{ __( 'Search engines use the headings to index the structure and content of your web pages.' ) }</p>
</BlockDescription>
<h3>{ __( 'Heading Settings' ) }</h3>
<h2>{ __( 'Heading Settings' ) }</h2>
<p>{ __( 'Size' ) }</p>
<Toolbar
controls={
Expand Down
2 changes: 1 addition & 1 deletion blocks/library/image/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ class ImageBlock extends Component {
focus && (
<InspectorControls key="inspector">
{ blockDescription }
<h3>{ __( 'Image Settings' ) }</h3>
<h2>{ __( 'Image Settings' ) }</h2>
<TextControl label={ __( 'Textual Alternative' ) } value={ alt } onChange={ this.updateAlt } help={ __( 'Describe the purpose of the image. Leave empty if the image is not a key part of the content.' ) } />
{ ! isEmpty( availableSizes ) && (
<SelectControl
Expand Down
4 changes: 2 additions & 2 deletions components/panel/body.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class PanelBody extends Component {
return (
<div className={ classes }>
{ !! title && (
<h3 className="components-panel__body-title">
<h2 className="components-panel__body-title">
<Button
className="components-panel__body-toggle"
onClick={ this.toggle }
Expand All @@ -54,7 +54,7 @@ class PanelBody extends Component {
<Dashicon icon={ icon } />
{ title }
</Button>
</h3>
</h2>
) }
{ isOpened && children }
</div>
Expand Down
1 change: 1 addition & 0 deletions components/panel/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
display: block;
padding: 0;
font-size: inherit;
margin-top: 0;
margin-bottom: 0;
}
.components-panel__body.is-opened > .components-panel__body-title {
Expand Down
3 changes: 1 addition & 2 deletions editor/components/post-taxonomies/flat-term-selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class FlatTermSelector extends Component {

return (
<div className="editor-post-taxonomies__flat-terms-selector">
<h4 className="editor-post-taxonomies__flat-terms-selector-title">{ label }</h4>
<h3 className="editor-post-taxonomies__flat-terms-selector-title">{ label }</h3>
<FormTokenField
value={ selectedTerms }
displayTransform={ unescapeString }
Expand Down Expand Up @@ -191,4 +191,3 @@ export default connect(
};
}
)( FlatTermSelector );

Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ class HierarchicalTermSelector extends Component {
/* eslint-disable jsx-a11y/no-onchange */
return (
<div className="editor-post-taxonomies__hierarchical-terms-selector">
<h4 className="editor-post-taxonomies__hierarchical-terms-selector-title">{ label }</h4>
<h3 className="editor-post-taxonomies__hierarchical-terms-selector-title">{ label }</h3>
{ this.renderTerms( availableTermsTree ) }
{ ! loading &&
<button
Expand Down
4 changes: 2 additions & 2 deletions editor/components/post-taxonomies/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
margin-top: $panel-padding;
}

.editor-post-taxonomies__flat-terms-selector-title,
.editor-post-taxonomies__hierarchical-terms-selector-title {
.editor-sidebar .editor-post-taxonomies__flat-terms-selector-title,
.editor-sidebar .editor-post-taxonomies__hierarchical-terms-selector-title {
display: block;
margin-bottom: 10px;
}
Expand Down
4 changes: 2 additions & 2 deletions editor/components/post-title/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class PostTitle extends Component {
tabIndex={ -1 /* Necessary for Firefox to include relatedTarget in blur event */ }
>
{ isSelected && <PostPermalink /> }
<h1>
<div>
<Textarea
ref={ this.bindTextarea }
className="editor-post-title__input"
Expand All @@ -121,7 +121,7 @@ class PostTitle extends Component {
onKeyDown={ this.onKeyDown }
onKeyPress={ this.onUnselect }
/>
</h1>
</div>
</div>
);
}
Expand Down
10 changes: 7 additions & 3 deletions editor/components/post-title/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
position: relative;
padding: 5px 0;

h1 {
div {
border: 1px solid transparent;
font-size: $editor-font-size;
transition: 0.2s outline;
Expand All @@ -11,12 +11,12 @@
padding: $block-padding;
}

&:hover h1 {
&:hover div {
border: 1px solid $light-gray-500;
transition: 0.2s outline;
}

&.is-selected h1 {
&.is-selected div {
border: 1px solid $light-gray-500;
transition: 0.2s outline;
}
Expand All @@ -34,13 +34,17 @@ textarea.editor-post-title__input {
padding: 5px 0;
margin: 0;

// inherited from h1
font-weight: 600;

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

.editor-post-title .editor-post-permalink {
font-size: $default-font-size;
position: absolute;
top: -34px;
left: 0;
Expand Down
1 change: 1 addition & 0 deletions editor/edit-post/sidebar/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
margin-top: 0;
}

h2,
h3 {
font-size: $default-font-size;
color: $dark-gray-500;
Expand Down
1 change: 1 addition & 0 deletions gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ function the_gutenberg_project() {
?>
<div class="nvda-temp-fix screen-reader-text">&nbsp;</div>
<div class="gutenberg">
<h1 class="screen-reader-text">Edit Post</h1>
<div id="editor" class="gutenberg__editor"></div>
</div>
<?php
Expand Down