Skip to content

Conversation

@romainmenke
Copy link
Contributor

@romainmenke romainmenke commented Feb 1, 2026

Description

The current docs for display warn slightly against using the multi-keyword syntax and have some incorrect content (e.g. block is not a precomposed value, only inline-block is).

Motivation

Given that multi-keyword syntax is now Baseline Widely Available it seems a good time to update the wording to promote this syntax a bit more.

The multi-keyword syntax makes it easier to fully understand how both inner and outer display modes function.

Additional details

https://drafts.csswg.org/css-display-3/#the-display-properties

Related issues and pull requests

None

@romainmenke romainmenke requested a review from a team as a code owner February 1, 2026 15:41
@romainmenke romainmenke requested review from estelle and removed request for a team February 1, 2026 15:41
@github-actions github-actions bot added Content:CSS Cascading Style Sheets docs size/s [PR only] 6-50 LoC changed labels Feb 1, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 1, 2026

Preview URLs (1 page)

Flaws (4)

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

URL: /en-US/docs/Web/CSS/Reference/Properties/display
Title: display
Flaw count: 4

  • macros:
    • Macro cssinfo produces link /en-US/docs/Web/CSS/CSS_cascade/Value_processing which is a redirect
    • Macro cssinfo produces link /en-US/docs/Web/CSS/CSS_cascade/Inheritance which is a redirect
    • Macro cssinfo produces link /en-US/docs/Web/CSS/CSS_cascade/Value_processing which is a redirect
    • Macro cssinfo produces link /en-US/docs/Web/CSS/CSS_animated_properties which is a redirect

(comment last updated: 2026-02-03 07:31:17)

romainmenke and others added 2 commits February 1, 2026 16:43
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Member

@estelle estelle left a comment

Choose a reason for hiding this comment

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

Thank you for suggesting these edits. We do need to update this page. I made several suggestions.

display: contents;
display: table;

/* multi-keyword syntax */
Copy link
Member

Choose a reason for hiding this comment

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

we should either use "short syntax" and "full syntax" OR "single-keyword" and "multi-keyword".

display: inline list-item is both "short syntax" and "multi-keyword".

As the values are broken down by data-type under values, I suggest we keep it to three headers in the syntax section:

  1. short display
  2. full display
  3. global values

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've applied this suggestion, please let me know if I misunderstood or if further changes are needed.

  • moved precomposed values into short display
  • moved none and contents into short display (as seen in the table here)
  • omitted table-row from this section, it doesn't fit in any of these three sections


> [!NOTE]
> When browsers that support multi-keyword syntax encounter a display property that only has an **outer** value (e.g., `display: block` or `display: inline`), the inner value is set to `flow` (e.g., `display: block flow` and `display: inline flow`).
> When browsers encounter a display property that only has an **outer** value (e.g., `display: block` or `display: inline`), the inner value is set to `flow` (e.g., `display: block flow` and `display: inline flow`).
Copy link
Member

Choose a reason for hiding this comment

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

is this true?

let styleMap = el.computedStyleMap();
styleMap.get("display").value /* returns outer without inner */

I think it may be more accurate to write:

Suggested change
> When browsers encounter a display property that only has an **outer** value (e.g., `display: block` or `display: inline`), the inner value is set to `flow` (e.g., `display: block flow` and `display: inline flow`).
When a display property has only an **outer** value set (e.g., `display: block` or `display: inline`), the inner value defaults to `flow` (e.g., `display: block flow` and `display: inline flow`).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree! Good catch

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've applied a slight variant of your suggestions. Please let me know if this doesn't cover your feedback.


> [!NOTE]
> When browsers that support multi-keyword syntax encounter a display property that only has an **inner** value (e.g., `display: flex` or `display: grid`), the outer value is set to `block` (e.g., `display: block flex` and `display: block grid`).
> When browsers encounter a display property that only has an **inner** value (e.g., `display: flex` or `display: grid`), the outer value is set to `block` (e.g., `display: block flex` and `display: block grid`).
Copy link
Member

Choose a reason for hiding this comment

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

same comment as above. it defaults, but it isn't set (as in, there is no effect if querying the display value)

Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>

> [!NOTE]
> When browsers that support multi-keyword syntax encounter a display property that only has an **outer** value (e.g., `display: block` or `display: inline`), the inner value is set to `flow` (e.g., `display: block flow` and `display: inline flow`).
> When a display property has only an **outer** value (e.g., `display: block` or `display: inline`), the inner value defaults to `flow` (e.g., `display: block flow` and `display: inline flow`).
Copy link
Contributor Author

@romainmenke romainmenke Feb 3, 2026

Choose a reason for hiding this comment

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

Suggested change
> When a display property has only an **outer** value (e.g., `display: block` or `display: inline`), the inner value defaults to `flow` (e.g., `display: block flow` and `display: inline flow`).
> When a display property is specified with only an **outer** value (e.g., `display: block` or `display: inline`), the inner value defaults to `flow` (e.g., `display: block flow` and `display: inline flow`).

When a display property is specified with only an **outer** value

vs.

When a display property has only an **outer** value set as suggested by @estelle

value set could be read as a set of values, which was confusing to me.

This wording matches: https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Display/Multi-keyword_syntax#:~:text=%22If%20a%20%3Cdisplay%2Doutside%3E%20value%20is%20specified%20but%20%3Cdisplay%2Dinside%3E%20is%20omitted%2C%20the%20element's%20inner%20display%20type%20defaults%20to%20flow.%22

@romainmenke
Copy link
Contributor Author

Thank you for the review @estelle 🙇
This is ready for a second look

Copy link
Member

@estelle estelle left a comment

Choose a reason for hiding this comment

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

Thanks! 🎉

@estelle estelle merged commit 3b50e6c into mdn:main Feb 3, 2026
7 checks passed
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