Amsterdam / design-system

Amsterdam Design System based on NL Design System
http://designsystem.amsterdam/
European Union Public License 1.2
19 stars 8 forks source link

Is it possible to remove the default padding-left in a grid? #1734

Open remyvdwereld opened 2 weeks ago

remyvdwereld commented 2 weeks ago

Describe the issue

When using a Grid, there is a default padding-left. Is it possible to remove this or create a property for this?

Now I have to add an extra style={{ paddingLeft: 0 }}.

Sandbox

VincentSmedinga commented 1 week ago

I’m afraid not. The Grid is intended for page-wide layout only, and its horizontal whitespace is essential to prevent content from touching the edge of the window. What’s the reason to remove this white space?

Have you seen our example form? Can you set up your form just like it?

remyvdwereld commented 1 week ago

I have a default layout for my pages with a padding-left. I use the Grid with a form in one page so that means another padding-left.

VincentSmedinga commented 3 days ago

@remyvdwereld It sounds like you’re nesting two Grids, but that is incorrect. The intended hierarchy is Screen > Grid > Grid Cell > form > various of Field and FieldSet.

We have yet to formulate our advice on sizing and arranging form elements. Until then, your best option is to use Screen and Grid in your default layout and create a custom grid for the fields in your form.

VincentSmedinga commented 2 days ago

@remyvdwereld I understand @dnlr helped you out with this yesterday. Can we close this ticket?