Skip to content

Commit

Permalink
Revert "CSS namespaces"
Browse files Browse the repository at this point in the history
  • Loading branch information
ozanyurtsever authored Nov 27, 2023
1 parent 17351eb commit 0ffe43d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 30 deletions.
2 changes: 0 additions & 2 deletions src/EditorComposer.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

@import 'https://fonts.googleapis.com/css?family=Reenie+Beanie';

@namespace "Verbum-EditorComposer";

.editor-shell {
margin: 20px auto;
border-radius: 2px;
Expand Down
4 changes: 1 addition & 3 deletions src/EditorComposer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ const EditorComposer = ({ children, initialEditorState }: IEditorComposer) => {
return (
<LexicalComposer initialConfig={initialConfig}>
<I18nextProvider i18n={i18n}>
<svg xmlns="Verbum-EditorComposer">
<div className="editor-shell">{children}</div>
</svg>
<div className="editor-shell">{children}</div>
</I18nextProvider>
</LexicalComposer>
);
Expand Down
2 changes: 0 additions & 2 deletions src/plugins/ToolbarPlugin/ToolbarPlugin.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
*
*
*/
@namespace 'Verbum-toolbar';

.ToolbarPlugin__dialogActions {
display: flex;
flex-direction: row;
Expand Down
43 changes: 20 additions & 23 deletions src/plugins/ToolbarPlugin/ToolbarPlugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -265,29 +265,26 @@ const ToolbarPlugin = ({
blockType,
}}
>
<svg xmlns="Verbum-toolbar">
<div className="toolbar">
<UndoButton />
<RedoButton />
<Divider />
{supportedBlockTypes.has(blockType) &&
activeEditor === initialEditor && (
<>
<BlockFormatDropdown />
<Divider />
</>
)}
{blockType === 'code' ? (
<>
<CodeLanguageDropdown />
<Divider />
{alignExists && AlignComponent}
</>
) : (
<>{children}</>
)}
</div>
</svg>
<div className="toolbar">
<UndoButton />
<RedoButton />
<Divider />
{supportedBlockTypes.has(blockType) && activeEditor === initialEditor && (
<>
<BlockFormatDropdown />
<Divider />
</>
)}
{blockType === 'code' ? (
<>
<CodeLanguageDropdown />
<Divider />
{alignExists && AlignComponent}
</>
) : (
<>{children}</>
)}
</div>
</ToolbarContext.Provider>
);
};
Expand Down

0 comments on commit 0ffe43d

Please sign in to comment.