Skip to content

[css-properties-values-api] Calls to registerProperty() and unregisterProperty() should not trigger a CSS reparse #63

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

Closed
astearns opened this issue Oct 29, 2015 · 5 comments

Comments

@astearns
Copy link
Member

No description provided.

@astearns
Copy link
Member Author

shane: File bug, calls to registerProperty, should not reparse, as would change identity of CSSOM objects.

@shans
Copy link
Contributor

shans commented Oct 29, 2015

Instead just need to reparse specified values of newly registered properties then recompute style.

Sadly this implies that the token streams of all custom properties must be kept around to correctly deal with unregisterProperty then registerProperty w. different type on the same custom property.

@shans shans changed the title Calls to registerProperty() and unregisterProperty() should not trigger a CSS reparse [css-properties-values-api] Calls to registerProperty() and unregisterProperty() should not trigger a CSS reparse Oct 29, 2015
shans added a commit that referenced this issue Nov 23, 2015
@shans
Copy link
Contributor

shans commented Nov 23, 2015

There's prose in the specification now for this but I think it could be written up more clearly. In particular:

  1. can I just use the phrase 'invalidation of computed style'?
  2. how do I reference the set of documents created by the window that registerProperty is called on (via the CSS interface)?

@shans
Copy link
Contributor

shans commented Jan 27, 2016

@tabatkins thoughts?

@shans
Copy link
Contributor

shans commented Jan 30, 2016

Want to invoke whatever happens when you change style rules through the CSSOM.

--foo: red;
--foo: url('donkey');
color: var(--foo);

if we call:
registerProperty({
name: "--foo",
syntax: "<'color'>"
});

then color is red.

@shans shans closed this as completed Jan 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants