Skip to content

Consolidate the duplicate rules in style.css - #3093

Merged
ElliotFriend merged 2 commits into
mainfrom
consolidate-style-css
Nov 11, 2026
Merged

ElliotFriend merged 2 commits into
mainfrom
consolidate-style-css

Conversation

@ElliotFriend

Copy link
Copy Markdown
Contributor

Removes the rules in style.css that a later rule always overrides, left over from the style port (#2940). The site should look exactly the same. The file goes from 703 to 611 lines.

What changed

Several selectors were defined two or three times, and the later copy always won:

  • "For agents" navbar button: styled as SDS primary, then overridden as tertiary. The comment still said primary.
  • "For agents" panel: a floating card, then overridden twice (a full-height drawer, then repositioned under the header). .fa-header, .fa-body, .fa-link, and .fa-link:hover had the same pattern.
  • "Copy page" button group: an SDS-md version, then the Figma-spec sizes, then the 1px border overlap.
  • Active tab and side-menu colors: the active top-level tab was set to lilac-09, then lilac-11, then gray-12. The sidebar and On this page items were set to gray-12, then lilac-09, then lilac-11. The Previous / Next title had the same pattern.
  • #footer and ul:has(> li > a.nav-anchor): split across two rules each.

Each selector now has one rule carrying the values that won. Stale comments are fixed, for example "Developer Hub as SDS tertiary" and "Tab bar (Home / Build / Learn...)".

How I checked it

  • Deletions: a declaration was only removed when a later rule with the same selector sets the same property at equal or higher !important status, so it could never win. Where duplicate blocks set different properties, they're merged into the first block. No rule in between targets the same elements.
  • Equivalence: I compared the winning value of every selector and property pair before and after: 373 pairs. Exactly two differ, and neither changes what renders:
    • #navigation-items a[aria-current] { text-shadow: none !important } is removed. The broader #navigation-items a { text-shadow: none !important } still applies to that link.
    • The "For agents" button's border shorthand now names gray-06 instead of lilac-09. The same rule's border-color: gray-06 !important was already setting the color in both versions.
  • Build: no selector is defined twice anymore, and mint validate passes.

Please check on the preview

  • "For agents" button: gray tertiary, with the ✦ in gray-09. The drawer opens flush right under the header, and its links show the arrow icon.
  • "Copy page" button pair: 36px tall, with one shared border line.
  • Active tab is gray-12 with a gray underline. The active sidebar and On this page items are lilac-11. Previous / Next titles are lilac-11.
  • No divider above the footer, and the sidebar anchors sit at the bottom.
  • /sds-preview in light and dark.

🤖 Generated with Claude Code

The style port left later copies of several rules overriding earlier
ones. Keep one rule per selector with the values that won, and drop the
stale comments. The computed styles don't change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@mintlify

mintlify Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
stellar-docs 🟢 Ready View Preview Nov 10, 2026, 9:27 PM

@ElliotFriend

Copy link
Copy Markdown
Contributor Author

/triage

@stellar-doxie stellar-doxie Bot added the bot:ready-to-merge Bot verified and approved; waiting for a maintainer to merge label Nov 10, 2026
@stellar-doxie

stellar-doxie Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

🤖 Automated message from the Stellar Triage Bot.

Reviewing because @ElliotFriend asked with /triage.

Verified: every removed declaration loses to a later same-selector rule on main, so the winning values match. The two noted diffs render the same, and Mintlify's own CSS has no !important text-shadow. The preview serves the merged rules, and all checks pass. Ready to merge.

Non-blocking: style.css:496-498 keeps three blank lines where the removed blocks were.

@stellar-doxie

stellar-doxie Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

🤖 Automated message from the Stellar Triage Bot.

Back on this because @ElliotFriend pushed a new commit.

Verified: c13bad1 only drops the two extra blank lines from my earlier note. All checks pass and the preview serves the stylesheet. Ready to merge.

@ElliotFriend
ElliotFriend merged commit 9bb35f1 into main Nov 11, 2026
8 checks passed
@ElliotFriend
ElliotFriend deleted the consolidate-style-css branch November 11, 2026 17:09

This branch was successfully deployed

1 active deployment
staging — c13bad14 Deployed Nov 10, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:ready-to-merge Bot verified and approved; waiting for a maintainer to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants