Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
tooltips: Move tooltips styling to a dedicated .css file.
sayamsamala93b95f158e6
diff --git a/static/js/bundles/app.js b/static/js/bundles/app.jsindex a43c1e09649..b44b742717a 100644--- a/static/js/bundles/app.js+++ b/static/js/bundles/app.js@@ -28,6 +28,7 @@ import "spectrum-colorpicker/spectrum.css";import "katex/dist/katex.css";import "flatpickr/dist/flatpickr.css";import "flatpickr/dist/plugins/confirmDate/confirmDate.css";+import "../../styles/tooltips.css";import "../../styles/components.css";import "../../styles/app_components.css";import "../../styles/rendered_markdown.css";diff --git a/static/styles/tooltips.css b/static/styles/tooltips.cssnew file mode 100644index 00000000000..c19f200e3d2--- /dev/null+++ b/static/styles/tooltips.css@@ -0,0 +1,64 @@+[data-tippy-root] {+ /* Since tooltip elements are sometimes inside elements+ * which have different font-family, we force font-family+ * for tooltips here.+ */+ font-family: "Source Sans 3", sans-serif !important;+ word-wrap: break-word;++ /* Affects all tippy tooltips not using any theme. */+ .tippy-box:not([data-theme]) {+ background-color: hsl(0, 0%, 12%);++ &[data-placement^="top"] {+ > .tippy-arrow {+ &::before {+ border-top-color: hsl(0, 0%, 12%);+ }+ }+ }++ &[data-placement^="bottom"] {+ > .tippy-arrow {+ &::before {+ border-bottom-color: hsl(0, 0%, 12%);+ }+ }+ }++ &[data-placement^="left"] {+ > .tippy-arrow {+ &::before {+ border-left-color: hsl(0, 0%, 12%);+ }+ }+ }++ &[data-placement^="right"] {+ > .tippy-arrow {+ &::before {+ border-right-color: hsl(0, 0%, 12%);+ }+ }+ }+ }++ .tippy-content {+ font-size: 13px;+ }++ .tippy-arrow::before {+ /* `.tippy-arrow:before` element sometimes+ * inherits the height of the parent, we+ * don't want any height here since we+ * want it to remain an triangle.+ * The bug was only found in Firefox.+ */+ height: 0 !important;+ }+ /* If the text in the tooltips stretches to multiple lines,+ * we want the lines to be left-indented and not right-indented+ * by default.+ */+ text-align: left;+}diff --git a/static/styles/zulip.css b/static/styles/zulip.cssindex 6e1c3341089..d4d609f62c9 100644--- a/static/styles/zulip.css+++ b/static/styles/zulip.css@@ -82,71 +82,6 @@ pre {font-family: "Source Code Pro", monospace;}-[data-tippy-root] {- /* Since tooltip elements are sometimes inside elements- * which have different font-family, we force font-family- * for tooltips here.- */- font-family: "Source Sans 3", sans-serif !important;- word-wrap: break-word;-- /* Affects all tippy tooltips not using any theme. */- .tippy-box:not([data-theme]) {- background-color: hsl(0, 0%, 12%);-- &[data-placement^="top"] {- > .tippy-arrow {- &::before {- border-top-color: hsl(0, 0%, 12%);- }- }- }-- &[data-placement^="bottom"] {- > .tippy-arrow {- &::before {- border-bottom-color: hsl(0, 0%, 12%);- }- }- }-- &[data-placement^="left"] {- > .tippy-arrow {- &::before {- border-left-color: hsl(0, 0%, 12%);- }- }- }-- &[data-placement^="right"] {- > .tippy-arrow {- &::before {- border-right-color: hsl(0, 0%, 12%);- }- }- }- }-- .tippy-content {- font-size: 13px;- }-- .tippy-arrow::before {- /* `.tippy-arrow:before` element sometimes- * inherits the height of the parent, we- * don't want any height here since we- * want it to remain an triangle.- * The bug was only found in Firefox.- */- height: 0 !important;- }- /* If the text in the tooltips stretches to multiple lines,- * we want the lines to be left-indented and not right-indented- * by default.- */- text-align: left;-}-.no-select {user-select: none;}