Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: fix :first-child warning#17727

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
BrunoQuaresma merged 2 commits intomainfrombq/fix-warning-first-of-child
May 9, 2025
Merged
Show file tree
Hide file tree
Changes fromall 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
9 changes: 2 additions & 7 deletionssite/src/components/InputGroup/InputGroup.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -25,14 +25,9 @@ export const InputGroup: FC<HTMLProps<HTMLDivElement>> = (props) => {
zIndex: 2,
},

"& > *:first-child": {
"& > *:first-of-type": {
borderTopRightRadius: 0,
borderBottomRightRadius: 0,

"&.MuiFormControl-root .MuiInputBase-root": {
borderTopRightRadius: 0,
borderBottomRightRadius: 0,
},
},

"& > *:last-child": {
Expand All@@ -45,7 +40,7 @@ export const InputGroup: FC<HTMLProps<HTMLDivElement>> = (props) => {
},
},

"& > *:not(:first-child):not(:last-child)": {
"& > *:not(:first-of-type):not(:last-child)": {
borderRadius: 0,

"&.MuiFormControl-root .MuiInputBase-root": {
Expand Down
10 changes: 5 additions & 5 deletionssite/src/components/Markdown/Markdown.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -348,19 +348,19 @@ const MarkdownGfmAlert: FC<MarkdownGfmAlertProps> = ({
"[&_p]:m-0 [&_p]:mb-2",

alertType === "important" &&
"border-highlight-purple [&_p:first-child]:text-highlight-purple",
"border-highlight-purple [&_p:first-of-type]:text-highlight-purple",

alertType === "warning" &&
"border-border-warning [&_p:first-child]:text-border-warning",
"border-border-warning [&_p:first-of-type]:text-border-warning",

alertType === "note" &&
"border-highlight-sky [&_p:first-child]:text-highlight-sky",
"border-highlight-sky [&_p:first-of-type]:text-highlight-sky",

alertType === "tip" &&
"border-highlight-green [&_p:first-child]:text-highlight-green",
"border-highlight-green [&_p:first-of-type]:text-highlight-green",

alertType === "caution" &&
"border-highlight-red [&_p:first-child]:text-highlight-red",
"border-highlight-red [&_p:first-of-type]:text-highlight-red",
)}
>
<p className="font-bold">
Expand Down
6 changes: 3 additions & 3 deletionssite/src/components/Table/Table.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -36,10 +36,10 @@ export const TableBody = React.forwardRef<
<tbody
ref={ref}
className={cn(
"[&>tr:first-child>td]:border-t [&>tr>td:first-child]:border-l",
"[&>tr:first-of-type>td]:border-t [&>tr>td:first-of-type]:border-l",
"[&>tr:last-child>td]:border-b [&>tr>td:last-child]:border-r",
"[&>tr:first-child>td:first-child]:rounded-tl-md [&>tr:first-child>td:last-child]:rounded-tr-md",
"[&>tr:last-child>td:first-child]:rounded-bl-md [&>tr:last-child>td:last-child]:rounded-br-md",
"[&>tr:first-of-type>td:first-of-type]:rounded-tl-md [&>tr:first-of-type>td:last-child]:rounded-tr-md",
"[&>tr:last-child>td:first-of-type]:rounded-bl-md [&>tr:last-child>td:last-child]:rounded-br-md",
className,
)}
{...props}
Expand Down
2 changes: 1 addition & 1 deletionsite/src/modules/resources/ResourceCard.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,7 +19,7 @@ const styles = {
borderBottom: 0,
},

"&:first-child": {
"&:first-of-type": {
borderTopLeftRadius: 8,
borderTopRightRadius: 8,
},
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -185,7 +185,7 @@ const styles = {
},
},

"& li:first-child": {
"& li:first-of-type": {
color: theme.palette.text.secondary,
},

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -56,7 +56,7 @@ const XAxisLabel: FC<HTMLProps<HTMLLIElement>> = (props) => {
// Note: This adjustment is not applied to the first element,
// as the 0 label/value is not displayed in the chart.
width: "calc(var(--x-axis-width) * 2)",
"&:not(:first-child)": {
"&:not(:first-of-type)": {
marginLeft: "calc(-1 * var(--x-axis-width))",
},
},
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -35,7 +35,7 @@ const styles = {
flexShrink: 0,
},
section: (theme) => ({
"&:not(:first-child)": {
"&:not(:first-of-type)": {
borderTop: `1px solid ${theme.palette.divider}`,
},
}),
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -559,7 +559,7 @@ const TemplateParametersUsagePanel: FC<TemplateParametersUsagePanelProps> = ({
marginRight: -24,
borderTop: `1px solid ${theme.palette.divider}`,
width: "calc(100% + 48px)",
"&:first-child": {
"&:first-of-type": {
borderTop: 0,
},
gap: 24,
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -123,7 +123,7 @@ const styles = {
lineHeight: "1.5",
borderTop: `1px solid ${theme.palette.divider}`,

"&:first-child": {
"&:first-of-type": {
borderTop: 0,
},
}),
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp