From c9963f92239a95c4064308d7f39df5905bf7e86a Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Fri, 16 Oct 2026 13:22:18 +0200 Subject: [PATCH] Keep the HTTP method badge on the first line of a wrapped API path A long route wrapped inside the path chip and the method badge floated to the middle of it. The badge now stays level with the first line of the path. Co-Authored-By: Claude Sonnet 5.5 --- .../Assets/api-docs.css | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/Elastic.Documentation.Site/Assets/api-docs.css b/src/Elastic.Documentation.Site/Assets/api-docs.css index b1ab39be29..ffb4a1bf7d 100644 --- a/src/Elastic.Documentation.Site/Assets/api-docs.css +++ b/src/Elastic.Documentation.Site/Assets/api-docs.css @@ -93,6 +93,19 @@ overflow-wrap: anywhere; } +/* A wrapped route keeps the method badge on its first line. The text offsets below center a single line against the badge. */ +.api-url-row > .api-url { + align-items: flex-start; +} + +.api-url-row > .api-url .api-url-path { + padding-top: 2px; +} + +.api-url-row > .api-url .api-url-also-method { + margin-top: 4px; +} + /* The first route is the one to read; the alternates below it are compact and muted. */ .api-page-intro .api-url-listing > li:first-child .api-url { padding: 4px 12px 4px 4px; @@ -101,6 +114,10 @@ line-height: 22px; } +.api-page-intro .api-url-listing > li:first-child .api-url .api-url-path { + padding-top: 1px; +} + .api-page-intro .api-url-listing > li + li .api-url { padding: 2px 8px 2px 2px; color: #516381; @@ -115,10 +132,15 @@ } .api-page-intro .api-url-listing > li + li .api-url-also-method { + margin-top: 3px; font-size: 10px; line-height: 14px; } +.api-page-intro .api-url-listing > li + li .api-url .api-url-path { + padding-top: 1px; +} + /* One 16px step between title, badges, servers, paths, and auth. */ .api-page-intro { display: flex;