Skip to content

toggle creation/replacement model is a bit unclear #20

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
dbaron opened this issue Jul 1, 2022 · 3 comments
Open

toggle creation/replacement model is a bit unclear #20

dbaron opened this issue Jul 1, 2022 · 3 comments

Comments

@dbaron
Copy link
Collaborator

dbaron commented Jul 1, 2022

3. Creating a Toggle: the toggle-root property says:

In addition to specifying how to create new toggles, a toggle specifier overrides the existing toggle’s states, overflow, and group, if they differ, allowing an existing toggle to have its behavior changed if necessary.

It is notable that this list does not include the scope. Does this imply that if the scope in a specifier changes, you end up with two toggles with the same name on the same element, with different scopes? Or should it list scope as well?

Also, this statement seems to contradict 2. Toggle Concepts, which says:

Once created, none of their items are affected by CSS, and only their value can be changed by user interaction.

@tabatkins
Copy link
Owner

It is notable that this list does not include the scope. Does this imply that if the scope in a specifier changes, you end up with two toggles with the same name on the same element, with different scopes? Or should it list scope as well?

It definitely shouldn't make another one. It probably should list scope, I'll have to look closely at this.

Also, this statement seems to contradict 2. Toggle Concepts, which says:

It's not contradictory - the values aren't changed, they can just be overridden at time-of-use. But it's definitely phrased somewhat confusingly. ^_^

@dbaron
Copy link
Collaborator Author

dbaron commented Jul 8, 2022

Oh, I realized that if scope should override, that overriding should be in the fire a toggle activation algorithm.

@dbaron
Copy link
Collaborator Author

dbaron commented Jul 14, 2022

(Though I think making scope override would make things a good bit harder; it's probably easier as-is.)

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