File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -685,14 +685,24 @@ impl StyleSheetGroup {
685685 path : & str ,
686686 scope : Option < NonZeroUsize > ,
687687 ) -> u16 {
688+ self . append_from_resource_with_warnings ( res, path, scope) . 0
689+ }
690+
691+ /// Append a style sheet from the resource, returning its index and warnings like @import not found.
692+ pub fn append_from_resource_with_warnings (
693+ & mut self ,
694+ res : & StyleSheetResource ,
695+ path : & str ,
696+ scope : Option < NonZeroUsize > ,
697+ ) -> ( u16 , Vec < Warning > ) {
688698 let path = drop_css_extension ( path) ;
689- let ( ss, _warnings ) = res. link ( path, scope) ;
699+ let ( ss, warnings ) = res. link ( path, scope) ;
690700 let ret = self . sheets . len ( ) ;
691701 if Self :: is_invalid_index ( ret) {
692702 panic ! ( "The number of stylesheets has reached the maximum limit." )
693703 }
694704 self . sheets . push ( ss) ;
695- ret as u16
705+ ( ret as u16 , warnings )
696706 }
697707
698708 /// Replace a style sheet from the resource by its index.
You can’t perform that action at this time.
0 commit comments