File tree Expand file tree Collapse file tree 1 file changed +19
-14
lines changed Expand file tree Collapse file tree 1 file changed +19
-14
lines changed Original file line number Diff line number Diff line change @@ -6,32 +6,37 @@ const styled = require('styled-components')
66
77const suite = new Benchmark . Suite ( 'styled' )
88
9+ const md = '1024px'
910const primary = 'primary'
1011const sp3 = '3px'
1112const sp1 = '1px'
1213
1314function runXstyled ( ) {
1415 const Component = xstyled . default . div `
15- background: transparent;
16- border-radius: 3px;
17- border: 2px solid;
18- border-color: primary;
19- color: primary;
20- margin: 0 3;
21- padding: 1 3;
16+ @media (min-width: 1024px) {
17+ background: transparent;
18+ border-radius: 3px;
19+ border: 2px solid;
20+ border-color: primary;
21+ color: primary;
22+ margin: 0 3;
23+ padding: 1 3;
24+ }
2225 `
2326 React . createElement ( Component , { } )
2427}
2528
2629function runStyled ( ) {
2730 const Component = styled . default . div `
28- background: transparent;
29- border-radius: 3px;
30- border: 2px solid;
31- border-color: ${ ( ) => primary } ;
32- color: ${ ( ) => primary } ;
33- margin: 0 ${ ( ) => sp3 } ;
34- padding: ${ ( ) => sp1 } ${ ( ) => sp3 } ;
31+ @media (min-width: ${ ( ) => md } ) {
32+ background: transparent;
33+ border-radius: 3px;
34+ border: 2px solid;
35+ border-color: ${ ( ) => primary } ;
36+ color: ${ ( ) => primary } ;
37+ margin: 0 ${ ( ) => sp3 } ;
38+ padding: ${ ( ) => sp1 } ${ ( ) => sp3 } ;
39+ }
3540 `
3641 React . createElement ( Component , { } )
3742}
You can’t perform that action at this time.
0 commit comments