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

Refactor notes to recommend using the flex shorthand for separate dec… #38688

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

zhangenming
Copy link
Contributor

…larations

Description

Motivation

Additional details

Related issues and pull requests

@zhangenming zhangenming requested a review from a team as a code owner March 18, 2025 03:17
@zhangenming zhangenming requested review from estelle and removed request for a team March 18, 2025 03:17
@github-actions github-actions bot added Content:CSS Cascading Style Sheets docs size/s [PR only] 6-50 LoC changed labels Mar 18, 2025
Copy link
Contributor

github-actions bot commented Mar 18, 2025

Preview URLs

Flaws (2)

Note! 2 documents with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Web/CSS/flex-basis
Title: flex-basis
Flaw count: 2

  • broken_links:
    • Can't resolve /en-US/docs/Web/CSS/intrinsic-size-keyword
  • macros:
    • Macro produces link /en-US/docs/Glossary/flex_item which is a redirect

(comment last updated: 2025-03-18 03:45:29)

@@ -10,7 +10,7 @@ browser-compat: css.properties.flex-basis
The **`flex-basis`** [CSS](/en-US/docs/Web/CSS) property sets the initial main size of a {{glossary("flex item")}}. It sets the size of the content box unless otherwise set with {{Cssxref("box-sizing")}}.

> [!NOTE]
> It is recommended to use the {{cssxref("flex")}} shorthand instead of separate `flex-grow`, `flex-shrink`, and `flex-basis` declarations. We have separated them here as this document is about one of the shorthand components: the `flex-basis` property.
> It is recommended to use the {{cssxref("flex")}} shorthand instead of this longhand, as the shorthand correctly resets any unspecified components to accommodate common uses.
Copy link
Member

Choose a reason for hiding this comment

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

"correctly" seems a bit loaded to me. I prefer the original, but since I wrote it, I am biased. @dipikabh can you weigh in?

Suggested change
> It is recommended to use the {{cssxref("flex")}} shorthand instead of this longhand, as the shorthand correctly resets any unspecified components to accommodate common uses.
> It is recommended to use the {{cssxref("flex")}} shorthand instead of the component longhand properties, as the shorthand sets the unspecified components to the most common use case values. We have separated them here as this document is about one of the shorthand components: the `flex-basis` property.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And I trust your professional judgment more..

component longhand It's just that the term seems a little strange, and it's probably the first time it's been used in this whole document library

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:CSS Cascading Style Sheets docs size/s [PR only] 6-50 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants