MCPcopy Create free account
hub / github.com/csskit/csskit / space_before

Method space_before

crates/css_parse/src/cursor_pretty_write_sink.rs:30–35  ·  view source on GitHub ↗
(first: Token, second: Token)

Source from the content-addressed store, hash-verified

28 }
29
30 fn space_before(first: Token, second: Token) -> bool {
31 // CSS demands it
32 first.needs_separator_for(second)
33 // It's a kind which might like some space around it.
34 || (second != Kind::Whitespace && (first == SPACE_AFTER_KINDSET || first == '>' || first == '<' || first == '+' || first == '-'))
35 }
36
37 fn space_after(first: Token, second: Token) -> bool {
38 // It's a kind which might like some space around it.

Callers

nothing calls this directly

Calls 1

needs_separator_forMethod · 0.80

Tested by

no test coverage detected