From 11a90244646e8b03de971776fa3061c18b4a8039 Mon Sep 17 00:00:00 2001 From: Ethan Palm <56270045+ethanpalm@users.noreply.github.com> Date: Mon, 20 Apr 2026 10:55:15 -0700 Subject: [PATCH 1/6] reformat selectors and identifiers --- customize/custom-scripts.mdx | 418 +++++++++++++++++++++++++---------- 1 file changed, 299 insertions(+), 119 deletions(-) diff --git a/customize/custom-scripts.mdx b/customize/custom-scripts.mdx index e91436b8d..4edce752d 100644 --- a/customize/custom-scripts.mdx +++ b/customize/custom-scripts.mdx @@ -30,8 +30,6 @@ Tailwind CSS arbitrary values are not supported. For custom values, use the `sty Add CSS files to your repository to apply their defined class names and make them available in all of your MDX files. -### Adding `style.css` - For example, you can add the following `style.css` file to customize the styling of the navbar and footer. ```css @@ -45,123 +43,307 @@ footer { } ``` -### Using identifiers and selectors +### Identifiers and selectors -Mintlify has a set of common identifiers and selectors to help you tag important elements of the UI. + + References and the styling of common elements are subject to change. Use custom styling with caution. Breaking changes may occur in future updates. + - - Use inspect element to find references to elements you're looking to customize. - +Mintlify exposes two types of CSS targeting hooks: + +- **ID selectors**: unique page-level elements targeted with `#value { }` in CSS +- **Element selectors**: component and layout elements targeted with `value { }` in CSS (no `#` or `.` prefix) - - - APIPlaygroundInput: `api-playground-input` - - AssistantEntry: `assistant-entry` - - AssistantEntryMobile: `assistant-entry-mobile` - - Banner: `banner` - - BodyContent: `body-content` - - ChangelogFilters: `changelog-filters` - - ChangelogFiltersContent: `changelog-filters-content` - - ChatAssistantSheet: `chat-assistant-sheet` - - ChatAssistantTextArea: `chat-assistant-textarea` - - ContentArea: `content-area` - - ContentContainer: `content-container` - - ContentSideLayout: `content-side-layout` - - FeedbackForm: `feedback-form` - - FeedbackFormCancel: `feedback-form-cancel` - - FeedbackFormInput: `feedback-form-input` - - FeedbackFormSubmit: `feedback-form-submit` - - FeedbackThumbsDown: `feedback-thumbs-down` - - FeedbackThumbsUp: `feedback-thumbs-up` - - Footer: `footer` - - Header: `header` - - NavBarTransition: `navbar-transition` - - NavigationItems: `navigation-items` - - Navbar: `navbar` - - PageContextMenu: `page-context-menu` - - PageContextMenuButton: `page-context-menu-button` - - PageTitle: `page-title` - - Pagination: `pagination` - - Panel: `panel` - - RequestExample: `request-example` - - ResponseExample: `response-example` - - SearchBarEntry: `search-bar-entry` - - SearchBarEntryMobile: `search-bar-entry-mobile` - - SearchInput: `search-input` - - Sidebar: `sidebar` - - SidebarContent: `sidebar-content` - - TableOfContents: `table-of-contents` - - TableOfContentsContent: `table-of-contents-content` - - TableOfContentsLayout: `table-of-contents-layout` - - TopbarCtaButton: `topbar-cta-button` + + Each ID appears once per page. Use these as `#value` in CSS. For example, `#navbar { background: red; }`. + + **Page layout** + + - `#body-content` — Outermost wrapper for the page body. + - `#content-area` — Primary content area, excluding the sidebar and table of contents. + - `#content` — Inner content element within the content area. + - `#content-container` — Container wrapping the content area and table of contents. + - `#content-side-layout` — Side-by-side layout container for content and table of contents. + - `#header` — Page-level header element. + - `#banner` — Announcement banner displayed above the navbar. + - `#footer` — Page footer. + - `#page-title` — The `

` heading at the top of each page. + - `#pagination` — Bottom pagination bar with previous and next page links. + - `#panel` — Floating panel overlay. + - `#background-color` — Page background color element. + - `#almond-background-color` — Background color element for the Almond theme. + + **Navigation** + + - `#navbar` — Top navigation bar. + - `#navbar-transition` — Navbar transition animation wrapper. + - `#navigation-items` — Container for top-level navigation items. + - `#topbar-cta-button` — Call-to-action button in the topbar. + - `#mobile-nav` — Mobile navigation overlay. + - `#mobile-nav-content` — Content area within the mobile navigation overlay. + + **Sidebar** + + - `#sidebar` — The sidebar navigation panel. + - `#sidebar-content` — Scrollable content area within the sidebar. + + **Table of contents** + + - `#table-of-contents` — Table of contents panel on the right side of the page. + - `#table-of-contents-layout` — Layout wrapper for the table of contents. + - `#table-of-contents-content` — Scrollable content within the table of contents. + + **Search** + + - `#search-bar-entry` — Search bar trigger in the topbar. + - `#search-bar-entry-mobile` — Search bar trigger on mobile. + - `#search-input` — Text input field within the search modal. + + **AI assistant** + + - `#assistant-entry` — AI assistant button in the topbar. + - `#assistant-entry-mobile` — AI assistant button on mobile. + - `#chat-assistant-sheet` — AI assistant chat panel. + - `#chat-assistant-textarea` — Text input within the AI assistant panel. + + **API reference** + + - `#request-example` — Request example panel in the API playground. + - `#response-example` — Response example panel in the API playground. + - `#api-playground-input` — Input section of the API playground. + - `#endpoints-menu-trigger` — Button that opens the endpoint selector dropdown. + + **Code blocks** + + - `#ask-ai-code-block-button` — "Ask AI" button that appears on code blocks. + - `#code-snippet-feedback-button` — Feedback button on code snippets. + - `#code-snippet-feedback-textarea` — Text area within the code snippet feedback form. + + **Feedback** + + - `#feedback-thumbs-up` — Thumbs-up feedback button at the bottom of a page. + - `#feedback-thumbs-down` — Thumbs-down feedback button at the bottom of a page. + - `#feedback-form` — Feedback form shown after a thumbs-down response. + - `#feedback-form-input` — Text input within the feedback form. + - `#feedback-form-cancel` — Cancel button within the feedback form. + - `#feedback-form-submit` — Submit button within the feedback form. + + **Page context menu** + + - `#page-context-menu` — Contextual options menu for the current page. + - `#page-context-menu-button` — Button that triggers the page context menu. + + **Localization** + + - `#localization-select-trigger` — Button that opens the language selector. + - `#localization-select-content` — Dropdown content of the language selector. + - `#localization-select-item` — Individual language option within the selector. + + **Changelog** + + - `#changelog-filters` — Filter controls on a changelog page. + - `#changelog-filters-content` — Content area within the changelog filter panel. + + **Multi-view** + + - `#multi-view-dropdown` — Dropdown for switching between documentation views. + + **Text selection** + + - `#text-selection-tooltip` — Tooltip that appears when text is selected on a page. + - `#text-selection-tooltip-button` — Action button within the text selection tooltip. + - - - Accordion: `accordion` - - AccordionGroup: `accordion-group` - - AlmondLayout: `almond-layout` - - AlmondNavBottomSection: `almond-nav-bottom-section` - - AlmondNavBottomSectionDivider: `almond-nav-bottom-section-divider` - - Anchor: `nav-anchor` - - Anchors: `nav-anchors` - - APISection: `api-section` - - APISectionHeading: `api-section-heading` - - APISectionHeadingSubtitle: `api-section-heading-subtitle` - - APISectionHeadingTitle: `api-section-heading-title` - - Callout: `callout` - - Card: `card` - - CardGroup: `card-group` - - ChatAssistantSheet: `chat-assistant-sheet` - - ChatAssistantSheetHeader: `chat-assistant-sheet-header` - - ChatAssistantSheetContent: `chat-assistant-sheet-content` - - ChatAssistantInput: `chat-assistant-input` - - ChatAssistantSendButton: `chat-assistant-send-button` - - CodeBlock: `code-block` - - CodeGroup: `code-group` - - Content: `mdx-content` - - DropdownTrigger: `nav-dropdown-trigger` - - DropdownContent: `nav-dropdown-content` - - DropdownItem: `nav-dropdown-item` - - DropdownItemTextContainer: `nav-dropdown-item-text-container` - - DropdownItemTitle: `nav-dropdown-item-title` - - DropdownItemDescription: `nav-dropdown-item-description` - - DropdownItemIcon: `nav-dropdown-item-icon` - - Expandable: `expandable` - - Eyebrow: `eyebrow` - - FeedbackToolbar: `feedback-toolbar` - - Field: `field` - - Frame: `frame` - - Icon: `icon` - - Link: `link` - - LoginLink: `login-link` - - Logo: `nav-logo` - - Mermaid: `mermaid` - - MethodNavPill: `method-nav-pill` - - MethodPill: `method-pill` - - NavBarLink: `navbar-link` - - NavTagPill: `nav-tag-pill` - - NavTagPillText: `nav-tag-pill-text` - - OptionDropdown: `option-dropdown` - - PaginationNext: `pagination-next` - - PaginationPrev: `pagination-prev` - - PaginationTitle: `pagination-title` - - Panel: `panel` - - SidebarGroup: `sidebar-group` - - SidebarGroupIcon: `sidebar-group-icon` - - SidebarGroupHeader: `sidebar-group-header` - - SidebarNavGroupDivider: `sidebar-nav-group-divider` - - SidebarTitle: `sidebar-title` - - Step: `step` - - Steps: `steps` - - Tab: `tab` - - Tabs: `tabs` - - TabsBar: `nav-tabs` - - TabsBarItem: `nav-tabs-item` - - TableOfContents: `toc` - - TableOfContentsItem: `toc-item` - - Tooltip: `tooltip` - - TopbarRightContainer: `topbar-right-container` - - TryitButton: `tryit-button` - - Update: `update` + + Multiple instances of these elements can appear on a page. Use these as `value` in CSS. For example, `accordion { border: 1px solid red; }`. + + **Content components** + + - `accordion` — Collapsible accordion item. + - `accordion-group` — Wrapper grouping multiple accordions. + - `callout` — Callout block (Note, Warning, Tip, etc.). + - `card` — Individual card element. + - `card-group` — Wrapper grouping multiple cards. Deprecated in favor of `columns`, but preserved for backward compatibility. + - `columns` — Multi-column layout wrapper. + - `code-block` — Code block element. + - `code-block-icon` — Icon displayed in a code block header. + - `code-group` — Tabbed group of code blocks. + - `expandable` — Expandable section element. + - `frame` — Frame wrapper for images or embedded content. + - `icon` — Inline icon element. + - `mermaid` — Mermaid diagram wrapper. + - `step` — Individual step within a steps sequence. + - `steps` — Numbered steps container. + - `tab` — Individual tab within a tabs group. + - `tab-icon` — Icon displayed within a tab. + - `tabs` — Tabbed content container. + - `tile` — Tile component element. + - `tooltip` — Tooltip element. + - `update` — Changelog update entry. + + **Page layout** + + - `mdx-content` — Rendered MDX content area. + - `panel` — Floating panel component. + - `eyebrow` — Small label displayed above a page title. + - `link` — Anchor link element. + - `breadcrumb-list` — Breadcrumb navigation list. + - `breadcrumb-item` — Individual breadcrumb item. + + **Topbar navigation** + + - `nav-logo` — Logo in the navigation bar. + - `navbar-link` — Link element within the navigation bar. + - `nav-anchors` — Container for anchor links in the topbar. + - `nav-anchor` — Individual anchor link in the topbar. + - `nav-tabs` — Tab bar in the top navigation. + - `nav-tabs-item` — Individual tab item in the top navigation tab bar. + - `mobile-nav-tabs-item` — Tab item in the mobile navigation tab bar. + - `topbar-right-container` — Right section of the topbar. + - `nav-tag-pill` — Tag pill shown in the navigation. + - `nav-tag-pill-text` — Text within a navigation tag pill. + + **Topbar dropdown** + + - `nav-dropdown-trigger` — Button that opens a navigation dropdown. + - `nav-dropdown-content` — Content container for a navigation dropdown. + - `nav-dropdown-item` — Individual item within a navigation dropdown. + - `nav-dropdown-item-text-container` — Text wrapper within a dropdown item. + - `nav-dropdown-item-title` — Title text within a dropdown item. + - `nav-dropdown-item-description` — Description text within a dropdown item. + - `nav-dropdown-item-icon` — Icon within a dropdown item. + + **Products selector** + + - `nav-dropdown-products-selector-trigger` — Button that opens the products selector dropdown. + - `nav-dropdown-products-selector-content` — Content container for the products selector. + - `nav-dropdown-products-selector-item` — Individual product in the selector. + - `nav-dropdown-products-selector-item-title` — Title of a product selector item. + - `nav-dropdown-products-selector-item-description` — Description of a product selector item. + - `nav-dropdown-products-selector-item-icon` — Icon of a product selector item. + + **Sidebar** + + - `sidebar-group` — Group of related sidebar links. + - `sidebar-group-icon` — Icon for a sidebar group. + - `sidebar-group-header` — Header label for a sidebar group. + - `sidebar-title` — Top-level title in the sidebar. + - `sidebar-nav-group-divider` — Divider between sidebar navigation groups. + + **Table of contents** + + - `toc` — Table of contents container. + - `toc-item` — Individual heading entry in the table of contents. + + **Footer** + + - `footer` — Standard page footer. + - `advanced-footer` — Extended footer with additional columns or content. + + **Pagination** + + - `pagination-prev` — Previous page link in the pagination bar. + - `pagination-next` — Next page link in the pagination bar. + - `pagination-title` — Page title shown in the pagination bar. + + **API reference** + + - `api-section` — Full section for a single API endpoint. + - `api-section-heading` — Heading area for an API endpoint section. + - `api-section-heading-title` — Title within an API endpoint section heading. + - `api-section-heading-subtitle` — Subtitle within an API endpoint section heading. + - `field` — Parameter or property field in the API reference. + - `option-dropdown` — Dropdown for selecting between API options. + - `tryit-button` — "Try it" button that opens the API playground. + - `method-pill` — HTTP method badge (GET, POST, etc.) on an endpoint. + - `method-nav-pill` — HTTP method badge shown in the sidebar navigation. + - `prompt` — Prompt component in the API reference. + + **AI assistant** + + - `chat-assistant-sheet` — AI assistant panel container. + - `chat-assistant-sheet-header` — Header of the AI assistant panel. + - `chat-assistant-sheet-content` — Content area of the AI assistant panel. + - `chat-assistant-input` — Text input within the AI assistant panel. + - `chat-assistant-floating-input` — Floating input variant of the AI assistant. + - `chat-assistant-send-button` — Send button in the AI assistant panel. + - `chat-assistant-disclaimer-text` — Disclaimer text displayed in the AI assistant panel. + - `chat-assistant-payload-item` — Individual message or result item in the assistant panel. + - `starter-question-text` — Suggested starter question shown in an empty assistant panel. + + **Feedback** + + - `feedback-toolbar` — Toolbar containing page feedback controls. + - `contextual-feedback-container` — Container for contextual inline feedback. + - `contextual-feedback-form` — Inline contextual feedback form. + - `contextual-feedback-form-title` — Title of the contextual feedback form. + - `contextual-feedback-input` — Text input within the contextual feedback form. + - `contextual-feedback-button` — Action button within the contextual feedback form. + - `contextual-feedback-form-submit-button` — Submit button for the contextual feedback form. + + **Code snippet feedback** + + - `code-snippet-feedback-popover-content` — Popover content for code snippet feedback. + - `code-snippet-feedback-form` — Feedback form for a code snippet. + - `code-snippet-feedback-button` — Button that triggers code snippet feedback. + - `code-snippet-feedback-textarea` — Text area within the code snippet feedback form. + - `code-snippet-feedback-form-title` — Title of the code snippet feedback form. + - `code-snippet-feedback-form-description` — Description text in the code snippet feedback form. + - `code-snippet-feedback-form-submit-button` — Submit button for the code snippet feedback form. + + **Authentication** + + - `login-link` — Link that initiates the login flow. + - `logout-link` — Link that initiates the logout flow. + + **Multi-view** + + - `multi-view-item` — Individual view option in a multi-view switcher. + - `multi-view-dropdown` — Dropdown for selecting between multiple views. + - `multi-view-dropdown-trigger` — Button that opens the multi-view dropdown. + - `multi-view-dropdown-content` — Content area of the multi-view dropdown. + - `multi-view-dropdown-item` — Individual item within the multi-view dropdown. + + **Directory** + + - `directory` — Root container for a directory page. + - `directory-group` — Group of related pages within a directory. + - `directory-page` — Individual page entry in a directory. + - `directory-card` — Card-style page entry in a directory. + + **404 page** + + - `not-found-container` — Root container of the 404 page. + - `not-found-status-code` — Status code display on the 404 page. + - `not-found-title` — Title heading on the 404 page. + - `not-found-description` — Description text on the 404 page. + - `not-found-logo` — Logo image on the 404 page. + - `not-found-logo-container` — Wrapper for the logo on the 404 page. + - `not-found-message` — Message shown to the user on the 404 page. + - `not-found-go-back-button` — "Go back" button on the 404 page. + - `not-found-go-back-arrow` — Arrow icon within the "go back" button. + - `not-found-go-back-text` — Label text within the "go back" button. + - `not-found-recommended-pages-list` — List of recommended pages shown on the 404 page. + - `not-found-recommended-page-link` — Individual link in the recommended pages list. + + **Color** + + - `color` — Color swatch element. + - `color-row` — Row grouping color swatches. + - `color-item` — Individual color item within a color row. + + **Tree** + + - `tree` — File tree container. + - `tree-folder` — Folder entry within a file tree. + - `tree-file` — File entry within a file tree. + + **Almond theme** + + - `almond-layout` — Root layout element for the Almond theme. + - `almond-nav-bottom-section` — Bottom section of the Almond theme navigation. + - `almond-nav-bottom-section-divider` — Divider in the bottom section of the Almond theme navigation. **Data attributes** @@ -203,16 +385,14 @@ Mintlify has a set of common identifiers and selectors to help you tag important - - References and the styling of common elements are subject to change as the platform evolves. Please use custom styling with caution. - + + Use inspect element to find references to elements you're looking to customize. + ## Custom JavaScript Custom JS allows you to add custom executable code globally. It is the equivalent of adding a `