forked from mui/pigment-css
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[enhancement] Reorder the css generation order for styled calls
to match with @mui/system Fixes mui#55
- Loading branch information
1 parent
306d703
commit 983a6a8
Showing
5 changed files
with
133 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
packages/pigment-css-react/tests/styled/fixtures/styled-theme-styleOverrides2.input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { styled } from '@pigment-css/react'; | ||
|
||
const OutlinedInputInput = styled('input', { | ||
name: 'MuiOutlinedInput', | ||
slot: 'Input', | ||
})({ | ||
padding: '16.5px 14px', | ||
variants: [ | ||
{ | ||
props: { | ||
size: 'small', | ||
}, | ||
style: { | ||
padding: '8.5px 14px', | ||
}, | ||
}, | ||
{ | ||
props: ({ ownerState }) => ownerState.multiline, | ||
style: { | ||
padding: 0, | ||
}, | ||
}, | ||
{ | ||
props: ({ ownerState }) => ownerState.startAdornment, | ||
style: { | ||
paddingLeft: 0, | ||
}, | ||
}, | ||
{ | ||
props: ({ ownerState }) => ownerState.endAdornment, | ||
style: { | ||
paddingRight: 0, | ||
}, | ||
}, | ||
], | ||
}); |
21 changes: 21 additions & 0 deletions
21
packages/pigment-css-react/tests/styled/fixtures/styled-theme-styleOverrides2.output.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.o1ei225m { | ||
padding: 16.5px 14px; | ||
} | ||
.o1ei225m-1 { | ||
padding: 8.5px 14px; | ||
} | ||
.o1ei225m-2 { | ||
padding: 0; | ||
} | ||
.o1ei225m-3 { | ||
padding-left: 0; | ||
} | ||
.o1ei225m-4 { | ||
padding-right: 0; | ||
} | ||
.o1ei225m-5 { | ||
padding-left: 10px; | ||
} | ||
.o1ei225m-6 { | ||
padding: 9px 14.5px; | ||
} |
34 changes: 34 additions & 0 deletions
34
packages/pigment-css-react/tests/styled/fixtures/styled-theme-styleOverrides2.output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { styled as _styled } from '@pigment-css/react'; | ||
import _theme from '@pigment-css/react/theme'; | ||
const OutlinedInputInput = /*#__PURE__*/ _styled('input', { | ||
name: 'MuiOutlinedInput', | ||
slot: 'Input', | ||
})({ | ||
classes: ['o1ei225m', 'o1ei225m-5'], | ||
variants: [ | ||
{ | ||
props: { | ||
size: 'small', | ||
}, | ||
className: 'o1ei225m-1', | ||
}, | ||
{ | ||
props: ({ ownerState }) => ownerState.multiline, | ||
className: 'o1ei225m-2', | ||
}, | ||
{ | ||
props: ({ ownerState }) => ownerState.startAdornment, | ||
className: 'o1ei225m-3', | ||
}, | ||
{ | ||
props: ({ ownerState }) => ownerState.endAdornment, | ||
className: 'o1ei225m-4', | ||
}, | ||
{ | ||
props: { | ||
size: 'small', | ||
}, | ||
className: 'o1ei225m-6', | ||
}, | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters