Skip to content

Conversation

@Josh-Cena
Copy link
Member

@Josh-Cena Josh-Cena commented Jul 27, 2025

I've been long bothered by the fact that "CSSOM view" is not a real API group on MDN. It makes our IA extremely awkward because existing references either have get the sidebar of its owner interface (such as "DOM" for Window and Document extensions, or "UI events" for MouseEvent extensions) or be fakely labeled as "CSSOM". "Visual Viewport API" is also not a real spec anymore. So we basically hacked around the whole issue of lacking a proper API group.

Meanwhile we do have a "CSSOM view" landing page, but it's confusingly categorized as CSS, which means it cannot be used as the landing page of a web API group, because of the way our groupdata.json works. All the other CSS specs that define JS bindings, such as CSSOM, CSS Typed OM, etc. are under web API, so I think this should be no exception: the CSS docs should be left to the CSS language proper, not for JS bindings.

I'm adding the groupdata for the new interfaces only. There are too many interface extensions and I'm not interested in updating their sidebars in this PR, although a future one might.

@Josh-Cena Josh-Cena requested review from a team as code owners July 27, 2025 11:10
@Josh-Cena Josh-Cena requested review from estelle, pepelsbey and sideshowbarker and removed request for a team July 27, 2025 11:10
@github-actions github-actions bot added Content:CSS Cascading Style Sheets docs Content:WebAPI Web API docs Content:Learn Learning area docs Content:Glossary Glossary entries size/l [PR only] 501-1000 LoC changed labels Jul 27, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Jul 27, 2025

Preview URLs (67 pages)
Flaws (1)

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

URL: /en-US/docs/Web/CSS/CSSOM_view/Viewport_concepts
Title: Viewport concepts
Flaw count: 1

  • broken_links:
    • Can't resolve /en-US/docs/Web/API/Viewport_API
External URLs (1)

URL: /en-US/docs/Web/API/Device_orientation_events/Using_device_orientation_with_3D_transforms
Title: Using device orientation with 3D transforms

(comment last updated: 2025-09-11 18:18:09)

@sideshowbarker sideshowbarker removed request for a team and sideshowbarker July 27, 2025 11:50
@estelle
Copy link
Member

estelle commented Jul 27, 2025

We should probably move this to a discussion.

I just recently (last week) added https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_custom_highlight_API to the docs. We also have a https://developer.mozilla.org/en-US/docs/Web/API/CSS_custom_highlight_API page. They serve different purposes.

Similarly, https://developer.mozilla.org/en-US/docs/Web/CSS/CSSOM_view could have a https://developer.mozilla.org/en-US/docs/Web/API/CSSOM_view page (we have https://developer.mozilla.org/en-US/docs/Web/API/CSS_Object_Model, so we do have it).

The page should not be moved / removed from the CSS module landing pages section because CSSOM is a CSS module. Every CSS spec should have a CSS module landing page. I've been working on that for .... checks calendar .... almost 2 years?

@Josh-Cena
Copy link
Member Author

Josh-Cena commented Jul 27, 2025

If a CSS spec does not define any at-rules, selectors, properties, functions, or types, then it would have nothing to be associated with in the CSS docs. In the future when we have features nested under the module folders, these modules would weirdly have nothing under them because well they are not CSS. CSS highlight API does have both CSS and API, so it should rightfully be documented under both, but CSSOM view is purely a web API that just happens to be standardized by CSSWG. For example, the websec group also publishes API bindings such as the reporting API, and that is documented as a web API as opposed to an HTTP feature.

Thinking about it from another perspective: anything called "X object model" inherently is a web API, not "X" itself. For example DOM is not nested under XML or HTML, and neither is SVG DOM or HTML DOM. They are all inherently bindings in the API realm that enable working with the said language. Similarly anything branded as "CSSOM" is not "CSS", but a foreign interface for interacting with CSS.

@github-actions github-actions bot added the merge conflicts 🚧 [PR only] label Jul 28, 2025
@github-actions
Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions
Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions github-actions bot removed the merge conflicts 🚧 [PR only] label Aug 19, 2025
@Rumyra
Copy link
Collaborator

Rumyra commented Aug 22, 2025

Update as said in the last editorial:

I think we should keep the module page (as it is a CSS module page type) but review the documentation of this under the API section and make sure it is complete there as well 👍

@Josh-Cena
Copy link
Member Author

Porting over my question from Discord: What's the definition of a "CSS module"? Why can something that defines no CSS language feature be considered a CSS module?

@github-actions github-actions bot added the merge conflicts 🚧 [PR only] label Sep 9, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Sep 9, 2025

This pull request has merge conflicts that must be resolved before it can be merged.

@estelle
Copy link
Member

estelle commented Sep 10, 2025

We should include a module landing page in the CSS module landing page section for all CSSWG specifications. The CSS module pages include the IDLs introduced in the spec, so omitting the a spec because it doesn't include properties would mean those are the only CSS spec IDLs not included in the CSS module section.

All the CSSWG specs are modules, but modules are not limited to the CSSWG . Specs from https://drafts.fxtf.org like masking, filtering, motion, etc., are also modules.

@github-actions github-actions bot removed the merge conflicts 🚧 [PR only] label Sep 10, 2025
@github-actions github-actions bot added size/m [PR only] 51-500 LoC changed and removed size/l [PR only] 501-1000 LoC changed labels Sep 10, 2025
@Josh-Cena
Copy link
Member Author

Fair enough. I have no intention to argue with that decision. I've restored the "CSSOM view" module landing page. However, I would like the guides to live under API, because they talk about the semantics of the JavaScript properties and not any CSS feature.

@github-actions github-actions bot added size/l [PR only] 501-1000 LoC changed and removed size/m [PR only] 51-500 LoC changed labels Sep 10, 2025
@Josh-Cena Josh-Cena changed the title Move CSSOM view module under API/ Move CSSOM view guide under API/, new API landing page Sep 10, 2025
@Josh-Cena Josh-Cena changed the title Move CSSOM view guide under API/, new API landing page New CSSOM view API landing page, move CSS guides under Sep 10, 2025
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.

The viewport concepts is about JS, HTML, SVG, and CSS, and is very relevant to several CSS concepts, including viewport related values, the CSS viewport module, and the CSS environment variables module. The viewport concepts guide needs to remain in the CSS section.

The coordinate system is related to SVG, JS, and CSS (think all the properties that accept a shape as a value. The example on the coordinate system page is more JS than CSS, so can be moved to the CSSOM View API section under APIs.,

Comment on lines 12144 to 12145
/en-US/docs/Web/CSS/CSSOM_view/Coordinate_systems /en-US/docs/Web/API/CSSOM_view_API/Coordinate_systems
/en-US/docs/Web/CSS/CSSOM_view/Viewport_concepts /en-US/docs/Web/API/CSSOM_view_API/Viewport_concepts
Copy link
Member

Choose a reason for hiding this comment

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

OK to move Coordinate_systems but not Viewport_concepts

@github-actions github-actions bot added size/m [PR only] 51-500 LoC changed and removed Content:Learn Learning area docs Content:Glossary Glossary entries size/l [PR only] 501-1000 LoC changed labels Sep 11, 2025
@Josh-Cena Josh-Cena requested a review from estelle September 11, 2025 18:16
@estelle estelle merged commit 896a41d into mdn:main Sep 15, 2025
9 checks passed
@Josh-Cena Josh-Cena deleted the cssom-view-api branch September 15, 2025 12:16
wbamberg added a commit to wbamberg/content that referenced this pull request Sep 15, 2025
* upstream/main: (32 commits)
  FF143 GPU import external texture experimental relnote (mdn#41126)
  added ff release note for nested pseudo-elements (mdn#41146)
  Add a page for SSRF attacks (mdn#41105)
  New CSSOM view API landing page, move CSS guides under (mdn#40547)
  40778 color input value (mdn#41086)
  Synchronize with BCD v7.1.5 (mdn#41116)
  Cross-reference `:target` and `::target-text` pages (mdn#41121)
  Fix content issues (mdn#41125)
  Make all JSON code syntactically valid (mdn#41120)
  Fix the link name with actual heading (mdn#41117)
  Associated listed form controls (mdn#41096)
  Mention `new Set()` accepts `undefined` (mdn#41106)
  chore: correct the `timeRange` function name (mdn#41107)
  Mention that custom elements constructors can't be directly called (mdn#41069)
  chore(deps): bump @mdn/fred from 1.3.2 to 1.4.0 (mdn#41111)
  Public-key cryptography glossary page: add headings and links (mdn#41092)
  Improve caret color demo contrast (mdn#41104)
  Fix supported algorithms for HKDF and PBKDF2 (mdn#41100)
  Update MongoDB example to async/await (driver v5+) (mdn#41102)
  Remove onload and DOMContentLoaded handlers (mdn#41079)
  ...
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:WebAPI Web API docs size/m [PR only] 51-500 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants