Skip to content

Support nested <db-section> without adding horizontal padding #6633

@jonaskuske

Description

@jonaskuske

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 :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for Feature.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions