Skip to content

Commit

Permalink
Update Compiler with new CSS Parser (#2833)
Browse files Browse the repository at this point in the history
* chore: update compiler

* Update eighty-trees-thank.md

* test: update css test
  • Loading branch information
natemoo-re authored Mar 18, 2022
1 parent 31a1b40 commit 7954541
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
7 changes: 7 additions & 0 deletions .changeset/eighty-trees-thank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'astro': minor
---

This PR introduces a new internal CSS parser for `@astrojs/compiler`. See [`withastro/compiler#329`](https://github.com/withastro/compiler/pull/329) for more details.

This fixes Astro's support for modern CSS syntax like `@container`, `@layer`, and nesting. **Note** While Astro now correctly parses this modern syntax, it does not automatically compile features for browser compatability purposes.
2 changes: 1 addition & 1 deletion packages/astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"test:match": "mocha --timeout 20000 -g"
},
"dependencies": {
"@astrojs/compiler": "^0.12.1",
"@astrojs/compiler": "^0.13.0",
"@astrojs/language-server": "^0.8.10",
"@astrojs/markdown-remark": "^0.6.4",
"@astrojs/prism": "0.4.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/test/astro-partial-html.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('Partial HTML', async () => {
},
})
.then((res) => res.text());
expect(css).to.match(/\.astro-[^{]+{color:red;}/);
expect(css).to.match(/\.astro-[^{]+{color:red}/);
});

it('injects framework styles', async () => {
Expand Down
9 changes: 5 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7954541

Please sign in to comment.