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

Should spec constants be uppercased by build rather than CSS? #621

Closed
gibson042 opened this issue Sep 30, 2024 · 2 comments
Closed

Should spec constants be uppercased by build rather than CSS? #621

gibson042 opened this issue Sep 30, 2024 · 2 comments

Comments

@gibson042
Copy link
Contributor

It's a bit odd that text at e.g. NormalCompletion has a step that looks like "Return Completion Record { [[Type]]: NORMAL, [[Value]]: value, [[Target]]: EMPTY }." but copies as "Return Completion Record { [[Type]]: normal, [[Value]]: value, [[Target]]: empty }." (because text-transform "has no effect on the underlying content, and must not affect the content of a plain text copy & paste operation").

It would probably reduce surprise (and increase the value of copy–paste interactions for purposes such as test262) to perform uppercasing at build time such that it is part of the resulting HTML source:

-{ <var class="field">[[Type]]</var>: <emu-const>normal</emu-const>, <var class="field">[[Value]]</var>: <var>value</var>, <var class="field">[[Target]]</var>: <emu-const>empty</emu-const>&nbsp;}
+{ <var class="field">[[Type]]</var>: <emu-const>NORMAL</emu-const>, <var class="field">[[Value]]</var>: <var>value</var>, <var class="field">[[Target]]</var>: <emu-const>EMPTY</emu-const>&nbsp;}
@bakkot
Copy link
Contributor

bakkot commented Sep 30, 2024

The alternative is for them to copy as ~empty~, with tildes added in, to better match the source rather than the display. See #550.

@gibson042
Copy link
Contributor Author

Ah yeah, that's probably better.

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

No branches or pull requests

2 participants