Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

rendered-markdown: Move `pre` element CSS reset rules.

Lauryn Menardc446f8617375
diff --git a/web/styles/rendered_markdown.css b/web/styles/rendered_markdown.css
index 25ec23ab4bb..29d85362ac6 100644
--- a/web/styles/rendered_markdown.css
+++ b/web/styles/rendered_markdown.css
@@ -540,6 +540,21 @@
}
pre {
+ direction: ltr;
+ /* code block text is a bit smaller than normal text */
+ font-size: 0.825em;
+ line-height: 1.4;
+ white-space: pre;
+ overflow-x: auto;
+ word-break: break-all;
+ word-wrap: normal;
+ margin: 5px 0;
+ padding: 5px 7px 3px;
+ color: hsl(0, 0%, 20%);
+ display: block;
+ border: 1px solid hsla(0, 0%, 0%, 0.15);
+ border-radius: 4px;
+
&:hover .copy_codeblock,
&:hover .code_external_link {
visibility: visible;
@@ -641,37 +656,16 @@
}
}
-/* Inline and block code.
-
-TODO: It is likely that this CSS can and should be moved into the
-rendered_markdown block; we just need to do further analysis to
-confirm doing so won't break anything. */
-
.codehilite {
display: block !important;
border: none !important;
background: none !important;
}
-pre {
- direction: ltr;
- /* code block text is a bit smaller than normal text */
- font-size: 0.825em;
- line-height: 1.4;
- white-space: pre;
- overflow-x: auto;
- word-wrap: normal;
- /* Bootstrap's default here is top: 0px, bottom: 10px */
- margin-top: 5px;
- margin-bottom: 5px;
- /* Bootstrap's default here is 9.5 on all sides */
- padding: 5px 7px 3px;
-}
-
/* Both the horizontal scrollbar in <pre/> as well as
vertical scrollbar in the <textarea/> is styled similarly. */
.message_edit_form textarea,
-pre {
+.rendered_markdown pre {
/* Ensure the horizontal scrollbar is visible on Mac */
&::-webkit-scrollbar {
height: 8px;