MJCF schema: use responsive grids for attributes
PiperOrigin-RevId: 853263519 Change-Id: I79cb6e6208061d9546f0dca7a941838caa6b1a91
This commit is contained in:
committed by
Copybara-Service
parent
5febca9eeb
commit
775c0698c3
+170
-169
File diff suppressed because it is too large
Load Diff
+5343
-2932
File diff suppressed because it is too large
Load Diff
+45
-16
@@ -38,14 +38,14 @@ body[data-theme="dark"] table.docutils:not(.mjcf-attributes) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.schema-small {
|
|
||||||
font-size: 93%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.caption-small {
|
.caption-small {
|
||||||
font-size: 85%;
|
font-size: 85%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.table-small {
|
||||||
|
font-size: 93%;
|
||||||
|
}
|
||||||
|
|
||||||
.small-centered {
|
.small-centered {
|
||||||
font-size: 93%;
|
font-size: 93%;
|
||||||
}
|
}
|
||||||
@@ -310,16 +310,23 @@ details summary {
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Compact schema dropdowns */
|
/* ==========================================================================
|
||||||
|
Schema display styling (.schema-small)
|
||||||
|
Used in: XMLreference.rst (dropdowns + grids)
|
||||||
|
========================================================================== */
|
||||||
|
|
||||||
|
/* Base: smaller font for compact display */
|
||||||
|
.schema-small {
|
||||||
|
font-size: 93%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Dropdown styling: compact margins and padding */
|
||||||
.schema-small details.sd-dropdown {
|
.schema-small details.sd-dropdown {
|
||||||
margin-bottom: 0.15em !important;
|
margin-bottom: 0.15em !important;
|
||||||
margin-top: 0 !important;
|
margin-top: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.schema-small .sd-card-header {
|
.schema-small .sd-card-header,
|
||||||
padding: 0.25em 0.5em !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.schema-small .sd-card-body {
|
.schema-small .sd-card-body {
|
||||||
padding: 0.25em 0.5em !important;
|
padding: 0.25em 0.5em !important;
|
||||||
}
|
}
|
||||||
@@ -329,19 +336,13 @@ details summary {
|
|||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Prevent visited link color change in schema - use brand color */
|
/* Dropdown hierarchy: left border visualization */
|
||||||
.schema-small a:visited {
|
|
||||||
color: var(--color-brand-primary) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Hierarchy visualization - left border for all dropdowns including top-level */
|
|
||||||
.schema-small .sd-dropdown,
|
.schema-small .sd-dropdown,
|
||||||
.schema-small > .sd-dropdown,
|
.schema-small > .sd-dropdown,
|
||||||
.schema-small details.sd-dropdown {
|
.schema-small details.sd-dropdown {
|
||||||
border-left: 2px solid #5671cf;
|
border-left: 2px solid #5671cf;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dark mode - slightly brighter blue for visibility */
|
|
||||||
body[data-theme="dark"] .schema-small .sd-dropdown,
|
body[data-theme="dark"] .schema-small .sd-dropdown,
|
||||||
body[data-theme="dark"] .schema-small > .sd-dropdown,
|
body[data-theme="dark"] .schema-small > .sd-dropdown,
|
||||||
body[data-theme="dark"] .schema-small details.sd-dropdown {
|
body[data-theme="dark"] .schema-small details.sd-dropdown {
|
||||||
@@ -355,3 +356,31 @@ body[data-theme="dark"] .schema-small details.sd-dropdown {
|
|||||||
border-left-color: #7b93e8;
|
border-left-color: #7b93e8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Link styling: prevent visited color change */
|
||||||
|
.schema-small a:visited {
|
||||||
|
color: var(--color-brand-primary) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Grid styling: compact rows for attribute lists */
|
||||||
|
.schema-small .sd-row {
|
||||||
|
row-gap: 0 !important;
|
||||||
|
--sd-gutter-x: 0.5rem !important;
|
||||||
|
--sd-gutter-y: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.schema-small .sd-col,
|
||||||
|
.schema-small [class*="sd-col-"] {
|
||||||
|
padding-top: 0 !important;
|
||||||
|
padding-bottom: 0.1em !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.schema-small .sd-container-fluid {
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Remove paragraph margin inside grid items */
|
||||||
|
.schema-small .sd-container-fluid .sd-col p,
|
||||||
|
.admonition .sd-container-fluid .sd-col p {
|
||||||
|
margin-bottom: 0 !important;
|
||||||
|
}
|
||||||
|
|||||||
@@ -652,7 +652,7 @@ Exceptions to the general rule that **integer** types are **not safe to change**
|
|||||||
.. list-table::
|
.. list-table::
|
||||||
:widths: 1 1 4
|
:widths: 1 1 4
|
||||||
:header-rows: 1
|
:header-rows: 1
|
||||||
:class: schema-small
|
:class: table-small
|
||||||
|
|
||||||
* - Field
|
* - Field
|
||||||
- Modifiability
|
- Modifiability
|
||||||
@@ -693,7 +693,7 @@ Exceptions to the general rule that **real-valued** types **are safe to change**
|
|||||||
.. list-table::
|
.. list-table::
|
||||||
:widths: 1 1 4
|
:widths: 1 1 4
|
||||||
:header-rows: 1
|
:header-rows: 1
|
||||||
:class: schema-small
|
:class: table-small
|
||||||
|
|
||||||
* - Field
|
* - Field
|
||||||
- Modifiability
|
- Modifiability
|
||||||
|
|||||||
Reference in New Issue
Block a user