Skip to content

Commit

Permalink
fix: warning of nth-child (apache#23638)
Browse files Browse the repository at this point in the history
  • Loading branch information
justinpark committed Oct 17, 2023
1 parent deef3b0 commit 16cc089
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export default styled(ParallelCoordinates)`
height: 18px;
margin: 0px;
}
.parcoords .row:nth-child(odd) {
.parcoords .row:nth-of-type(odd) {
background: ${addAlpha(theme.colors.grayscale.dark2, 0.05)};
}
.parcoords .header {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export default styled(NVD3)`
white-space: nowrap;
font-weight: ${({ theme }) => theme.typography.weights.bold};
}
tbody tr:not(.tooltip-header) td:nth-child(2) {
tbody tr:not(.tooltip-header) td:nth-of-type(2) {
word-break: break-word;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const SaveDatasetActionButton = ({
font-weight: ${theme.gridUnit * 150};
background-color: ${theme.colors.primary.light4};
color: ${theme.colors.primary.dark1};
&:nth-child(2) {
&:nth-of-type(2) {
&:before,
&:hover:before {
border-left: 2px solid ${theme.colors.primary.dark2};
Expand Down
6 changes: 3 additions & 3 deletions superset-frontend/src/components/ButtonGroup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ export default function ButtonGroup(props: ButtonGroupProps) {
role="group"
className={className}
css={{
'& :nth-child(1):not(:nth-last-child(1))': {
'& :nth-of-type(1):not(:nth-last-of-type(1))': {
borderTopRightRadius: 0,
borderBottomRightRadius: 0,
borderRight: 0,
marginLeft: 0,
},
'& :not(:nth-child(1)):not(:nth-last-child(1))': {
'& :not(:nth-of-type(1)):not(:nth-last-of-type(1))': {
borderRadius: 0,
borderRight: 0,
marginLeft: 0,
},
'& :nth-last-child(1):not(:nth-child(1))': {
'& :nth-last-of-type(1):not(:nth-of-type(1))': {
borderTopLeftRadius: 0,
borderBottomLeftRadius: 0,
marginLeft: 0,
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/components/DropdownButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const StyledDropdownButton = styled.div`
background-color: ${({ theme }) => theme.colors.grayscale.light2};
color: ${({ theme }) => theme.colors.grayscale.base};
}
&:nth-child(2) {
&:nth-of-type(2) {
margin: 0;
border-radius: ${({ theme }) =>
`0 ${theme.gridUnit}px ${theme.gridUnit}px 0`};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const StyledDropdownButton = styled(
button.ant-btn:first-of-type {
display: none;
}
> button.ant-btn:nth-child(2) {
> button.ant-btn:nth-of-type(2) {
display: inline-flex;
background-color: transparent !important;
height: unset;
Expand Down

0 comments on commit 16cc089

Please sign in to comment.