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
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Change the post title component to use a div
  • Loading branch information
Joen Asmussen committed Dec 6, 2017
commit 5ddee928142e009543435e73f737d5c6ea119775
4 changes: 2 additions & 2 deletions editor/components/post-title/index.js
Original file line number Diff line number Diff line change
@@ -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"
@@ -121,7 +121,7 @@ class PostTitle extends Component {
onKeyDown={ this.onKeyDown }
onKeyPress={ this.onUnselect }
/>
</h1>
</div>
</div>
);
}
10 changes: 7 additions & 3 deletions editor/components/post-title/style.scss
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
position: relative;
padding: 5px 0;

h1 {
div {
border: 1px solid transparent;
font-size: $editor-font-size;
transition: 0.2s outline;
@@ -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;
}
@@ -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;