Skip to content

fix(zh-cn): sync min-width auto description with upstream#36236

Open
janfeise wants to merge 1 commit into
mdn:mainfrom
janfeise:sync-min-width-auto-zhcn
Open

fix(zh-cn): sync min-width auto description with upstream#36236
janfeise wants to merge 1 commit into
mdn:mainfrom
janfeise:sync-min-width-auto-zhcn

Conversation

@janfeise
Copy link
Copy Markdown

@janfeise janfeise commented May 27, 2026

Description

同步 min-width 属性中 auto 值的中文翻译,补充了 flex 和 grid 子项自动最小尺寸的完整说明。

更新内容:

  • auto 值的基础行为(块级、行内、表格布局等解析为 0
  • flex item 和 grid item 的自动最小尺寸计算规则:
    • 首选使用指定的建议尺寸(如 width
    • 其次使用通过 aspect-ratio 传递的尺寸
    • 否则使用 min-content 尺寸
  • 特殊情况的处理:滚动容器(scroll container)或多列轨道中的 grid item 自动最小尺寸为 0

Motivation

开发时查阅文档发现,min-width: auto 值的中文说明较为简略,且与英文原版文档存在较大差异,因此对其进行了更新。

英文原版文档中对 min-width: auto 在 flex/grid 上下文中的行为有详细说明,但当前中文翻译缺失了以下关键信息:

  • flex/grid 子项的自动最小尺寸计算逻辑
  • aspect-ratio 传递尺寸的说明
  • 滚动容器的特殊规则

这些内容对于理解现代 CSS 布局(尤其是 flex 和 grid 防止溢出的行为)非常重要。此 PR 旨在补全翻译,使中文文档与英文文档保持同步,帮助中文开发者准确理解 min-width: auto 在不同布局上下文中的表现。

Additional details

参考英文原文:

  • 源文件路径:files/en-us/web/css/reference/properties/min-width/index.md
  • auto 值说明中的 flex/grid 行为部分

相关 CSS 规范:

Related issues and pull requests

Relates to: #sync-min-width-auto(当前同步分支)

@janfeise janfeise requested a review from a team as a code owner May 27, 2026 09:01
@janfeise janfeise requested review from irvin and removed request for a team May 27, 2026 09:01
@github-actions github-actions Bot added the l10n-zh Issues related to Chinese content. label May 27, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Preview URLs (1 page)

Flaws (1)

Found an unexpected or unresolvable flaw? Please report it here.

URL: /zh-CN/docs/Web/CSS/Reference/Properties/min-width
Title: min-width
Flaw count: 1

  • macros:
    • Macro csssyntax produces link /zh-CN/docs/Web/CSS/Reference/Values/size-keyword which doesn't resolve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

l10n-zh Issues related to Chinese content.

Projects

Status: Review requested

Development

Successfully merging this pull request may close these issues.

1 participant