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

@property #402

Closed
3 of 5 tasks
andruud opened this issue Aug 7, 2019 · 5 comments
Closed
3 of 5 tasks

@property #402

andruud opened this issue Aug 7, 2019 · 5 comments
Assignees

Comments

@andruud
Copy link

andruud commented Aug 7, 2019

こんにちはTAG!

I'm requesting a TAG review of:

Further details:

We'd prefer the TAG provide feedback as (please select one):

  • open issues in our GitHub repo for each point of feedback
  • open a single issue in our GitHub repo for the entire review
  • leave review feedback as a comment in this issue and @-notify [github usernames]

Description:

The @property rule is briefly put a way to register a custom property in pure CSS.

For example, the two pieces of code (JS and CSS respectively) are equivalent, and result in exactly the same property registration:

CSS.registerProperty({
  name: '--x',
  syntax: '<length>',
  inherits: false,
  initialValue: '0px'
});
@property --x {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

Authors often just want make a custom property animatable, and having to resort to JS just for this is not always desirable or possible (e.g. JS may be disabled).

See also the amount of exceitement on the original proposal (reactions at the bottom of the first post).

Notable resolved issues:

@hober
Copy link
Contributor

hober commented Aug 9, 2019

Note to TAG colleagues: provisionally assigning to the same folks as #318 during triage. Please feel free to un-assign yourself. :)

@dbaron
Copy link
Member

dbaron commented Sep 10, 2019

We just filed two issues; since it's not 100% clear what direction the spec was intending to go on those issues (especially 942) it would be useful to get responses to those before reviewing further (although it might be, depending on the response, that we don't have further comments).

@dbaron
Copy link
Member

dbaron commented Dec 4, 2019

We (me @alice @hober @plinss) are looking at this in Cupertino.

We're happy with the responses to those two filed issues.

One thing @plinss was curious about is, given that all the @property rules are separate from the registerProperty data, it seems like there's no API for getting the set of things registered via @property... or for that matter, the set of things registered at all. We were wondering if maybe there should be.

Our understanding is that the current model is that @property doesn't have any effects until computed value time. I recall a bunch of issues with the previous model -- and it does seem like a reasonable way out, so I think we're OK with this. Though we'd like to double-check that our understanding of the situation is correct.

So at this point I think we're happy to close this issue.

@dbaron dbaron closed this as completed Dec 4, 2019
@dbaron dbaron added Resolution: satisfied The TAG is satisfied with this design and removed Progress: pending external feedback The TAG is waiting on response to comments/questions asked by the TAG during the review labels Dec 4, 2019
@andruud
Copy link
Author

andruud commented Dec 4, 2019

Thank you for the review. :-)

there's no API for getting the set of things registered

I don't think anything prevents us from adding that in the future if we need it.

Our understanding is that the current model is that @Property doesn't have any effects until computed value time. I recall a bunch of issues with the previous model -- and it does seem like a reasonable way out, so I think we're OK with this. Though we'd like to double-check that our understanding of the situation is correct.

That's correct, but note that the same actually applies to registerProperty. (It's true that in an earlier iteration of the spec, registerProperty would have an effect on non-computed-value-time APIs, but that was dropped due to the "bunch of issues". See also w3c/css-houdini-drafts#902)

@plinss
Copy link
Member

plinss commented Dec 4, 2019

there's no API for getting the set of things registered

I don't think anything prevents us from adding that in the future if we need it.

Aside from general developer ergonomics I don't see a need for that API just yet. The question came up in the context of wondering if such an API would include @property registrations or would be exclusive to properties registered via registerProperty. Given that the API doesn't exist, we don't need to answer that at this point.

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

5 participants