Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
wip
  • Loading branch information
siriwatknp committed Mar 12, 2024
commit 19d43f7bd98c48e539a06eb6e497e18abcc58ebf
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ const SliderRail = styled('span', {
background-color: currentColor;
opacity: 0.38;
font-size: ${({ theme }) => (theme.vars ?? theme).size.font.h1};
${SliderRail} {
display: none;
}
`;

const SliderRail2 = styled.span`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@
opacity: 0.38;
font-size: 3rem;
}
.s1tggtaa .s1fopuc2 {
display: none;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ import _theme from '@pigment-css/react/theme';
const Component = /*#__PURE__*/ _styled('div')({
classes: ['clqufod'],
});
const SliderRail = /*#__PURE__*/ _styled2('span', {
name: 'MuiSlider',
slot: 'Rail',
})({
classes: ['s1fopuc2', 's1fopuc2-1'],
});
const SliderRail2 = /*#__PURE__*/ _styled3('span')({
classes: ['s1tggtaa'],
});
34 changes: 5 additions & 29 deletions packages/pigment-react/tests/styled/fixtures/styled.input.js
Original file line number Diff line number Diff line change
@@ -1,38 +1,14 @@
import { styled, keyframes } from '@pigment-css/react';
import { styled } from '@pigment-css/react';

const rotateKeyframe = keyframes({
from: {
transform: 'rotate(360deg)',
},
to: {
transform: 'rotate(0deg)',
},
});

const Component = styled.div({
color: '#ff5252',
animation: `${rotateKeyframe} 2s ease-out 0s infinite`,
});

const Component2 = styled.div`
color: red;
&:has(.foo) {
color: blue;
}
`;

const SliderRail = styled('span')`
const Rail = styled('span')`
display: block;
opacity: 0.38;
${SliderRail} {
display: none;
}
`;

const SliderRail2 = styled.span`
const Slider = styled('div')`
display: block;
opacity: 0.38;
${SliderRail} {
opacity: 0.32;
${Rail} {
display: none;
}
`;
12 changes: 7 additions & 5 deletions packages/pigment-react/tests/styled/fixtures/styled.output.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@
.c1sjy0ja:has(.foo) {
color: blue;
}
.c6hrafw {
color: red;
.s6hrafw {
display: block;
opacity: 0.38;
}
.c6hrafw:has(.foo) {
color: blue;
.s1nn157y {
display: block;
opacity: 0.38;
}
.s6hrafw .s1sjy0ja {
.s1nn157y .s6hrafw {
display: none;
}
5 changes: 3 additions & 2 deletions packages/pigment-react/tests/styled/fixtures/styled.output.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { styled as _styled4 } from '@pigment-css/react';
import { styled as _styled3 } from '@pigment-css/react';
import { styled as _styled2 } from '@pigment-css/react';
import { styled as _styled } from '@pigment-css/react';
Expand All @@ -8,6 +9,6 @@ const Component = /*#__PURE__*/ _styled('div')({
const Component2 = /*#__PURE__*/ _styled2('div')({
classes: ['c1sjy0ja'],
});
const Component3 = /*#__PURE__*/ _styled3('div')({
classes: ['c6hrafw'],
const SliderRail2 = /*#__PURE__*/ _styled4('span')({
classes: ['s1nn157y'],
});