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

Alow manipulating Selector parts from consumer code #561

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

phoenix-ru
Copy link
Contributor

@phoenix-ru phoenix-ru commented Aug 14, 2023

This PR needs a review and is open to renaming/tests/suggestions.

The proposed API is a logical continuation of #495, #485, and it covers a usecase of fervid project: https://github.com/phoenix-ru/fervid/blob/master/crates/fervid_css/src/transform_style_scoped.rs#L331-L337

It allows appending Selector components with bypassing the checks in https://github.com/parcel-bundler/lightningcss/blob/master/selectors/parser.rs#L718-L725

Two new helpers are added:

  • insert_raw for inserting a single Component at an arbitrary index;
  • insert_raw_multiple for inserting multiple Components at an arbitrary index.

It is a blocker to Vue <style> transformations, examples of which are here:
https://github.com/phoenix-ru/fervid/blob/master/crates/fervid_css/src/lib.rs#L92-L186

@devongovett devongovett force-pushed the master branch 3 times, most recently from 68a1bff to 3930139 Compare August 20, 2023 17:41
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

Successfully merging this pull request may close these issues.

1 participant