mozilla / mozilla/protocol

Allow `mzp-t-columns-three` selectively shrink to two columns instead of just one

Open
#950 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
SCSS
Stars
298
Forks
83
Avg merge
16h 48m
Merged PRs (30d)
1

Description

Currently only mzp-t-columns-four allows shifting to 2col layout in small containers:

https://github.com/mozilla/protocol/blob/043e8a42e2a1cb52d7daed2a3808bd2996ce34bc/components/layout/02-columns/readme.md?plain=1#L39-L44

Can maybe a modifier of some sorts be used to selectively allow even a mzp-t-columns-three to change to 2col instead of just linear layout, when the author knows the presentation, layout and order of such content is not important and the columns can be reshuffled freely?

Please describe the use case(s) for this component

Often a mzp-t-columns-three layout doesn't need to retain the 3×N relation of the elements and their more relaxed reordering is not an issue. (Whereas in default the actual 3×N layout to place elements side-by-side might be necessary, so I guess this should be behind a class flag to explicitly allow it(?))

Please describe the change you wish to see

Explore a meaningful way to add such a modifier class to allow even/multiple columns for smaller containers even for odd-column-layout component.

Please describe why these changes need to be made

Allowing more adaptive layouts for mid-size viewports for mzp-t-columns-three instead of just linear layouts.

Please describe where this component is currently in use

https://www.mozilla.org/products/ (+2col downgrade PoC https://github.com/janbrasna/bedrock/commit/78bd6487de03bb7e5174d7c9c168a07f1136f7a7)
https://www.mozilla.org/firefox/developer/#fordevs (where smaller viewports align the DevTools features to one side making it seem like content's missing)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with components/layout/02-columns/readme.md and inspect the three-column component styles and responsive rules described there. Compare the existing four-column two-column behavior, then define a modifier for three-column layouts and document the intended small-container behavior; done means the modifier works without changing the default layout and the documented use cases render as expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
scss
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.