Skip to content

Commit

Permalink
fix: Change first-child to first-of-type
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr committed Jan 17, 2024
1 parent 9abbe36 commit 588dbec
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.primary.main),
},
"& *:first-child": {
"& *:first-of-type": {
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(:first-of-type) {
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 {
&:first-of-type {
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 {
&:first-of-type {
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:first-of-type::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": {
"&:first-of-type": {
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(*:first-of-type)": {
paddingLeft: theme.spacing(2),
},
})) as typeof Typography;
Expand Down

0 comments on commit 588dbec

Please sign in to comment.