about summary refs log tree commit diff
path: root/app/javascript/styles/mastodon
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2023-03-03 20:19:29 +0100
committerGitHub <noreply@github.com>2023-03-03 20:19:29 +0100
commit3a6451c867595fd58998ee1706589b15a69d993b (patch)
tree1525845ea7476965dc88a06f782490c5513ffa7a /app/javascript/styles/mastodon
parentaf578e8ce0aabdbe9c0cd3d72d6fa2cc30b7fc66 (diff)
Add support for incoming rich text (#23913)
Diffstat (limited to 'app/javascript/styles/mastodon')
-rw-r--r--app/javascript/styles/mastodon/rich_text.scss64
1 files changed, 64 insertions, 0 deletions
diff --git a/app/javascript/styles/mastodon/rich_text.scss b/app/javascript/styles/mastodon/rich_text.scss
new file mode 100644
index 000000000..35901984b
--- /dev/null
+++ b/app/javascript/styles/mastodon/rich_text.scss
@@ -0,0 +1,64 @@
+.status__content__text,
+.e-content,
+.reply-indicator__content {
+  pre,
+  blockquote {
+    margin-bottom: 20px;
+    white-space: pre-wrap;
+    unicode-bidi: plaintext;
+
+    &:last-child {
+      margin-bottom: 0;
+    }
+  }
+
+  blockquote {
+    padding-left: 10px;
+    border-left: 3px solid $darker-text-color;
+    color: $darker-text-color;
+    white-space: normal;
+
+    p:last-child {
+      margin-bottom: 0;
+    }
+  }
+
+  & > ul,
+  & > ol {
+    margin-bottom: 20px;
+  }
+
+  b,
+  strong {
+    font-weight: 700;
+  }
+
+  em,
+  i {
+    font-style: italic;
+  }
+
+  ul,
+  ol {
+    margin-left: 2em;
+
+    p {
+      margin: 0;
+    }
+  }
+
+  ul {
+    list-style-type: disc;
+  }
+
+  ol {
+    list-style-type: decimal;
+  }
+}
+
+.reply-indicator__content {
+  blockquote {
+    border-left-color: $inverted-text-color;
+    color: $inverted-text-color;
+  }
+}