0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00
The web framework for content-driven websites. ️ Star to support our work!
Find a file
Arsh 80e3d4d3d0
feature: configuration for css inlining behavior (#6659)
* feature(inline stylesheets): implement as experimental

* test: rename css-inline -> css-import-as-inline

* test(content collections): add de-duplication of css

* test: add new suite for inlineStylesheets configuration

* fix(inline stylesheets): did not act on propagated styles

* hack(inline stylesheets testing): duplicate fixtures

Content collections reuses build data across multiple fixture.builds, even though a configuration change may have changed it.
Duplicating fixtures avoids usage of the stale cache.
https://cdn.discordapp.com/attachments/1039830843440504872/1097795182340092024/Screenshot_87_colored.png

* refactor(css plugin): reduce nesting

* optimization(css rendering): merge <style> tags

Chrome, but not Safari or Firefox, is slower to match rules when they are split across multiple files or style tags.
https://nolanlawson.com/2022/06/22/style-scoping-versus-shadow-dom-which-is-fastest/

Having the abiility to inline stylesheets opens us up to this optimization.
Ideally, it would extend to propagated styles, but that ended up being a rabbit hole.

* typedocs(inlineStylesheets config): ensure consistency

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* chore(build internals): update comment

* correct minor mistake in test

* test(inline stylesheets): unique package names for duplicate fixtures

* refactor(css build plugin): maps -> records

* refactor(css build plugin): remove use of spread operator

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-05-03 14:49:06 -04:00
.changeset feature: configuration for css inlining behavior (#6659) 2023-05-03 14:49:06 -04:00
.devcontainer Fix marketing typo by just removing extra info (#6410) 2023-03-02 15:47:13 -06:00
.github Speed up docs smoke tests (#6921) 2023-04-27 21:23:29 +08:00
.gitpod
.vscode
benchmark [ci] release (#6914) 2023-04-27 22:12:14 +08:00
examples feat(astro): experimental middleware (#6721) 2023-05-03 17:40:47 +01:00
packages feature: configuration for css inlining behavior (#6659) 2023-05-03 14:49:06 -04:00
patches chore: update dependencies related to changesets (#6868) 2023-04-28 15:04:03 +08:00
scripts chore: cleanup root and scripts dependencies (#6871) 2023-04-28 14:32:51 +08:00
.Dockerfile Add a Github Codespace Config based on gitpod dockerfile (#4185) 2022-08-08 12:22:32 -05:00
.editorconfig
.eslintignore
.eslintrc.cjs Refactor benchmark script (#6376) 2023-03-01 08:46:06 +00:00
.git-blame-ignore-revs
.gitignore Upgrade turbo (#6911) 2023-04-27 11:39:15 +08:00
.gitpod.yml fix: always get latest pnpm (#4571) 2022-08-31 11:13:06 -05:00
.npmrc Handle compiler breaking change (#5803) 2023-01-12 22:46:56 +08:00
.nvmrc Update .nvmrc to match new CI baseline (#5784) 2023-01-06 12:49:08 -05:00
.prettierignore .prettierignore: update comment; (#5177) 2022-10-24 10:32:31 -03:00
.prettierrc.cjs chore: update dependencies related to changesets (#6868) 2023-04-28 15:04:03 +08:00
CONTRIBUTING.md docs: improve CONTRIBUTING.md (#6867) 2023-04-18 16:44:38 +02:00
LICENSE
package.json Upgrade to version 1.0.0 of the language server (#6953) 2023-05-01 16:41:21 +02:00
pnpm-lock.yaml feature: configuration for css inlining behavior (#6659) 2023-05-03 14:49:06 -04:00
pnpm-workspace.yaml Upgrade turbo (#6911) 2023-04-27 11:39:15 +08:00
README.md Update README.md 2023-03-21 10:09:12 -05:00
SECURITY.md [ci] format 2022-08-08 17:12:48 +00:00
SECURITY_CONTACTS
STYLE_GUIDE.md
tsconfig.base.json feat(all): Migrate to TypeScript 5.0 (#6579) 2023-03-20 17:02:07 +01:00
tsconfig.json chore: add empty tsconfig to prevent TypeScript from crawling (#4937) 2022-09-30 16:02:39 -05:00
turbo.json Upgrade turbo (#6911) 2023-04-27 11:39:15 +08:00

Build the web you want


Astro is a website build tool for the modern web —
powerful developer experience meets lightweight output.

Install

The recommended way to install the latest version of Astro is by running the command below:

npm create astro@latest

You can also install Astro manually by running this command instead:

npm install --save-dev astro

Looking for help? Start with our Getting Started guide.

Looking for quick examples? Open a starter project right in your browser.

Documentation

Visit our official documentation.

Support

Having trouble? Get help in the official Astro Discord.

Contributing

New contributors welcome! Check out our Contributors Guide for help getting started.

Join us on Discord to meet other maintainers. We'll help you get your first contribution in no time!

Directory

Package Release Notes
astro astro version
create-astro create-astro version
@astrojs/react astro version
@astrojs/preact astro version
@astrojs/solid-js astro version
@astrojs/svelte astro version
@astrojs/vue astro version
@astrojs/lit astro version
@astrojs/deno astro version
@astrojs/netlify astro version
@astrojs/node astro version
@astrojs/vercel astro version
@astrojs/cloudflare astro version
@astrojs/partytown astro version
@astrojs/sitemap astro version
@astrojs/tailwind astro version
@astrojs/turbolinks astro version
@astrojs/alpinejs astro version
@astrojs/image astro version
@astrojs/mdx astro version
@astrojs/prefetch astro version

CII Best Practices

Several official projects are maintained outside of this repo:

Project Repository
@astrojs/compiler withastro/compiler
Astro Language Tools withastro/language-tools

Sponsors

Astro is generously supported by Netlify, Storyblok, and several other amazing organizations.

❤️ Sponsor Astro! ❤️

Astro's sponsors.