pico icon indicating copy to clipboard operation
pico copied to clipboard

`.container` should have padding for all breakpoints.

Open Leftium opened this issue 9 months ago • 0 comments

Describe the issue

The elements inside .container need more space around them (padding) when the <body> background color is different:

image

Current Behavior

Currently, Pico sets the padding of .container to 0 (except for the smallest breakpoint).

  • This looks OK if the background color of <body> and .container match.
    • Pico ensures there is "pseudo" padding by ensuring max-width is less than each breakpoint's min-width.
  • However, it doesn't look good when the <body> background color is different:
    • The elements inside .container touch the <body>

Expected Behavior

The padding of .container should be set to non-zero. To preserve the layout of existing Pico apps, the "pseudo" padding can be traded for real padding:

  1. Remove the conditional padding.
  2. Adjust the max-width for each breakpoint by adding the new padding amount.

Image

Reproduction URL

If a minimal reproduction would help, I would be happy to create one.

Environment

All environments that use any of the larger breakpoints.

Leftium avatar Mar 31 '25 08:03 Leftium