Skip to content

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

refactor: Simplify CSS with :is() and add anchor tag support

Sushmithamallesh95e2d37fe716
diff --git a/docs/app/global.css b/docs/app/global.css
index 1fe1f4c07..b5165c680 100644
--- a/docs/app/global.css
+++ b/docs/app/global.css
@@ -463,6 +463,14 @@ nav a[href*="app.composio"]:focus-visible {
/* ==========================================================================
OpenAPI Reference - Field Indicators
+
+ Replaces fumadocs-openapi's default ? and * indicators with explicit
+ (optional) and (required) labels after the type.
+
+ Targets: span (simple types), button (expandable objects/arrays), a (links)
+
+ Note: This depends on fumadocs-openapi's internal class structure.
+ If the library updates its classes, this CSS may need adjustment.
========================================================================== */
/* Hide original indicators (* and ?) after property name */
@@ -471,8 +479,8 @@ span.font-mono.text-fd-primary > span.text-fd-muted-foreground:last-child {
display: none;
}
-/* Add (required) after type for required fields - simple types (span) */
-div.flex.items-center:has(> span.font-mono.text-fd-primary > span.text-red-400) > span.text-sm.font-mono::after {
+/* Add (required) after type for required fields */
+div.flex.items-center:has(> span.font-mono.text-fd-primary > span.text-red-400) > :is(span, button, a).text-sm.font-mono::after {
content: "(required)";
font-size: 0.75rem;
font-weight: 400;
@@ -480,26 +488,8 @@ div.flex.items-center:has(> span.font-mono.text-fd-primary > span.text-red-400)
color: #f87171;
}
-/* Add (required) after type for required fields - complex types (button) */
-div.flex.items-center:has(> span.font-mono.text-fd-primary > span.text-red-400) > button.text-sm.font-mono::after {
- content: "(required)";
- font-size: 0.75rem;
- font-weight: 400;
- margin-left: 0.25rem;
- color: #f87171;
-}
-
-/* Add (optional) after type for optional fields - simple types (span) */
-div.flex.items-center:has(> span.font-mono.text-fd-primary > span.text-fd-muted-foreground:last-child):not(:has(> span.font-mono.text-fd-primary > span.text-red-400)) > span.text-sm.font-mono::after {
- content: "(optional)";
- font-size: 0.75rem;
- font-weight: 400;
- margin-left: 0.25rem;
- color: var(--color-fd-muted-foreground);
-}
-
-/* Add (optional) after type for optional fields - complex types (button) */
-div.flex.items-center:has(> span.font-mono.text-fd-primary > span.text-fd-muted-foreground:last-child):not(:has(> span.font-mono.text-fd-primary > span.text-red-400)) > button.text-sm.font-mono::after {
+/* Add (optional) after type for optional fields */
+div.flex.items-center:has(> span.font-mono.text-fd-primary > span.text-fd-muted-foreground:last-child):not(:has(> span.font-mono.text-fd-primary > span.text-red-400)) > :is(span, button, a).text-sm.font-mono::after {
content: "(optional)";
font-size: 0.75rem;
font-weight: 400;