Skip to content

.container should have padding for all breakpoints. #669

@Leftium

Description

@Leftium

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.

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