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 3 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
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
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 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