@@ -593,6 +593,66 @@ describe('<html.*> (native polyfills)', () => {
593593 expect ( getFontSize ( secondSecond ) ) . toBe ( 1.5 * 3 * 16 ) ;
594594 } ) ;
595595
596+ test ( 'inherited color from transitioned parent' , ( ) => {
597+ const styles = css . create ( {
598+ container : {
599+ padding : '32px' ,
600+ transitionProperty : 'backgroundColor, color' ,
601+ transitionDuration : '300ms' ,
602+ backgroundColor : {
603+ default : 'blue' ,
604+ ':active' : 'darkblue'
605+ } ,
606+ color : {
607+ default : 'white' ,
608+ ':active' : 'green'
609+ }
610+ } ,
611+ text : {
612+ fontSize : '24px' ,
613+ color : 'inherit'
614+ }
615+ } ) ;
616+
617+ let root ;
618+ act ( ( ) => {
619+ root = create (
620+ < html . button style = { styles . container } >
621+ < html . span style = { styles . text } > Alert Banner</ html . span >
622+ </ html . button >
623+ ) ;
624+ } ) ;
625+
626+ let button = root . toJSON ( ) ;
627+ let span = button . children [ 0 ] ;
628+ expect ( span . type ) . toBe ( 'Text' ) ;
629+ expect ( span . props . style . color ) . toBe ( 'white' ) ;
630+
631+ act ( ( ) => {
632+ button . props . onPointerDown ( ) ;
633+ } ) ;
634+
635+ button = root . toJSON ( ) ;
636+ span = button . children [ 0 ] ;
637+ expect ( span . type ) . toBe ( 'Animated.Text' ) ;
638+ expect ( span . props . style . color ) . toEqual ( {
639+ inputRange : [ 0 , 1 ] ,
640+ outputRange : [ 'white' , 'green' ]
641+ } ) ;
642+
643+ act ( ( ) => {
644+ button . props . onPointerUp ( ) ;
645+ } ) ;
646+
647+ button = root . toJSON ( ) ;
648+ span = button . children [ 0 ] ;
649+ expect ( span . type ) . toBe ( 'Animated.Text' ) ;
650+ expect ( span . props . style . color ) . toEqual ( {
651+ inputRange : [ 0 , 1 ] ,
652+ outputRange : [ 'green' , 'white' ]
653+ } ) ;
654+ } ) ;
655+
596656 test ( 'inherited lineHeight (unitless)' , ( ) => {
597657 const styles = css . create ( {
598658 root : {
0 commit comments