我有 CSS 问题,我正在寻求帮助 :)
页面左下角有通知图标,有时可以禁用,图标和切换按钮会消失。如果消失,我的“语言”下拉菜单会像这样向左移动:

我的问题是我不知道在 CSS 中如何说“Langage”下拉菜单是否是我的行的第一个元素,然后做一些事情(例如添加填充)。
CSS中有办法做到这一点吗?
我试过这样的事情:
&:first-child {
margin-left: ${spacings.medium_2};
}
但不工作:/
我的代码(反应代码):
{projectNotification
&& (
<UserFormLine id="notifications_switch" xs={6}>
<Icon>notifications</Icon>
<SwitchNotifications
id="notification"
checked={user.notify}
onChange={() => handleChangeUserAttribute('notify', !user.notify)}
/>
</UserFormLine>
)
}
<ProjectFormLine id="languageId_formLine" xs={6}>
<DropDown
id="languageId"
source={appLocalesData}
label={formatMessage({ ...messages.user.language })}
value={user.language}
onChange={(value) => handleChangeUserAttribute('language', value)}
/>
</ProjectFormLine>
