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

Allow serialization of layout information to CSS #155

Open
Tracked by #345
alice-i-cecile opened this issue Jun 11, 2022 · 3 comments
Open
Tracked by #345

Allow serialization of layout information to CSS #155

alice-i-cecile opened this issue Jun 11, 2022 · 3 comments
Labels
controversial This work requires a heightened standard of review due to implementation or design complexity enhancement New feature or request good first issue Good for newcomers

Comments

@alice-i-cecile
Copy link
Collaborator

What problem does this solve or what need does it fill?

This may be useful functionality for some users. If you care, please chime in in the comments!

What solution would you like?

Create a utility that converts from our native serialization format into CSS. Gate this behind a feature flag and point users to it in the docs.

Add tests to ensure that this continues to work.

What alternative(s) have you considered?

Status quo

Do nothing; we do not currently have users who want this functionality. Trying to build this in a vacuum is a recipe for disaster.

Feature flags

Revert the changes in #84 (and related features) in order to enable easy serialization via serde.

This litters our code base in surprising ways, and makes it very hard to alter the corresponding code structure (see #111 and #112, which were likely to support this functionality) as we must be mindful of CSS's constraints.

Additional context

This was the original intent behind the serde feature flags removed in #84 (and discussed further in #153).

@alice-i-cecile alice-i-cecile added the enhancement New feature or request label Jun 11, 2022
@alice-i-cecile alice-i-cecile added the controversial This work requires a heightened standard of review due to implementation or design complexity label Jun 12, 2022
@jihiggins
Copy link
Contributor

jihiggins commented Sep 1, 2022

Would this potentially be good for testing? You could have randomly generated layouts and have something compare the results to [whichever browser] (visual diff with basic fill color rects or something?)

@alice-i-cecile
Copy link
Collaborator Author

Yes, but we already have an existing tool internally via the gentest folder :)

@nicoburns
Copy link
Collaborator

What I’d really like for fuzz-like testing, is a setup where Taffy is compiled to wasm and can be run in a browser. Then you could randomly generate styles, and efficiently run them natively in the browser and in Taffy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
controversial This work requires a heightened standard of review due to implementation or design complexity enhancement New feature or request good first issue Good for newcomers
Projects
Status: Todo
Development

No branches or pull requests

3 participants