Apply 'box-sizing: border-box' globally.

Created on 30 October 2013, almost 12 years ago
Updated 16 June 2025, about 2 months ago

There's a strong argument to be made for applying box-sizing: border-box.

  1. It's easier to write fluid layouts, you can do crazy things like width: 80%; padding: 0 10px;
  2. Contrib modules can rely on it being applied, which means they don't need to add inner/wrapper divs on things to have reliable styling.

The downside is this will affect every width set by in core and contrib. We implemented this on the D7 version of Bluecheese and came across a few bugs with contrib module CSS. If contrib modules want a responsive admin interface in D8 they are probably going to have to rewrite all their CSS anyway so this probably isn't that big a deal.

Things left to do:

  • Move the box-sizing "hack" into system.theme.css.
  • Review the new patch again.
  • Take screenshots to make sure we don't break anything.
  • Move into classy?
πŸ“Œ Task
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component

CSS

Created by

πŸ‡¬πŸ‡§United Kingdom lewisnyman Nomadic

Live updates comments and jobs are added and updated live.
  • CSS

    It involves the content or handling of Cascading Style Sheets.

  • Needs screenshots

    The change alters the user interface, so before and after screenshots should be added to document the UI change. Make sure to capture the relevant region only. Use a tool such as Aviary on Windows or Skitch on Mac OS X.

  • Needs reroll

    The patch will have to be re-rolled with new suggestions/changes described in the comments in the issue.

  • stale-issue-cleanup

    To track issues in the developing policy for closing stale issues, [Policy, no patch] closing older issues

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Thank you for creating this issue to improve Drupal.

    We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.

    Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

    Thanks!

Production build 0.71.5 2024