Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(css): Change first-child to nth-child(1) #2668

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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": {
"& *: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
Loading