diff --git a/proposals/0016-style-script-defaults.md b/proposals/0016-style-script-defaults.md new file mode 100644 index 00000000..53abecf5 --- /dev/null +++ b/proposals/0016-style-script-defaults.md @@ -0,0 +1,114 @@ +- Start Date: 2022-03-15 +- Reference Issues: [RFC0008](https://github.com/withastro/rfcs/tree/main/proposals/0008-style-script-behavior.md), [#65](https://github.com/withastro/rfcs/discussions/65) +- Implementation PR: + +# Summary + +Astro is inconsist between ` + + + +

Hello!

+ + + +``` + +# Motivation + +There have been [a few](https://github.com/withastro/rfcs/pull/12) [attempts](https://github.com/withastro/rfcs/discussions/65) to finalize this behavior and address these inconsistent APIs. This RFC aims to settle these questions prior to v1.0. + +- Users are generally in favor of how we currently do scoped, processed, and optimized styles by default. It is logical to extend this feature to scripts. +- Inlining scripts and styles can be useful for anything that must exist inlined into the page, like Google Analytics. Users currently cannot do this for styles. +- Users currently have to remember syntax for styles and scripts that is unlike other Astro directives. +- Encourages our "optimized by default" / "pit of success" mentality. Smart scripts should be easy to use by default. + +# Detailed design + +### `is:inline` + +A new directive, `is:inline`, will be introduced. This will opt both `