Skip to content

Commit

Permalink
Use theme class for HR styles
Browse files Browse the repository at this point in the history
  • Loading branch information
daltnd committed May 12, 2024
1 parent e318f94 commit 0947e73
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 20 deletions.
20 changes: 0 additions & 20 deletions packages/lexical-playground/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -1726,26 +1726,6 @@ button.item.dropdown-item-active i {
opacity: 1;
}

hr {
padding: 2px 2px;
border: none;
margin: 1em 0;
cursor: pointer;
}

hr:after {
content: '';
display: block;
height: 2px;
background-color: #ccc;
line-height: 2px;
}

hr.selected {
outline: 2px solid rgb(60, 132, 244);
user-select: none;
}

.TableNode__contentEditable {
min-height: 20px;
border: 0px;
Expand Down
17 changes: 17 additions & 0 deletions packages/lexical-playground/src/themes/PlaygroundEditorTheme.css
Original file line number Diff line number Diff line change
Expand Up @@ -442,3 +442,20 @@
.PlaygroundEditorTheme__autocomplete {
color: #ccc;
}
.PlaygroundEditorTheme__hr {
padding: 2px 2px;
border: none;
margin: 1em 0;
cursor: pointer;
}
.PlaygroundEditorTheme__hr:after {
content: '';
display: block;
height: 2px;
background-color: #ccc;
line-height: 2px;
}
.PlaygroundEditorTheme__hr.selected {
outline: 2px solid rgb(60, 132, 244);
user-select: none;
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const theme: EditorThemeClasses = {
h5: 'PlaygroundEditorTheme__h5',
h6: 'PlaygroundEditorTheme__h6',
},
hr: 'PlaygroundEditorTheme__hr',
image: 'editor-image',
indent: 'PlaygroundEditorTheme__indent',
inlineImage: 'inline-editor-image',
Expand Down

0 comments on commit 0947e73

Please sign in to comment.