Skip to content

Commit

Permalink
[core] Fix CSS2 vs. CSS3 ::before syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Dec 25, 2023
1 parent 7e8dd80 commit cb1196a
Show file tree
Hide file tree
Showing 48 changed files with 90 additions and 90 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ const SliderThumb = styled('span', {
transition: theme.transitions.create(['box-shadow', 'left', 'bottom'], {
duration: theme.transitions.duration.shortest,
}),
'&:before': {
'&::before': {
position: 'absolute',
content: '""',
borderRadius: 'inherit',
Expand Down Expand Up @@ -388,7 +388,7 @@ const SliderThumb = styled('span', {
style: {
width: 12,
height: 12,
'&:before': {
'&::before': {
boxShadow: 'none',
},
},
Expand Down Expand Up @@ -454,7 +454,7 @@ const StyledSliderValueLabel = styled(SliderValueLabel, {
top: '-10px',
transformOrigin: 'bottom center',
transform: 'translateY(-100%) scale(0)',
'&:before': {
'&::before': {
position: 'absolute',
content: '""',
width: 8,
Expand All @@ -478,7 +478,7 @@ const StyledSliderValueLabel = styled(SliderValueLabel, {
right: '30px',
transform: 'translateY(-50%) scale(0)',
transformOrigin: 'right center',
'&:before': {
'&::before': {
position: 'absolute',
content: '""',
width: 8,
Expand Down
8 changes: 4 additions & 4 deletions apps/zero-runtime-vite-app/src/Slider/ZeroSlider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ const SliderThumb = styled('span', {
transition: theme.transitions.create(['box-shadow', 'left', 'bottom'], {
duration: theme.transitions.duration.shortest,
}),
'&:before': {
'&::before': {
position: 'absolute',
content: '""',
borderRadius: 'inherit',
Expand Down Expand Up @@ -386,7 +386,7 @@ const SliderThumb = styled('span', {
style: {
width: 12,
height: 12,
'&:before': {
'&::before': {
boxShadow: 'none',
},
},
Expand Down Expand Up @@ -452,7 +452,7 @@ const StyledSliderValueLabel = styled(SliderValueLabel, {
top: '-10px',
transformOrigin: 'bottom center',
transform: 'translateY(-100%) scale(0)',
'&:before': {
'&::before': {
position: 'absolute',
content: '""',
width: 8,
Expand All @@ -476,7 +476,7 @@ const StyledSliderValueLabel = styled(SliderValueLabel, {
right: '30px',
transform: 'translateY(-50%) scale(0)',
transformOrigin: 'right center',
'&:before': {
'&::before': {
position: 'absolute',
content: '""',
width: 8,
Expand Down
2 changes: 1 addition & 1 deletion docs/data/base/components/select/UseSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ const Option = styled('li')(
outline: 3px solid ${theme.palette.mode === 'dark' ? blue[600] : blue[200]};
}
&:before {
&::before {
content: '';
width: 1ex;
height: 1ex;
Expand Down
2 changes: 1 addition & 1 deletion docs/data/base/components/select/UseSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ const Option = styled('li')(
outline: 3px solid ${theme.palette.mode === 'dark' ? blue[600] : blue[200]};
}
&:before {
&::before {
content: '';
width: 1ex;
height: 1ex;
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/card/InstagramPost.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function InstagramPost() {
<Box
sx={{
position: 'relative',
'&:before': {
'&::before': {
content: '""',
position: 'absolute',
top: 0,
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/card/InstagramPost.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function InstagramPost() {
<Box
sx={{
position: 'relative',
'&:before': {
'&::before': {
content: '""',
position: 'absolute',
top: 0,
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/getting-started/templates/team/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ export default function TeamExample() {
<ListItem key={companyIndex} sx={{ alignItems: 'flex-start' }}>
<ListItemDecorator
sx={{
'&:before': {
'&::before': {
content: '""',
position: 'absolute',
height: '100%',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const Accordion = styled((props) => (
'&:not(:last-child)': {
borderBottom: 0,
},
'&:before': {
'&::before': {
display: 'none',
},
}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const Accordion = styled((props: AccordionProps) => (
'&:not(:last-child)': {
borderBottom: 0,
},
'&:before': {
'&::before': {
display: 'none',
},
}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const BpIcon = styled('span')(({ theme }) => ({
const BpCheckedIcon = styled(BpIcon)({
backgroundColor: '#137cbd',
backgroundImage: 'linear-gradient(180deg,hsla(0,0%,100%,.1),hsla(0,0%,100%,0))',
'&:before': {
'&::before': {
display: 'block',
width: 16,
height: 16,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const BpIcon = styled('span')(({ theme }) => ({
const BpCheckedIcon = styled(BpIcon)({
backgroundColor: '#137cbd',
backgroundImage: 'linear-gradient(180deg,hsla(0,0%,100%,.1),hsla(0,0%,100%,0))',
'&:before': {
'&::before': {
display: 'block',
width: 16,
height: 16,
Expand Down
2 changes: 1 addition & 1 deletion docs/data/material/components/menus/AccountMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default function AccountMenu() {
ml: -0.5,
mr: 1,
},
'&:before': {
'&::before': {
content: '""',
display: 'block',
position: 'absolute',
Expand Down
2 changes: 1 addition & 1 deletion docs/data/material/components/menus/AccountMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default function AccountMenu() {
ml: -0.5,
mr: 1,
},
'&:before': {
'&::before': {
content: '""',
display: 'block',
position: 'absolute',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const BpIcon = styled('span')(({ theme }) => ({
const BpCheckedIcon = styled(BpIcon)({
backgroundColor: '#137cbd',
backgroundImage: 'linear-gradient(180deg,hsla(0,0%,100%,.1),hsla(0,0%,100%,0))',
'&:before': {
'&::before': {
display: 'block',
width: 16,
height: 16,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const BpIcon = styled('span')(({ theme }) => ({
const BpCheckedIcon = styled(BpIcon)({
backgroundColor: '#137cbd',
backgroundImage: 'linear-gradient(180deg,hsla(0,0%,100%,.1),hsla(0,0%,100%,0))',
'&:before': {
'&::before': {
display: 'block',
width: 16,
height: 16,
Expand Down
6 changes: 3 additions & 3 deletions docs/data/material/components/slider/CustomizedSlider.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const IOSSlider = styled(Slider)(({ theme }) => ({
top: -6,
backgroundColor: 'unset',
color: theme.palette.text.primary,
'&:before': {
'&::before': {
display: 'none',
},
'& *': {
Expand Down Expand Up @@ -103,7 +103,7 @@ const PrettoSlider = styled(Slider)({
'&:focus, &:hover, &.Mui-active, &.Mui-focusVisible': {
boxShadow: 'inherit',
},
'&:before': {
'&::before': {
display: 'none',
},
},
Expand All @@ -118,7 +118,7 @@ const PrettoSlider = styled(Slider)({
backgroundColor: '#52af77',
transformOrigin: 'bottom left',
transform: 'translate(50%, -100%) rotate(-45deg) scale(0)',
'&:before': { display: 'none' },
'&::before': { display: 'none' },
'&.MuiSlider-valueLabelOpen': {
transform: 'translate(50%, -100%) rotate(-45deg) scale(1)',
},
Expand Down
6 changes: 3 additions & 3 deletions docs/data/material/components/slider/CustomizedSlider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const IOSSlider = styled(Slider)(({ theme }) => ({
top: -6,
backgroundColor: 'unset',
color: theme.palette.text.primary,
'&:before': {
'&::before': {
display: 'none',
},
'& *': {
Expand Down Expand Up @@ -97,7 +97,7 @@ const PrettoSlider = styled(Slider)({
'&:focus, &:hover, &.Mui-active, &.Mui-focusVisible': {
boxShadow: 'inherit',
},
'&:before': {
'&::before': {
display: 'none',
},
},
Expand All @@ -112,7 +112,7 @@ const PrettoSlider = styled(Slider)({
backgroundColor: '#52af77',
transformOrigin: 'bottom left',
transform: 'translate(50%, -100%) rotate(-45deg) scale(0)',
'&:before': { display: 'none' },
'&::before': { display: 'none' },
'&.MuiSlider-valueLabelOpen': {
transform: 'translate(50%, -100%) rotate(-45deg) scale(1)',
},
Expand Down
6 changes: 3 additions & 3 deletions docs/data/material/components/slider/MusicPlayerSlider.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const WallPaper = styled('div')({
overflow: 'hidden',
background: 'linear-gradient(rgb(255, 38, 142) 0%, rgb(255, 105, 79) 100%)',
transition: 'all 500ms cubic-bezier(0.175, 0.885, 0.32, 1.275) 0s',
'&:before': {
'&::before': {
content: '""',
width: '140%',
height: '140%',
Expand Down Expand Up @@ -127,7 +127,7 @@ export default function MusicPlayerSlider() {
width: 8,
height: 8,
transition: '0.3s cubic-bezier(.47,1.64,.41,.8)',
'&:before': {
'&::before': {
boxShadow: '0 2px 12px 0 rgba(0,0,0,0.4)',
},
'&:hover, &.Mui-focusVisible': {
Expand Down Expand Up @@ -200,7 +200,7 @@ export default function MusicPlayerSlider() {
width: 24,
height: 24,
backgroundColor: '#fff',
'&:before': {
'&::before': {
boxShadow: '0 4px 8px rgba(0,0,0,0.4)',
},
'&:hover, &.Mui-focusVisible, &.Mui-active': {
Expand Down
6 changes: 3 additions & 3 deletions docs/data/material/components/slider/MusicPlayerSlider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const WallPaper = styled('div')({
overflow: 'hidden',
background: 'linear-gradient(rgb(255, 38, 142) 0%, rgb(255, 105, 79) 100%)',
transition: 'all 500ms cubic-bezier(0.175, 0.885, 0.32, 1.275) 0s',
'&:before': {
'&::before': {
content: '""',
width: '140%',
height: '140%',
Expand Down Expand Up @@ -127,7 +127,7 @@ export default function MusicPlayerSlider() {
width: 8,
height: 8,
transition: '0.3s cubic-bezier(.47,1.64,.41,.8)',
'&:before': {
'&::before': {
boxShadow: '0 2px 12px 0 rgba(0,0,0,0.4)',
},
'&:hover, &.Mui-focusVisible': {
Expand Down Expand Up @@ -200,7 +200,7 @@ export default function MusicPlayerSlider() {
width: 24,
height: 24,
backgroundColor: '#fff',
'&:before': {
'&::before': {
boxShadow: '0 4px 8px rgba(0,0,0,0.4)',
},
'&:hover, &.Mui-focusVisible, &.Mui-active': {
Expand Down
6 changes: 3 additions & 3 deletions docs/data/material/components/switches/CustomizedSwitches.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const MaterialUISwitch = styled(Switch)(({ theme }) => ({
backgroundColor: theme.palette.mode === 'dark' ? '#003892' : '#001e3c',
width: 32,
height: 32,
'&:before': {
'&::before': {
content: "''",
position: 'absolute',
width: '100%',
Expand All @@ -57,15 +57,15 @@ const Android12Switch = styled(Switch)(({ theme }) => ({
padding: 8,
'& .MuiSwitch-track': {
borderRadius: 22 / 2,
'&:before, &:after': {
'&::before, &:after': {
content: '""',
position: 'absolute',
top: '50%',
transform: 'translateY(-50%)',
width: 16,
height: 16,
},
'&:before': {
'&::before': {
backgroundImage: `url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16" viewBox="0 0 24 24"><path fill="${encodeURIComponent(
theme.palette.getContrastText(theme.palette.primary.main),
)}" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"/></svg>')`,
Expand Down
6 changes: 3 additions & 3 deletions docs/data/material/components/switches/CustomizedSwitches.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const MaterialUISwitch = styled(Switch)(({ theme }) => ({
backgroundColor: theme.palette.mode === 'dark' ? '#003892' : '#001e3c',
width: 32,
height: 32,
'&:before': {
'&::before': {
content: "''",
position: 'absolute',
width: '100%',
Expand All @@ -57,15 +57,15 @@ const Android12Switch = styled(Switch)(({ theme }) => ({
padding: 8,
'& .MuiSwitch-track': {
borderRadius: 22 / 2,
'&:before, &:after': {
'&::before, &:after': {
content: '""',
position: 'absolute',
top: '50%',
transform: 'translateY(-50%)',
width: 16,
height: 16,
},
'&:before': {
'&::before': {
backgroundImage: `url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16" viewBox="0 0 24 24"><path fill="${encodeURIComponent(
theme.palette.getContrastText(theme.palette.primary.main),
)}" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"/></svg>')`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const customTheme = (outerTheme) =>
MuiFilledInput: {
styleOverrides: {
root: {
'&:before, &:after': {
'&::before, &:after': {
borderBottom: '2px solid var(--TextField-brandBorderColor)',
},
'&:hover:not(.Mui-disabled, .Mui-error):before': {
Expand All @@ -55,7 +55,7 @@ const customTheme = (outerTheme) =>
MuiInput: {
styleOverrides: {
root: {
'&:before': {
'&::before': {
borderBottom: '2px solid var(--TextField-brandBorderColor)',
},
'&:hover:not(.Mui-disabled, .Mui-error):before': {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const customTheme = (outerTheme: Theme) =>
MuiFilledInput: {
styleOverrides: {
root: {
'&:before, &:after': {
'&::before, &:after': {
borderBottom: '2px solid var(--TextField-brandBorderColor)',
},
'&:hover:not(.Mui-disabled, .Mui-error):before': {
Expand All @@ -55,7 +55,7 @@ const customTheme = (outerTheme: Theme) =>
MuiInput: {
styleOverrides: {
root: {
'&:before': {
'&::before': {
borderBottom: '2px solid var(--TextField-brandBorderColor)',
},
'&:hover:not(.Mui-disabled, .Mui-error):before': {
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/careers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const Accordion = styled(MuiAccordion)(({ theme }) => ({
'&:not(:last-of-type)': {
marginBottom: theme.spacing(2),
},
'&:before': {
'&::before': {
display: 'none',
},
'&:after': {
Expand Down
Loading

0 comments on commit cb1196a

Please sign in to comment.