Skip to content

Commit

Permalink
Remove uneccesary divs (#2314)
Browse files Browse the repository at this point in the history
  • Loading branch information
belcherj authored Sep 1, 2020
1 parent da6809f commit cf670fc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 deletions.
19 changes: 5 additions & 14 deletions lib/note-detail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ type Props = OwnProps & StateProps;
export class NoteDetail extends Component<Props> {
static displayName = 'NoteDetail';

noteDetail = createRef<HTMLDivElement>();

componentDidMount() {
this.props.storeFocusEditor(this.focusEditor);
this.props.storeHasFocus(this.hasFocus);
Expand All @@ -47,18 +45,11 @@ export class NoteDetail extends Component<Props> {
<SimplenoteCompactLogo />
</div>
) : (
<div ref={this.noteDetail} className="note-detail">
<div
className="note-detail-textarea theme-color-bg theme-color-fg"
style={{ fontSize: `${fontSize}px`, overflowY: 'hidden' }}
>
<NoteContentEditor
key={openedNote}
storeFocusEditor={this.storeFocusContentEditor}
storeHasFocus={this.storeEditorHasFocus}
/>
</div>
</div>
<NoteContentEditor
key={openedNote}
storeFocusEditor={this.storeFocusContentEditor}
storeHasFocus={this.storeEditorHasFocus}
/>
)}
</div>
);
Expand Down
9 changes: 6 additions & 3 deletions scss/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,21 @@
unicode-range: U+E000-E001;
}

.note-detail {
.note-detail,
.note-content-editor-shell {
padding: 0 calc((100% - 768px) / 2);
}

@media only screen and (max-width: 1400px) {
.note-detail {
.note-detail,
.note-content-editor-shell {
padding: 0 10%;
}
}

.is-line-length-full {
.note-detail {
.note-detail,
.note-content-editor-shell {
padding: 0 25px;
}
}
Expand Down

0 comments on commit cf670fc

Please sign in to comment.