Skip to content

Commit ba48e2a

Browse files
author
Zaydek Michels-Gualtieri
committed
Removed dead code from EditorApp.css
1 parent a6ed909 commit ba48e2a

2 files changed

Lines changed: 20 additions & 12 deletions

File tree

src/Editor/Editor.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -305,10 +305,10 @@ const Editor = ({ id, className, style, state, dispatch, children }) => {
305305
// TODO
306306
}}
307307

308-
onCopy={e => {
309-
e.preventDefault()
310-
// TODO
311-
}}
308+
// onCopy={e => {
309+
// e.preventDefault()
310+
// // TODO
311+
// }}
312312

313313
onPaste={e => {
314314
e.preventDefault()
@@ -317,7 +317,6 @@ const Editor = ({ id, className, style, state, dispatch, children }) => {
317317

318318
onDragStart={e => {
319319
e.preventDefault()
320-
// TODO
321320
}}
322321

323322
contentEditable={state.mounted}

src/EditorApp/EditorApp.css

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
1-
/* [data-root="true"][contenteditable="true"] [data-type="p"][data-feature-empty], */
2-
/* [data-root="true"][contenteditable="false"] [data-type="p"][data-feature-empty] { */
3-
/* transition-property: line-height; */
4-
/* transition-duration: 200ms; */
5-
/* transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); */
1+
/* [data-root="true"] { */
2+
/* transform: translateZ(0); */
63
/* } */
74

8-
/* TODO: Add support for obscuring repeat empty elements in
9-
CSS or JS? */
5+
[data-root="true"][contenteditable="true"] [data-type="p"][data-feature-empty],
6+
[data-root="true"][contenteditable="false"] [data-type="p"][data-feature-empty] {
7+
transition-property: line-height;
8+
transition-duration: 500ms;
9+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
10+
}
11+
[data-root="true"][contenteditable="false"] [data-type="p"][data-feature-empty]:first-child {
12+
line-height: 0;
13+
user-select: none;
14+
}
1015
[data-root="true"][contenteditable="false"] [data-type="p"][data-feature-empty] {
1116
line-height: 1;
1217
}
18+
[data-root="true"][contenteditable="false"] [data-type="p"][data-feature-empty] + [data-type="p"][data-feature-empty] {
19+
line-height: 0;
20+
user-select: none;
21+
}

0 commit comments

Comments
 (0)