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.

integrations: Drop Bootstrap and legacy CSS for modern bundle.

Alya Abbott9a0d2876b6a9
diff --git a/web/src/bundles/integrations_bundle.ts b/web/src/bundles/integrations_bundle.ts
new file mode 100644
index 00000000000..f553c472e2e
--- /dev/null
+++ b/web/src/bundles/integrations_bundle.ts
@@ -0,0 +1,8 @@
+import "./common.ts";
+import "../portico/header.ts";
+import "../portico/google-analytics.ts";
+import "../../styles/portico/portico_variables.css";
+import "../../styles/components.css";
+import "../../styles/portico/navbar.css";
+import "../../styles/portico/footer.css";
+import "../../styles/portico/markdown.css";
diff --git a/web/styles/portico/integrations.css b/web/styles/portico/integrations.css
index b18cf7a5040..b7bddf52ca7 100644
--- a/web/styles/portico/integrations.css
+++ b/web/styles/portico/integrations.css
@@ -30,6 +30,13 @@
background-color: hsl(0deg 0% 100%);
& img {
+ /* Replace the Bootstrap image reset that the new
+ integrations_bundle no longer provides. Without these,
+ images embedded in integration instructions render at
+ their natural size and overflow the content column. */
+ max-width: 100%;
+ height: auto;
+ vertical-align: middle;
box-shadow: none;
border: none;
}
@@ -294,6 +301,14 @@
@media (width <= 906px) {
text-align: center;
}
+
+ /* The lozenge cards are wrapped in bare <a> tags, which
+ inherit the browser-default underline. Suppress it so
+ the underline doesn't peek through the whitespace gaps
+ between inline-block cards as visible dashes. */
+ & > a {
+ text-decoration: none;
+ }
}
.integration-lozenge {
diff --git a/web/styles/portico/legacy_portico.css b/web/styles/portico/legacy_portico.css
index 34444a86087..8934197822a 100644
--- a/web/styles/portico/legacy_portico.css
+++ b/web/styles/portico/legacy_portico.css
@@ -317,49 +317,11 @@ html {
padding-top: 10px;
}
- /* Restore element styles that Bootstrap previously provided. */
- & p {
- margin: 0 0 10px;
- }
-
- & p:empty {
- margin: 0;
- }
-
- & h1 {
- margin-top: 15px;
- }
-
- & h4 {
- margin: 15px 0 5px;
- }
-
- & hr {
- margin: 20px 0;
- border: 0;
- border-top: 1px solid hsl(0deg 0% 93%);
- }
-
- & ul,
- ol {
- padding: 0;
- }
-
- & pre {
- padding: 9.5px;
- margin: 0 0 10px;
- word-break: break-all;
- line-height: 20px;
- background-color: hsl(0deg 0% 96%);
- border: 1px solid hsl(0deg 0% 0% / 15%);
- border-radius: 4px;
- }
-
- .tabbed-section .blocks pre {
- margin: 0;
- padding-top: 0;
- padding-bottom: 0;
- }
+ /* Element-level styles for paragraphs, headings, lists, code
+ blocks, and horizontal rules live in portico/markdown.css
+ under `.help .markdown, .integration-instructions` so that
+ both the help bundle and the integrations bundle share a
+ single source of truth. */
/* Match the link styling from marketing/case-study pages. */
& a {
@@ -373,10 +335,6 @@ html {
color: var(--color-link-hover);
text-decoration-color: var(--color-link-underline-hover);
}
-
- & code {
- color: var(--color-link);
- }
}
& ol > li::before {
@@ -387,10 +345,6 @@ html {
outline-color: var(--color-link);
}
- .tabbed-section ul.nav li.active {
- color: var(--color-link);
- }
-
.api-field-type {
color: hsl(210deg 50% 45%);
}
diff --git a/web/styles/portico/markdown.css b/web/styles/portico/markdown.css
index ed4f763584b..58e795e7f61 100644
--- a/web/styles/portico/markdown.css
+++ b/web/styles/portico/markdown.css
@@ -460,7 +460,7 @@
cursor: pointer;
&.active {
- color: hsl(176deg 46% 41%);
+ color: var(--color-link);
margin-bottom: -1px;
border: 1px solid hsl(0deg 0% 87%);
@@ -511,3 +511,70 @@
}
}
}
+
+/* Shared element-level styling for pages that render markdown as
+ content documentation: /help and /api pages (under `.help .markdown`)
+ and integration doc pages (under `.integration-instructions`).
+ Keeping these rules in one place lets both the help bundle and the
+ integrations bundle depend on a single source of truth — markdown.css
+ is already loaded by both. Marketing pages (which also load this
+ file but don't match either selector) are intentionally unaffected,
+ because their layouts rely on different defaults for lists,
+ paragraph margins, and so on. */
+.help .markdown,
+.integration-instructions {
+ & p {
+ margin: 0 0 10px;
+ }
+
+ & p:empty {
+ margin: 0;
+ }
+
+ & h1 {
+ margin-top: 15px;
+ }
+
+ & h4 {
+ margin: 15px 0 5px;
+ }
+
+ & hr {
+ margin: 20px 0;
+ border: 0;
+ border-top: 1px solid hsl(0deg 0% 93%);
+ }
+
+ /* Reset the browser-default left padding on lists so numbered
+ items and bullets align with surrounding paragraphs. */
+ & ul,
+ & ol {
+ padding: 0;
+ }
+
+ /* Fenced code blocks: light gray card with a subtle border and
+ rounded corners. The 15px vertical margins give surrounding
+ paragraphs visible breathing room around the code card, which
+ a tighter 10px bottom margin (and 0 top) was not providing.
+ The explicit font-size matches the `pre code` rule in .markdown
+ above and ensures code blocks render at the same size whether
+ the codehilite wraps content in <code> or not (some integration
+ pages generate bare <pre> without a <code> child). */
+ & pre {
+ padding: 9.5px;
+ margin: 15px 0;
+ font-family: "Source Code Pro", monospace;
+ font-size: 14px;
+ color: hsl(0deg 0% 0%);
+ word-break: break-all;
+ line-height: 20px;
+ background-color: hsl(0deg 0% 96%);
+ border: 1px solid hsl(0deg 0% 0% / 15%);
+ border-radius: 4px;
+ }
+
+ /* Inline `<code>` inside a link inherits the link color. */
+ & a code {
+ color: var(--color-link);
+ }
+}
diff --git a/web/webpack.assets.json b/web/webpack.assets.json
index f58927469c2..54557d0f4df 100644
--- a/web/webpack.assets.json
+++ b/web/webpack.assets.json
@@ -76,16 +76,16 @@
"./styles/portico/comparison_table.css"
],
"integrations": [
- "./src/bundles/legacy_portico_bundle.ts",
+ "./src/bundles/integrations_bundle.ts",
"./src/portico/integrations.ts",
- "./styles/portico/legacy_landing_page.css",
+ "./styles/portico/marketing_page.css",
"./styles/portico/integrations.css",
"./src/portico/help.ts"
],
"communities": [
- "./src/bundles/legacy_portico_bundle.ts",
+ "./src/bundles/integrations_bundle.ts",
"./src/portico/communities.ts",
- "./styles/portico/legacy_landing_page.css",
+ "./styles/portico/marketing_page.css",
"./styles/portico/integrations.css"
],
"signup": [