From dd717d075d19aa25c2eb311a9901c9351dd77f8e Mon Sep 17 00:00:00 2001 From: Nate Moore Date: Tue, 15 Mar 2022 00:13:37 -0500 Subject: [PATCH 1/3] initial draft --- proposals/0000-style-script-defaults.md | 88 +++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 proposals/0000-style-script-defaults.md diff --git a/proposals/0000-style-script-defaults.md b/proposals/0000-style-script-defaults.md new file mode 100644 index 00000000..410601c6 --- /dev/null +++ b/proposals/0000-style-script-defaults.md @@ -0,0 +1,88 @@ +- 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 `