aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/components
diff options
context:
space:
mode:
authorjackyzha0 <[email protected]>2021-04-11 10:45:10 -0700
committerjackyzha0 <[email protected]>2021-04-11 10:45:10 -0700
commit3f0cdc02b275e24771226417c442125f74bcd8c1 (patch)
treecb260e22f9f92fb8e4afd6c05a26ebe62e804b1a /frontend/src/components
parentbase next refactor (diff)
downloadctrl-v-3f0cdc02b275e24771226417c442125f74bcd8c1.tar.xz
ctrl-v-3f0cdc02b275e24771226417c442125f74bcd8c1.zip
safely remove style.css
Diffstat (limited to 'frontend/src/components')
-rw-r--r--frontend/src/components/renderers/Latex.js13
-rw-r--r--frontend/src/components/renderers/Markdown.js35
2 files changed, 47 insertions, 1 deletions
diff --git a/frontend/src/components/renderers/Latex.js b/frontend/src/components/renderers/Latex.js
index fd3d4e2..b2be6da 100644
--- a/frontend/src/components/renderers/Latex.js
+++ b/frontend/src/components/renderers/Latex.js
@@ -40,4 +40,15 @@ const Latex = (props) => {
}
}
-export default Latex \ No newline at end of file
+const StyledLatex = styled(Latex)`
+ /* fix weird symbol height in render mode */
+ .large-op {
+ transform: translateY(-0.55em);
+ }
+
+ .small-op {
+ transform: translateY(-0.1em);
+ }
+`
+
+export default StyledLatex \ No newline at end of file
diff --git a/frontend/src/components/renderers/Markdown.js b/frontend/src/components/renderers/Markdown.js
index 16f5e37..f69d176 100644
--- a/frontend/src/components/renderers/Markdown.js
+++ b/frontend/src/components/renderers/Markdown.js
@@ -9,6 +9,41 @@ const Content = styled.div`
img {
max-width: 100%;
}
+
+ h3 {
+ font-weight: bold;
+ }
+
+ hr {
+ border-top: 1px solid ${p => p.theme.colors.text};
+ border-style: solid;
+ }
+
+ code {
+ background: ${p => p.theme.colors.codeHighlight};
+ font-size: 0.8em;
+ }
+
+ pre {
+ padding: 0.7em;
+ background: ${p => p.theme.colors.codeHighlight};
+ }
+
+ pre > code {
+ background: none;
+ }
+
+ table {
+ width: 100%;
+ }
+
+ code, pre {
+ background: none;
+ font-family: 'JetBrains Mono', monospace;
+ padding: initial;
+ border-radius: 3px;
+ outline: none;
+ }
`
const Markdown = ({content}) => {
return <Content>