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

20987 initial CSS container queries updates #22186

Merged
merged 35 commits into from
Nov 14, 2022

Conversation

bsmth
Copy link
Member

@bsmth bsmth commented Nov 9, 2022

This PR is a first pass for improving the documentation for CSS container queries.
I expect there to be some further follow-ups to add more details and (live/interactive) examples where necessary or other pages that I've missed here.

Highlights

Updates:

  • css_container_queries most of the updates occur in this doc including
    • summaries of the properties with examples of their usage
    • new diagrams
    • links to new properties & related docs
  • length: added information to this document about "container query length units" which allow you to specify a length relative to the dimensions of a query container.
  • media queries page: added references to container queries with a new diagram explaining media queries

Additions:

  • @container at-rule
  • container-name property
  • container-type property
  • container shorthand property (simplifies container name and type to one declaration)

@bsmth bsmth requested a review from a team as a code owner November 9, 2022 12:08
@bsmth bsmth requested review from estelle and removed request for a team November 9, 2022 12:08
@github-actions github-actions bot added Content:CSS Cascading Style Sheets docs Content:Learn Learning area docs labels Nov 9, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Nov 9, 2022

@bsmth bsmth requested a review from dipikabh November 9, 2022 15:25
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.

Reviewed the at-rule. Still working on it.

For the @container page:

  • The "descriptors" are not descriptor. They are query features.
  • We're missing the height feature.
  • People don't fully understand inline and block direction, so that needs to be linked (not a give).
  • The container condition is not limited to feature query; only single feature query example and syntax is shown
  • The style() option of the container query is not discussed
  • Query modifiers are missing
  • stringing multiple conditions with modifiers is missing
  • No information is provided on the container name syntax
    • a custom ident is case sensitive
    • can not be a keyword that may conflict or the word default
    • can start with --, which is a different kind of ident, but i forget the name
    • is not quoted

files/en-us/web/css/@container/index.md Show resolved Hide resolved
files/en-us/web/css/@container/index.md Show resolved Hide resolved
files/en-us/web/css/@container/index.md Show resolved Hide resolved
files/en-us/web/css/@container/index.md Outdated Show resolved Hide resolved
files/en-us/web/css/@container/index.md Outdated Show resolved Hide resolved
@bsmth
Copy link
Member Author

bsmth commented Nov 11, 2022

Tracking review suggestions:

@container

  • The "descriptors" are not descriptor. (see review comment)
  • We're missing the height feature. (done in cd6eaff)
  • People don't fully understand inline and block direction, so that needs to be linked (not a give). (done in cd6eaff)
  • The container condition is not limited to feature query; only single feature query example and syntax is shown (added in 23a1b02)
  • The style() option of the container query is not discussed (added in 23a1b02)
  • Query modifiers are missing (added in 23a1b02)
  • stringing multiple conditions with modifiers is missing (added in 23a1b02)
  • No information is provided on the container name syntax (added in 1a96d30)
    • a custom ident is case sensitive
    • can not be a keyword that may conflict or the word default
    • can start with --, which is a different kind of ident, but i forget the name
    • is not quoted

@estelle estelle merged commit 24ccba7 into mdn:main Nov 14, 2022
estelle added a commit that referenced this pull request Nov 14, 2022
@bsmth
Copy link
Member Author

bsmth commented Nov 14, 2022

Thanks @estelle

Note:
This one was merged early, there are unaddressed review comments that I'll carry over to a new PR.

@bsmth bsmth mentioned this pull request Dec 8, 2022
8 tasks
@bsmth bsmth mentioned this pull request Nov 17, 2023
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 Content:Learn Learning area docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants