Skip to content

Content stretching #22

Open
Open
@DavidPetrasek

Description

@DavidPetrasek

Each ResponsiveColumn has display: inline-block, but it happened to me that I needed to use display: inline-table.

Here is the code to show you what I mean by using the classic Row and Column:

<Section>
    .....
    <Row>
       <Column>
                          
            <Section className="inline-block max-w-[900px]">    <-- Problem resolved by changing to inline-table
                <Row>
                    <Column className="bg-red-500">
                            <Text className="">
                                {"{{message}}"}
                            </Text>
                    </Column>
                </Row>
           </Section>

          <Section className="inline-table w-6"></Section>

           <Section className="inline-table w-[28%]">
                <Row>
                   <Column>
                       IMAGE
                   </Column>
                </Row>
           </Section>

    </Column>
   </Row>
    .....
</Section>

With inline-block the first red column (table) takes the width of its content (wrong):

Image

With inline-table the first column (table) stretches to fill the remaining space (desired result):

Image

Proposal

Add a new property to ResponsiveColumn to control content streching.
Something like this:
<ResponsiveColumn strechContent={true|false}>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions