When using sections, I want to be able to use sub-sections without having all content further indented.
<section>
A
</section>
<section>
B
<section>
C
No additional inline padding please!
</section>
</section>
In fact, the Design System homepage already does this, it has nested sections that are aligned with their surrounding content instead of having additional horizontal padding: https://design-system.deutschebahn.com/documentation/components/section/
However, it seems to use a hack. It uses data-width=auto on the section, which is not a supported value, so none of the padding selectors apply:
Adding this unsupported value is not possible if you use type checking with the components...
TS2322: Type '"auto"' is not assignable to type '"full" | "medium" | "large" | "small" | undefined'.
...so I'd like to have official, supported version of this behavior :)
When using sections, I want to be able to use sub-sections without having all content further indented.
In fact, the Design System homepage already does this, it has nested sections that are aligned with their surrounding content instead of having additional horizontal padding: https://design-system.deutschebahn.com/documentation/components/section/
However, it seems to use a hack. It uses
data-width=autoon the section, which is not a supported value, so none of the padding selectors apply:Adding this unsupported value is not possible if you use type checking with the components...
...so I'd like to have official, supported version of this behavior :)