File tree Expand file tree Collapse file tree 6 files changed +26
-1
lines changed
Expand file tree Collapse file tree 6 files changed +26
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @emotion/serialize ' : patch
3+ ---
4+
5+ Fix incorrectly throwing error on the gradient content values
Original file line number Diff line number Diff line change @@ -14,6 +14,11 @@ exports[`does not warn when valid values are passed for the content property 1`]
1414 content : " some thing" ;
1515 content : ' another thing' ;
1616 content : url (" http://www.example.com/test.png" );
17+ content : linear - gradient (hotpink , #8be9fd );
18+ content : radial - gradient (hotpink , #8be9fd );
19+ content : repeating - linear - gradient (hotpink , #8be9fd );
20+ content : repeating - radial - gradient (hotpink , #8be9fd );
21+ content : conic - gradient (hotpink , #8be9fd );
1722 content : counter (chapter_counter );
1823 content : counters (section_counter , " ." );
1924 content : attr (value string );
Original file line number Diff line number Diff line change @@ -21,6 +21,11 @@ const validValues = [
2121 '"some thing"' ,
2222 "'another thing'" ,
2323 'url("http://www.example.com/test.png")' ,
24+ 'linear-gradient(hotpink, #8be9fd)' ,
25+ 'radial-gradient(hotpink, #8be9fd)' ,
26+ 'repeating-linear-gradient(hotpink, #8be9fd)' ,
27+ 'repeating-radial-gradient(hotpink, #8be9fd)' ,
28+ 'conic-gradient(hotpink, #8be9fd)' ,
2429 'counter(chapter_counter)' ,
2530 'counters(section_counter, ".")' ,
2631 'attr(value string)'
Original file line number Diff line number Diff line change @@ -14,6 +14,11 @@ exports[`does not warn when valid values are passed for the content property 1`]
1414 content : " some thing" ;
1515 content : ' another thing' ;
1616 content : url (" http://www.example.com/test.png" );
17+ content : linear - gradient (hotpink , #8be9fd );
18+ content : radial - gradient (hotpink , #8be9fd );
19+ content : repeating - linear - gradient (hotpink , #8be9fd );
20+ content : repeating - radial - gradient (hotpink , #8be9fd );
21+ content : conic - gradient (hotpink , #8be9fd );
1722 content : counter (chapter_counter );
1823 content : counters (section_counter , " ." );
1924 content : attr (value string );
Original file line number Diff line number Diff line change @@ -21,6 +21,11 @@ const validValues = [
2121 '"some thing"' ,
2222 "'another thing'" ,
2323 'url("http://www.example.com/test.png")' ,
24+ 'linear-gradient(hotpink, #8be9fd)' ,
25+ 'radial-gradient(hotpink, #8be9fd)' ,
26+ 'repeating-linear-gradient(hotpink, #8be9fd)' ,
27+ 'repeating-radial-gradient(hotpink, #8be9fd)' ,
28+ 'conic-gradient(hotpink, #8be9fd)' ,
2429 'counter(chapter_counter)' ,
2530 'counters(section_counter, ".")' ,
2631 'attr(value string)'
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ let processStyleValue = (
6161}
6262
6363if ( process . env . NODE_ENV !== 'production' ) {
64- let contentValuePattern = / ( a t t r | c a l c | c o u n t e r s ? | u r l ) \( /
64+ let contentValuePattern = / ( a t t r | c a l c | c o u n t e r s ? | u r l | ( ( ( r e p e a t i n g - ) ? ( l i n e a r | r a d i a l ) ) | c o n i c ) - g r a d i e n t ) \( /
6565 let contentValues = [
6666 'normal' ,
6767 'none' ,
You can’t perform that action at this time.
0 commit comments