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

[docs] More explicit breakpoint documentation in sx #26140

Merged
merged 7 commits into from
May 5, 2021
Merged

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented May 5, 2021

  1. each sentence on a line
    Helps review
  2. Link to what sx does whenever it is mentioned
    This helps discovery if algolia decides to display a mention of sx as the first result
  3. Remove some this mention (https://developers.google.com/tech-writing/one/words#this_and_that)
    this can work if the reference is obvious. That's not always obvious though and may even change over time if sentences move farther apart.
  4. Describe in prose what sx={{ lg: {} }} matches
    breakpoints comparison was mentioned in the paragraph earlier in a code comment so easy to miss if you already know sx but not how breakpoints work.
    See my struggle in [Hidden] Remove component #26135 (comment)

@eps1lon eps1lon added the docs Improvements or additions to the documentation label May 5, 2021
The `unstable_styleFunctionSx` utility adds the support for the `sx` to your own components. Normally you would use the `Box` components from `@material-ui/core` at the root of your component tree. If you would like to use the system independently from Material-UI, this utility will give you the same capabilities, while having a smaller bundle size.
The `unstable_styleFunctionSx` utility adds the support for the [`sx` prop](/system/basics/#the-sx-prop) to your own components.
Normally you would use the `Box` component from `@material-ui/core` at the root of your component tree.
If you would like to use the system independently from Material-UI, the `unstable_styleFunctionSx` utility will give you the same capabilities, while having a smaller bundle size.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "this" refernce was more than one sentence away. I noticed that I had to stop reading to understand what this is referring to (I wasn't sure if "this" referred to Box or unstable_styleFunctionSx even though unstable_styleFunctionSx is implied by "this utility".

@mui-pr-bot
Copy link

mui-pr-bot commented May 5, 2021

No bundle size changes

Generated by 🚫 dangerJS against d27c0b8

Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

For the up behavior, we had #25846 to ask for a way to configure a down one

Copy link
Member

@mnajdova mnajdova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@eps1lon
Copy link
Member Author

eps1lon commented May 5, 2021

For the up behavior, we had #25846 to ask for a way to configure a down one

Which is relevant for <Hidden lgDown /> I think? Or maybe I'm missing something. Continuing this discussion in #26135 (comment) might be more appropriate.

@eps1lon eps1lon merged commit 551ad87 into mui:next May 5, 2021
@eps1lon eps1lon deleted the docs/sx branch May 5, 2021 10:44
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants