-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into custom-class-naming
- Loading branch information
Showing
16 changed files
with
142 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"yak-swc": patch | ||
--- | ||
|
||
fix a parsing bug for unquoted urls inside url() |
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
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
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
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 |
---|---|---|
|
@@ -25,6 +25,7 @@ expression: "(state, declarations)" | |
closed: false, | ||
}, | ||
pending_css_segment: "", | ||
paren_depth: 0, | ||
}, | ||
[], | ||
) |
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
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
31 changes: 31 additions & 0 deletions
31
..._js_parser__parse_css__tests__parse_css_incomplete_css_1_ending_inside_parens_string.snap
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,31 @@ | ||
--- | ||
source: css_in_js_parser/src/parse_css.rs | ||
expression: "(state, declarations)" | ||
--- | ||
( | ||
ParserState { | ||
is_inside_string: None, | ||
current_comment_state: None, | ||
is_inside_property_value: true, | ||
is_inside_at_rule: false, | ||
current_scopes: [ | ||
CssScope { | ||
name: ".foo", | ||
scope_type: Selector, | ||
}, | ||
CssScope { | ||
name: ".fancy", | ||
scope_type: Selector, | ||
}, | ||
], | ||
current_declaration: Declaration { | ||
property: "background", | ||
value: "url(https://example.com\n ", | ||
scope: [], | ||
closed: false, | ||
}, | ||
pending_css_segment: "background: url(https://example.com\n ", | ||
paren_depth: 1, | ||
}, | ||
[], | ||
) |
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
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
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
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
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
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,10 @@ | ||
import { styled, css } from "next-yak"; | ||
|
||
export const Card = styled.div` | ||
background: url("/card-bg.jpg") no-repeat; | ||
${({$active}) => $active && css` | ||
backgorund: url(/card-bg-active.jpg) no-repeat; | ||
`} | ||
transform: translate(-50%, -50%) rotate(${({ index }) => index * 30}deg) | ||
translate(0, -88px) rotate(${({ index }) => -index * 30}deg); | ||
`; |
19 changes: 19 additions & 0 deletions
19
packages/yak-swc/yak_swc/tests/fixture/parens/output.dev.tsx
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,19 @@ | ||
import { styled, css, __yak_unitPostFix } from "next-yak/internal"; | ||
import __styleYak from "./input.yak.module.css!=!./input?./input.yak.module.css"; | ||
export const Card = /*YAK Extracted CSS: | ||
.Card { | ||
background: url("/card-bg.jpg") no-repeat; | ||
} | ||
.Card__$active { | ||
backgorund: url(/card-bg-active.jpg) no-repeat; | ||
} | ||
.Card { | ||
transform: translate(-50%, -50%) rotate(var(--Card__transform_m7uBBu)) | ||
translate(0, -88px) rotate(var(--Card__transform_m7uBBu-01)); | ||
} | ||
*/ /*#__PURE__*/ styled.div(__styleYak.Card, ({ $active })=>$active && /*#__PURE__*/ css(__styleYak.Card__$active), { | ||
"style": { | ||
"--Card__transform_m7uBBu": __yak_unitPostFix(({ index })=>index * 30, "deg"), | ||
"--Card__transform_m7uBBu-01": __yak_unitPostFix(({ index })=>-index * 30, "deg") | ||
} | ||
}); |
19 changes: 19 additions & 0 deletions
19
packages/yak-swc/yak_swc/tests/fixture/parens/output.prod.tsx
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,19 @@ | ||
import { styled, css, __yak_unitPostFix } from "next-yak/internal"; | ||
import __styleYak from "./input.yak.module.css!=!./input?./input.yak.module.css"; | ||
export const Card = /*YAK Extracted CSS: | ||
.Card { | ||
background: url("/card-bg.jpg") no-repeat; | ||
} | ||
.Card__$active { | ||
backgorund: url(/card-bg-active.jpg) no-repeat; | ||
} | ||
.Card { | ||
transform: translate(-50%, -50%) rotate(var(--ym7uBBu)) | ||
translate(0, -88px) rotate(var(--ym7uBBu1)); | ||
} | ||
*/ /*#__PURE__*/ styled.div(__styleYak.Card, ({ $active })=>$active && /*#__PURE__*/ css(__styleYak.Card__$active), { | ||
"style": { | ||
"--ym7uBBu": __yak_unitPostFix(({ index })=>index * 30, "deg"), | ||
"--ym7uBBu1": __yak_unitPostFix(({ index })=>-index * 30, "deg") | ||
} | ||
}); |