From 30a80c5ab4ec897ee66ce39c08a61a5001c7080d Mon Sep 17 00:00:00 2001 From: 43081j <43081j@users.noreply.github.com> Date: Thu, 13 Apr 2023 22:40:16 +0100 Subject: [PATCH 1/4] add postcss-lit adoption rfc --- rfcs/NNNN-postcss-lit-adoption.md | 98 +++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 rfcs/NNNN-postcss-lit-adoption.md diff --git a/rfcs/NNNN-postcss-lit-adoption.md b/rfcs/NNNN-postcss-lit-adoption.md new file mode 100644 index 0000000..07cee69 --- /dev/null +++ b/rfcs/NNNN-postcss-lit-adoption.md @@ -0,0 +1,98 @@ +--- +Status: Active +Champions: @43081j +PR: +--- + +# Official postcss/tailwind support + +As part of unifying the standard tools around lit, it would make sense to move +the [postcss-lit](https://github.com/43081j/postcss-lit) project into the +lit monorepo as an official solution to inline CSS transforms (e.g. tailwind). + +## Objective + +A strategy for how we will move the project into the monorepo. + +### Goals +- Moving the postcss-lit project into the lit monorepo +- Potentially documenting the project in an appropriate place (or a blog post) + +### Non-Goals +- Transfer of responsibility (it is expected I will continue being the primary +maintainer to avoid extra burden on the lit team) + +## Motivation + +The project already functions well and has high usage, but could benefit hugely +in terms of discovery and support by being in the monorepo. + +- **Discovery:** we are regularly asked by users how to integrate lit with +tailwind and other such CSS solutions. Having an officially supported and +maintained integration will make this clearer +- **Support:** we are more likely to receive community contributions through +issues and pull requests + +It will also become much easier to keep the integration in sync with the +most current version of lit, as we are likely to update it in line with +any breaking changes elsewhere in the monorepo. + +## Detailed Design + +We should be able to migrate the repository to `packages/postcss-lit`, similar +to what we will eventually do with `eslint-plugin-lit`. + +Alternatively, both could live in the `labs/` project although that may not +make sense since they are both stable projects. + +It is likely we want to maintain the same `postcss-lit` name just to avoid +breaking existing setups and to remain consistent with postcss' other custom +syntaxes. + +## Implementation Considerations + +### Implementation Plan + +A single PR should be enough to begin with: copying the existing sources +to the agreed directory and ensuring CI is setup correctly. + +### Backward Compatibility + +N/A + +### Testing Plan + +Existing tests should be enough once copied across. + +### Performance and Code Size Impact + +N/A + +### Interoperability + +N/A + +### Security Impact + +N/A + +### Documentation Plan + +We should create blog posts explaining the two ways users can transform +CSS: + +- Inline CSS via postcss-lit +- External CSS via rollup plugins (using CSS imports) + +These could be linked in the lit website. + +Alternatively, we could document both solutions in the lit website entirely +rather than blog posts. + +## Downsides + +N/A + +## Alternatives + +N/A From 56024e518d588c264f5f5b30bd9dc63fa5fb4bbc Mon Sep 17 00:00:00 2001 From: 43081j <43081j@users.noreply.github.com> Date: Sat, 22 Apr 2023 15:45:07 +0100 Subject: [PATCH 2/4] some cr updates - more to come --- rfcs/NNNN-postcss-lit-adoption.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/rfcs/NNNN-postcss-lit-adoption.md b/rfcs/NNNN-postcss-lit-adoption.md index 07cee69..00d7768 100644 --- a/rfcs/NNNN-postcss-lit-adoption.md +++ b/rfcs/NNNN-postcss-lit-adoption.md @@ -1,7 +1,7 @@ --- Status: Active Champions: @43081j -PR: +PR: #17 --- # Official postcss/tailwind support @@ -39,15 +39,15 @@ any breaking changes elsewhere in the monorepo. ## Detailed Design -We should be able to migrate the repository to `packages/postcss-lit`, similar -to what we will eventually do with `eslint-plugin-lit`. +A new `packages/postcss-lit` directory can be created in the monorepo which +is initially an exact copy of the existing `postcss-lit` package. -Alternatively, both could live in the `labs/` project although that may not -make sense since they are both stable projects. +Once the sources have been copied across, we can continue publishing the package +under the existing `postcss-lit` name for backwards compatibility. -It is likely we want to maintain the same `postcss-lit` name just to avoid -breaking existing setups and to remain consistent with postcss' other custom -syntaxes. +After the move has been made, it may also make sense to migrate some of the CI +workflows to be more closely aligned to those of the other monorepo packages +(e.g. same node versions, etc). ## Implementation Considerations From 481e88056b1c138ad75a949fdf1e5b2bfc064f4c Mon Sep 17 00:00:00 2001 From: 43081j <43081j@users.noreply.github.com> Date: Mon, 29 May 2023 11:52:18 +0100 Subject: [PATCH 3/4] chore: pr feedback --- rfcs/NNNN-postcss-lit-adoption.md | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/rfcs/NNNN-postcss-lit-adoption.md b/rfcs/NNNN-postcss-lit-adoption.md index 00d7768..39f9162 100644 --- a/rfcs/NNNN-postcss-lit-adoption.md +++ b/rfcs/NNNN-postcss-lit-adoption.md @@ -6,35 +6,35 @@ PR: #17 # Official postcss/tailwind support -As part of unifying the standard tools around lit, it would make sense to move +As part of unifying the standard tools around Lit, it would make sense to move the [postcss-lit](https://github.com/43081j/postcss-lit) project into the -lit monorepo as an official solution to inline CSS transforms (e.g. tailwind). +Lit monorepo as an official solution to inline CSS transforms (e.g. tailwind). ## Objective A strategy for how we will move the project into the monorepo. ### Goals -- Moving the postcss-lit project into the lit monorepo +- Moving the postcss-lit project into the Lit monorepo - Potentially documenting the project in an appropriate place (or a blog post) ### Non-Goals - Transfer of responsibility (it is expected I will continue being the primary -maintainer to avoid extra burden on the lit team) +maintainer to avoid extra burden on the Lit team) ## Motivation The project already functions well and has high usage, but could benefit hugely in terms of discovery and support by being in the monorepo. -- **Discovery:** we are regularly asked by users how to integrate lit with +- **Discovery:** we are regularly asked by users how to integrate Lit with tailwind and other such CSS solutions. Having an officially supported and maintained integration will make this clearer - **Support:** we are more likely to receive community contributions through issues and pull requests It will also become much easier to keep the integration in sync with the -most current version of lit, as we are likely to update it in line with +most current version of Lit, as we are likely to update it in line with any breaking changes elsewhere in the monorepo. ## Detailed Design @@ -78,16 +78,13 @@ N/A ### Documentation Plan -We should create blog posts explaining the two ways users can transform +We should create articles explaining the two ways users can transform CSS: - Inline CSS via postcss-lit - External CSS via rollup plugins (using CSS imports) -These could be linked in the lit website. - -Alternatively, we could document both solutions in the lit website entirely -rather than blog posts. +These could be linked in the Lit website. ## Downsides From e506b1fb50b397e40e5f4f34b96e479f41bdad4f Mon Sep 17 00:00:00 2001 From: 43081j <43081j@users.noreply.github.com> Date: Sat, 17 Jun 2023 12:50:02 +0100 Subject: [PATCH 4/4] chore: reword some example text --- rfcs/NNNN-postcss-lit-adoption.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/rfcs/NNNN-postcss-lit-adoption.md b/rfcs/NNNN-postcss-lit-adoption.md index 39f9162..f3a5823 100644 --- a/rfcs/NNNN-postcss-lit-adoption.md +++ b/rfcs/NNNN-postcss-lit-adoption.md @@ -45,9 +45,13 @@ is initially an exact copy of the existing `postcss-lit` package. Once the sources have been copied across, we can continue publishing the package under the existing `postcss-lit` name for backwards compatibility. -After the move has been made, it may also make sense to migrate some of the CI -workflows to be more closely aligned to those of the other monorepo packages -(e.g. same node versions, etc). +After the move has been made, we should also do the following: + +- Migrate the CI workflow to be better aligned with other pipelines in the +monorepo +- Add a new `examples/` directory with full examples of how and when to use +`postcss-lit` + - In particular, we should include a tailwind example, and a basic example ## Implementation Considerations @@ -86,6 +90,10 @@ CSS: These could be linked in the Lit website. +In addition to these articles, we should publish some working examples (as +mentioned earlier) in the repo itself. Particularly tailwind, a basic setup, +and possibly an example of using postcss transforms. + ## Downsides N/A