Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[system] Missing documentation in flex-box #29050

Closed
emanual4real opened this issue Oct 14, 2021 · 4 comments · Fixed by #29117
Closed

[system] Missing documentation in flex-box #29050

emanual4real opened this issue Oct 14, 2021 · 4 comments · Fixed by #29117
Labels
docs Improvements or additions to the documentation good first issue Great for first contributions. Enable to learn the contribution process. new feature New feature or request package: system Specific to @mui/system

Comments

@emanual4real
Copy link

Expected Behavior:

I expect to see all the justifyContent options like space-between and space-evenly on https://mui.com/system/flexbox/

Actual Behavior

I do not see examples or documentation for space-between or space-evenly

image

I'm new to MUI and only found out about these options from a MUI veteran user.

@siriwatknp siriwatknp added the docs Improvements or additions to the documentation label Oct 15, 2021
@siriwatknp
Copy link
Member

Note that justifyContent is not MUI specific but a CSS property. I think that's why we don't document all of its value. However, adding a couple of lines might help people to see what options they can use. 👍

@siriwatknp siriwatknp added new feature New feature or request good first issue Great for first contributions. Enable to learn the contribution process. labels Oct 15, 2021
@oliviertassinari
Copy link
Member

If we want to be exhaustive, we would need to cover:

justify-content: center;
justify-content: start;
justify-content: end;
justify-content: flex-start;
justify-content: flex-end;
justify-content: left;
justify-content: right;
justify-content: normal;
justify-content: space-between;
justify-content: space-around;
justify-content: space-evenly;
justify-content: stretch;
justify-content: safe center;
justify-content: unsafe center;
justify-content: inherit;
justify-content: initial;
justify-content: revert;
justify-content: unset;

So I would suggest we don't list everything. We could:

  1. List the most popular ones: [system] Missing documentation in flex-box #29050 (comment)
  2. Document that all the values are supported, that what we include is only an example. Maybe we could even link MDN https://developer.mozilla.org/docs/Web/CSS/justify-content
  3. Rework the design, it could look better:

Screenshot 2021-10-15 at 12 54 50

maybe we should follow this style https://mui.com/system/grid/#grid-template-columns cc @danilo-leal.

@oliviertassinari oliviertassinari added the package: system Specific to @mui/system label Oct 15, 2021
@oliviertassinari oliviertassinari changed the title Missing documentation in flex-box [system] Missing documentation in flex-box Oct 15, 2021
@mochi-sann
Copy link

Can I work this?

@omarmosid
Copy link
Contributor

omarmosid commented Oct 17, 2021

@oliviertassinari @siriwatknp I was able get this working locally:
image

  1. Added space-between, space-around and space-evenly as they seem to be most popular ones
  2. Added the MDN link right underneath the example code
  3. Changed the styling based on how it's being done for grid

Before I go ahead and submit a PR, should I apply this same Box item styling to everywhere else where we have these boxes? (all the other flexbox examples have the item box with gray background)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation good first issue Great for first contributions. Enable to learn the contribution process. new feature New feature or request package: system Specific to @mui/system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants