Skip to content

Implement ToCss to PseudoElement #329

@whizsid

Description

@whizsid

I am implementing a CSS minifier with my custom logics. Using the crates from this repository to parse my code and minify. I am using that kind of code to minify.

match component {
       // Other match arms that using lightningcss::traits::ToCss
       _=>{
             // Using cssparser::ToCss as a fallback for other match arms
             write!(&mut component_str, "{}", component.to_css_string()).unwrap();
       }
}

This code gave me an error. Because PseudoElement is throwing an unreachable!() error when converting to string. Then I tried to use the ToCss trait from lightningcss crate. But the exposed parcel_selectors::parser::PseudoElement trait not implemented to the lightningcss::traits::ToCss. Is there any existing workaround to fix it. If not can you implement ToCss to PseudoElement?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions