File tree Expand file tree Collapse file tree 4 files changed +22
-1
lines changed
Expand file tree Collapse file tree 4 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @devup-ui/wasm " : patch
3+ ---
4+
5+ Fix attribute selector issue
Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ static DOUBLE_SEPARATOR: Lazy<HashSet<&str>> = Lazy::new(|| {
174174} ) ;
175175
176176pub fn get_selector_separator ( key : & str ) -> SelectorSeparator {
177- if key. starts_with ( ":" ) || key. is_empty ( ) {
177+ if key. starts_with ( ":" ) || key. is_empty ( ) || key . starts_with ( "[" ) {
178178 SelectorSeparator :: None
179179 } else if DOUBLE_SEPARATOR . contains ( key) {
180180 SelectorSeparator :: Double
Original file line number Diff line number Diff line change @@ -437,6 +437,17 @@ mod tests {
437437 false ,
438438 ) ;
439439 assert_debug_snapshot ! ( sheet. create_css( ) ) ;
440+
441+ let mut sheet = StyleSheet :: default ( ) ;
442+ sheet. add_property (
443+ "test" ,
444+ "bg" ,
445+ 0 ,
446+ "red" ,
447+ Some ( & "&[disabled='true']" . into ( ) ) ,
448+ false ,
449+ ) ;
450+ assert_debug_snapshot ! ( sheet. create_css( ) ) ;
440451 }
441452
442453 #[ test]
Original file line number Diff line number Diff line change 1+ -- -
2+ source : libs / sheet / src / lib .rs
3+ expression : sheet .create_css ()
4+ -- -
5+ " .test[disabled='true']{background:red}"
You can’t perform that action at this time.
0 commit comments