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

update default for flex wrap styles #2388

Merged
merged 2 commits into from
Feb 22, 2023
Merged

update default for flex wrap styles #2388

merged 2 commits into from
Feb 22, 2023

Conversation

arelia
Copy link
Contributor

@arelia arelia commented Feb 21, 2023

What are you trying to accomplish?

  • updates documentation to indicate that the default wrap style for flexbox is flex-wrap: no-wrap

What approach did you choose and why?

  • Per the W3 spec no-wrap is the default value
  • I haven't found the declaration for .d-flex in https://github.com/primer/css, but looking at how the CSS is applied in the browser it doesn't look like Primer sets wrap on that class either, so it wouldn't be the default for an application using Primer (although our application may be behind in Primer versions)

image

What should reviewers focus on?

  • Is this change correct? Have I missed something in Primer or misunderstood the spec?
  • If this change is correct should the flex-nowrap line be first in the list in the documentation, as the default?

Can these changes ship as is?

  • Yes, this PR does not depend on additional changes. 🚢

@arelia arelia requested a review from a team as a code owner February 21, 2023 23:09
@arelia arelia requested a review from jonrohan February 21, 2023 23:09
@changeset-bot
Copy link

changeset-bot bot commented Feb 21, 2023

🦋 Changeset detected

Latest commit: b99ce07

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/css Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@simurai simurai self-assigned this Feb 22, 2023
Copy link
Contributor

@simurai simurai left a comment

Choose a reason for hiding this comment

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

Is this change correct? Have I missed something in Primer or misunderstood the spec?

Yes, this looks correct. Thanks. 🙇

If this change is correct should the flex-nowrap line be first in the list in the documentation, as the default?

Usually the default is written first, so yeah, I would say moving .flex-nowrap to the top would be great. 👍

@jonrohan jonrohan enabled auto-merge (squash) February 22, 2023 19:50
@jonrohan jonrohan merged commit 3ceb196 into primer:main Feb 22, 2023
@primer-css primer-css mentioned this pull request Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants