Skip to content

Rely on the IDL definitions for dictionary members. #304

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pejic
Copy link
Collaborator

@pejic pejic commented Jun 17, 2025

Before this change dictionaries and their members were defined in IDL blocks, then the members were redefined using <dfn> elements inside <dl>. After this change the <dfn> and <dl>'s are removed; instead the IDL definitions of the members are referenced.

Additionally, this change reuses the styles for the domintro class from the WHATWG styles. Notably, this adds "For web developers (non-normative)" as a heading to each domintro block.

See issue #302.


Preview | Diff

Before this change dictionaries and their members were defined in IDL
blocks, then the members were redefined using `<dfn>` elements inside
`<dl>`. After this change the `<dfn>` and `<dl>`'s are removed; instead
the IDL definitions of the members are referenced.

Additionally, this change reuses the styles for the domintro class from
the WHATWG styles. Notably, this adds "For web developers
(non-normative)" as a heading to each domintro block.

See issue w3c#302.
@ianbjacobs
Copy link
Collaborator

(This is not my speciality so I defer.)

@stephenmcgruer
Copy link
Collaborator

Just to check, this is not currently marked as having any reviewers - @pejic , were you looking for it to be reviewed?

@pejic
Copy link
Collaborator Author

pejic commented Jun 26, 2025

Just to check, this is not currently marked as having any reviewers - @pejic , were you looking for it to be reviewed?

There was a check failure that I was going to find the time to resolve; however, the checks do pass now: So review can begin. I will add you, Stephen, to review.

@pejic pejic requested a review from stephenmcgruer June 26, 2025 20:37
@@ -122,6 +122,93 @@ spec:html; type:dfn; for:environment settings object; text:origin
}
</pre>

<style>
Copy link
Collaborator

@stephenmcgruer stephenmcgruer Jun 27, 2025

Choose a reason for hiding this comment

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

I don't love us pulling in random stylesheets generally (I understand from Slobodan that this is a stylesheet that the WHATWG uses, and that other bikeshed specs - maybe WICG - have perhaps adopted). If its useful, it feels like it should just be provided/used by bikeshed by default.

What do you think, @tabatkins ?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I have an open issue to help support domintro blocks. Tho there's more work to do for completeness, just pulling in the stylesheet when you use the class would be a trivial patch.

padding-bottom: 0.15em;
}

dl.domintro::before { content: 'For web developers (non-normative)'; }
Copy link
Collaborator

Choose a reason for hiding this comment

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

I also don't love that this marks the descriptions as non-normative. Generally I would agree that that is best behavior (it's confusing otherwise), but what about members like locale which are described/defined as:

An optional list of well-formed [[BCP47]] language tags, in descending
        order of priority, that identify the [=locale=] preferences of the
        website, i.e. a [=language priority list=] [[RFC4647]] ...

With this change, that becomes non-normative, and so in theory one needs additional spec text in the algorithms to ensure that the locale member is formed as described. That may actually be better, but we would need to do it ahead of this change or in one swap.

(No action for this second comment atm, just making sure I don't forget this for when I review later).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants