-
Notifications
You must be signed in to change notification settings - Fork 12
add postcss-lit adoption rfc #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
43081j
wants to merge
4
commits into
lit:main
Choose a base branch
from
43081j:postcss
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
--- | ||
Status: Active | ||
Champions: @43081j | ||
PR: #17 | ||
--- | ||
|
||
# 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 | ||
|
||
A new `packages/postcss-lit` directory can be created in the monorepo which | ||
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, 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 | ||
|
||
### 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 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. | ||
|
||
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 | ||
|
||
## Alternatives | ||
|
||
N/A |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.