Skip to content

Commit

Permalink
Use text cursor for the placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Sep 15, 2019
1 parent f9dafd2 commit 37e6fab
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions packages/block-editor/src/components/rich-text/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,21 @@
}
}

[data-rich-text-placeholder] {
pointer-events: none;
cursor: text;
}

[data-rich-text-placeholder]::after {
content: attr(data-rich-text-placeholder);
pointer-events: none;
// Use opacity to work in various editor styles.
// We don't specify the color here, because blocks or editor styles might provide their own.
opacity: 0.62;
}

// Could be unset for individual rich text instances.
&.is-selected {
&.keep-placeholder-on-focus [data-rich-text-placeholder] {
pointer-events: none;
}

&:not(.keep-placeholder-on-focus) [data-rich-text-placeholder]::after {
display: none;
}
&.is-selected:not(.keep-placeholder-on-focus) [data-rich-text-placeholder]::after {
display: none;
}
}

Expand Down

0 comments on commit 37e6fab

Please sign in to comment.