Skip to content

Commit

Permalink
fix: Change first-child to nth-child(1) (#2668)
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr authored Jan 22, 2024
1 parent cee5312 commit 7c22937
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion editor.planx.uk/src/@planx/components/Content/Public.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const Content = styled(Box, {
"& a": {
color: getContrastTextColor(color || "#fff", theme.palette.link.main),
},
"& *:first-child": {
"& *:nth-child(1)": {
marginTop: 0,
},
}));
Expand Down
6 changes: 3 additions & 3 deletions editor.planx.uk/src/pages/FlowEditor/floweditor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ $pixel: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAA
opacity: 0.3;
}

> span:not(:first-child) {
> span:not(:nth-child(1)) {
margin-left: 6px;
}
}
Expand Down Expand Up @@ -352,7 +352,7 @@ $pixel: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAA
$lineWidth;
background-repeat: no-repeat, repeat-x, repeat-x;

&:first-child {
&:nth-child(1) {
background-position:
top center,
top right,
Expand Down Expand Up @@ -392,7 +392,7 @@ $pixel: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAA
$lineWidth 100%,
1px 100%;

&:first-child {
&:nth-child(1) {
background-position:
left center,
left bottom,
Expand Down
2 changes: 1 addition & 1 deletion editor.planx.uk/src/ui/editor/RichTextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export const RichContentContainer = styled(Box)(({ theme }) => ({
},
},
// Styles for placeholder text, to match ui/Input.tsx
"& p.is-editor-empty:first-child::before": {
"& p.is-editor-empty:nth-child(1)::before": {
color: theme.palette.text.secondary,
opacity: "0.5",
content: `attr(data-placeholder)`,
Expand Down
2 changes: 1 addition & 1 deletion editor.planx.uk/src/ui/shared/InputRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const Root = styled(Box, {
flexGrow: 1,
marginLeft: 1,
marginRight: 5,
"&:first-child": {
"&:nth-child(1)": {
marginLeft: 0,
},
"&:last-child": {
Expand Down
2 changes: 1 addition & 1 deletion editor.planx.uk/src/ui/shared/InputRowLabel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Label = styled(Typography)(({ theme }) => ({
flexGrow: 0,
paddingRight: theme.spacing(2),
alignSelf: "center",
"&:not(:first-child)": {
"&:not(:nth-child(1))": {
paddingLeft: theme.spacing(2),
},
})) as typeof Typography;
Expand Down

0 comments on commit 7c22937

Please sign in to comment.