Skip to content
This repository has been archived by the owner on May 19, 2020. It is now read-only.

Commit

Permalink
Merge pull request #243 from accordproject/mr-scope-global-css
Browse files Browse the repository at this point in the history
style: Make global styles scoped to components
  • Loading branch information
mttrbrts authored Feb 28, 2020
2 parents 498fc67 + a6b80fc commit a3b4bcb
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 36 deletions.
26 changes: 13 additions & 13 deletions src/MarkdownAsInputEditor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,19 @@ function MarkdownAsInputEditor(props) {
/**
* Render the component, based on showSlate
*/
const card = <Card fluid>
<Card.Content>
<TextareaAutosize
className={'textarea'}
width={'100%'}
placeholder={props.markdown}
value={props.markdown}
// eslint-disable-next-line no-unused-vars
onChange={onChangeHandler}
readOnly={props.readOnly}
/>
</Card.Content>
</Card>;
const card = <Card className="ap-markdown-editor" fluid>
<Card.Content>
<TextareaAutosize
className={'textarea'}
width={'100%'}
placeholder={props.markdown}
value={props.markdown}
// eslint-disable-next-line no-unused-vars
onChange={onChangeHandler}
readOnly={props.readOnly}
/>
</Card.Content>
</Card>;

return (
<div>
Expand Down
2 changes: 1 addition & 1 deletion src/SlateAsInputEditor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ const SlateAsInputEditor = React.forwardRef((props, ref) => {
};

return (
<div>
<div className="ap-markdown-editor">
<ToolbarWrapper {...editorProps} id="slate-toolbar-wrapper-id" />
<EditorWrapper {...editorProps} >
<Editor
Expand Down
27 changes: 7 additions & 20 deletions src/styles.css
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
/*** src/styles.css ***/
body {
font-family: serif;
font-style: normal;
font-weight: normal;
font-size: medium;
line-height: 100%;
word-spacing: normal;
letter-spacing: normal;
text-decoration: none;
text-transform: none;
text-align: left;
text-indent: 0ex;
}

.hr {
.ap-markdown-editor .hr {
overflow: visible; /* For IE */
padding: 0;
border: none;
Expand All @@ -22,25 +8,26 @@ body {
text-align: center;
}

a {
.ap-markdown-editor a{
cursor: pointer;
}

.textarea {
.ap-markdown-editor .textarea {
font-family: monospace;
height: 100%;
width: 100%;
border: 0;
}

.error {
.ap-markdown-editor .error {
color: red;
}

.html_inline {
.ap-markdown-editor .html_inline {
color: rgb(0, 60, 255);
}

#slate-toolbar-wrapper-id {
.ap-markdown-editor #slate-toolbar-wrapper-id {
display: grid;
grid-template-columns: 3% auto 3%;
grid-template-rows: 100%;
Expand Down
6 changes: 4 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ module.exports = {
node: {
fs: 'empty'
},
plugins: [htmlWebpackPlugin,
new webpack.IgnorePlugin(/jsdom$/)],
plugins: [
htmlWebpackPlugin,
new webpack.IgnorePlugin(/jsdom$/)
],
resolve: {
extensions: ['.js', '.jsx'],
},
Expand Down

0 comments on commit a3b4bcb

Please sign in to comment.