rust-cssparser icon indicating copy to clipboard operation
rust-cssparser copied to clipboard

Rust implementation of CSS Syntax Level 3

Results 20 rust-cssparser issues
Sort by recently updated
recently updated
newest added

This adds a `utf16_position` method on `ParserState`, exposing a `current_position` field that we compute. The implementation is closely following what what done to compute the utf16 column position. Note that...

Some macros have match bodies inside, e.g. `match_byte` and `match_ignore_ascii_case` and the formatter skips those bodies. Some of them are quite big, like here: [src/tokenizer.rs:560](https://github.com/servo/rust-cssparser/blob/main/src/tokenizer.rs#L560)

help wanted

The generated assembly for code using next_byte_unchecked like skip_whitespace has a suprising number of indirections in order to actually get the byte value. This is caused by the need to...

enhancement
help wanted

There's an open [cssom issue](https://github.com/w3c/csswg-drafts/issues/2858) about serialization of ``. Gecko currently serialize `"\\31st"` as `"\\31 st"` which violates the general principle that values should serialize to the shortest form (the...

bug

Spinning off from #314: With the complexities involved with parsing colors, there are concerned about regressing the time it takes to parse them. Per @emilio: > But it should be...

enhancement
help wanted

```rust error: couldn't read src/css-parsing-tests/component_value_list.json: No such file or directory (os error 2) --> src/tests.rs:112:20 | 112 | run_json_tests(include_str!("css-parsing-tests/component_value_list.json"), |input| { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: couldn't read src/css-parsing-tests/one_component_value.json: No such file...

enhancement
help wanted

`phf_codegen` is a pretty big dependency and colors will not change from build to build, so maybe it's better to keep the colors map as a "prebuilt" file? Something like...

enhancement
help wanted

And it is required by anyhow in async functions. To reproduce, try to compile this code ```rust use scraper::Selector; #[tokio::main] async fn main() -> anyhow::Result { let selector = Selector::parse("#top")?;...

enhancement
help wanted

(I intend to fully explain this at a later point, but I'm filing this now to facilitate parallel development and the feedback loop. It's still a work in progress.) @emilio...

@nox pointed out (https://github.com/servo/rust-cssparser/pull/112#issuecomment-286152329) that https://github.com/rust-lang/rust/pull/39456 brings the same performance to plain `match` expressions.