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

[css-extensions-1] Register custom extensions, worklets in CSS #7926

Open
romainmenke opened this issue Oct 20, 2022 · 0 comments
Open

[css-extensions-1] Register custom extensions, worklets in CSS #7926

romainmenke opened this issue Oct 20, 2022 · 0 comments

Comments

@romainmenke
Copy link
Member

romainmenke commented Oct 20, 2022

css-extensions-1

see : #3559 (comment)

Can we register custom extensions, worklets in CSS?

@custom-supports --gap-in-flexbox url('gapInFlexboxSupport.js');

One of my concerns with registering custom extensions or worklets in JavaScript is that it forces stylesheet authors to switch context and consider a whole different set of issues and apply solutions in a different programming language.

  • how can I block the CSS on this bit of JavaScript and avoid a flash of content?
  • how do I write the bits of Javascript defensively so that it doesn't throw errors in older browsers?

It also paves the way for tools to provide more assistance to stylesheet authors because everything is done within a single context.

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