@@ -5,23 +5,24 @@ import * as color from './color';
55import { renderMath } from '@pie-lib/math-rendering' ;
66
77const StyledPromptContainer = styled ( 'div' ) ( ( { theme, tagName } ) => ( {
8+ // presentation tables should not have any custom style
89 // Base promptTable styles
9- '&:not(.MathJax) > table' : {
10+ '&:not(.MathJax) > table:not([role="presentation"]) ' : {
1011 borderCollapse : 'collapse' ,
1112 } ,
1213 // Apply vertical striping when first column is a header (th) and NOT mixed with td
13- '&:not(.MathJax) > table:has(tbody tr > th:first-child):not(:has(tbody tr > td:first-child)) tbody td:nth-child(even)' :
14+ '&:not(.MathJax) > table:not([role="presentation"]): has(tbody tr > th:first-child):not(:has(tbody tr > td:first-child)) tbody td:nth-child(even)' :
1415 {
1516 backgroundColor : '#f6f8fa' ,
1617 color : theme . palette . common . black ,
1718 } ,
1819 // Apply horizontal striping for tables where first element is a data cell (td)
19- '&:not(.MathJax) > table:has(tbody tr > td:first-child) tbody tr:nth-child(even) td' : {
20+ '&:not(.MathJax) > table:not([role="presentation"]): has(tbody tr > td:first-child) tbody tr:nth-child(even) td' : {
2021 backgroundColor : '#f6f8fa' ,
2122 color : theme . palette . common . black ,
2223 } ,
2324 // align table content to left as per STAR requirement PD-3687
24- '&:not(.MathJax) table td, &:not(.MathJax) table th' : {
25+ '&:not(.MathJax) table:not([role="presentation"]) td, &:not(.MathJax) table:not([role="presentation"]) th' : {
2526 padding : '.6em 1em' ,
2627 textAlign : 'left' ,
2728 } ,
0 commit comments