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.

settings_css: Refactor a settings-view-only-textarea.

PieterCK0268cc624e60
diff --git a/web/styles/settings.css b/web/styles/settings.css
index 26f807681e5..4ebfe50de6b 100644
--- a/web/styles/settings.css
+++ b/web/styles/settings.css
@@ -148,8 +148,6 @@ h3,
}
.admin-realm-description.rendered_markdown {
- /* 5px at 16px and 10px at 16px */
- padding: 0.3125em 0.625em;
width: fit-content;
/* 500px at 16px */
max-width: 31.25em;
@@ -1863,6 +1861,17 @@ label.preferences-radio-choice-label {
opacity: 0.5;
}
+/* This nicely displays uneditable user-generated content, such as
+ rendered realm and channel descriptions. */
+.settings-view-only-textarea {
+ margin: 0;
+ /* 5px at 16px and 10px at 16px */
+ padding: 0.3125em 0.625em;
+ background-color: var(--color-background-modal-bar);
+ border: 1px solid var(--color-border-modal-bar);
+ border-radius: 4px;
+}
+
.modal-textarea:disabled {
background-color: var(--background-color-readonly-modal-input);
}
diff --git a/web/templates/settings/realm_description.hbs b/web/templates/settings/realm_description.hbs
index dd074360673..351235b52de 100644
--- a/web/templates/settings/realm_description.hbs
+++ b/web/templates/settings/realm_description.hbs
@@ -7,7 +7,7 @@
class="admin-realm-description setting-widget prop-element settings-textarea"
maxlength="1000" data-setting-widget-type="string">{{ realm_description_text }}</textarea>
{{else}}
- <div class="admin-realm-description settings-highlight-box rendered_markdown">
+ <div class="admin-realm-description settings-view-only-textarea rendered_markdown">
{{rendered_markdown realm_description_html}}
</div>
{{/if}}