|
| 1 | +--- |
| 2 | +Status: Active |
| 3 | +Champions: @43081j |
| 4 | +PR: |
| 5 | +--- |
| 6 | + |
| 7 | +# Official postcss/tailwind support |
| 8 | + |
| 9 | +As part of unifying the standard tools around lit, it would make sense to move |
| 10 | +the [postcss-lit](https://github.com/43081j/postcss-lit) project into the |
| 11 | +lit monorepo as an official solution to inline CSS transforms (e.g. tailwind). |
| 12 | + |
| 13 | +## Objective |
| 14 | + |
| 15 | +A strategy for how we will move the project into the monorepo. |
| 16 | + |
| 17 | +### Goals |
| 18 | +- Moving the postcss-lit project into the lit monorepo |
| 19 | +- Potentially documenting the project in an appropriate place (or a blog post) |
| 20 | + |
| 21 | +### Non-Goals |
| 22 | +- Transfer of responsibility (it is expected I will continue being the primary |
| 23 | +maintainer to avoid extra burden on the lit team) |
| 24 | + |
| 25 | +## Motivation |
| 26 | + |
| 27 | +The project already functions well and has high usage, but could benefit hugely |
| 28 | +in terms of discovery and support by being in the monorepo. |
| 29 | + |
| 30 | +- **Discovery:** we are regularly asked by users how to integrate lit with |
| 31 | +tailwind and other such CSS solutions. Having an officially supported and |
| 32 | +maintained integration will make this clearer |
| 33 | +- **Support:** we are more likely to receive community contributions through |
| 34 | +issues and pull requests |
| 35 | + |
| 36 | +It will also become much easier to keep the integration in sync with the |
| 37 | +most current version of lit, as we are likely to update it in line with |
| 38 | +any breaking changes elsewhere in the monorepo. |
| 39 | + |
| 40 | +## Detailed Design |
| 41 | + |
| 42 | +We should be able to migrate the repository to `packages/postcss-lit`, similar |
| 43 | +to what we will eventually do with `eslint-plugin-lit`. |
| 44 | + |
| 45 | +Alternatively, both could live in the `labs/` project although that may not |
| 46 | +make sense since they are both stable projects. |
| 47 | + |
| 48 | +It is likely we want to maintain the same `postcss-lit` name just to avoid |
| 49 | +breaking existing setups and to remain consistent with postcss' other custom |
| 50 | +syntaxes. |
| 51 | + |
| 52 | +## Implementation Considerations |
| 53 | + |
| 54 | +### Implementation Plan |
| 55 | + |
| 56 | +A single PR should be enough to begin with: copying the existing sources |
| 57 | +to the agreed directory and ensuring CI is setup correctly. |
| 58 | + |
| 59 | +### Backward Compatibility |
| 60 | + |
| 61 | +N/A |
| 62 | + |
| 63 | +### Testing Plan |
| 64 | + |
| 65 | +Existing tests should be enough once copied across. |
| 66 | + |
| 67 | +### Performance and Code Size Impact |
| 68 | + |
| 69 | +N/A |
| 70 | + |
| 71 | +### Interoperability |
| 72 | + |
| 73 | +N/A |
| 74 | + |
| 75 | +### Security Impact |
| 76 | + |
| 77 | +N/A |
| 78 | + |
| 79 | +### Documentation Plan |
| 80 | + |
| 81 | +We should create blog posts explaining the two ways users can transform |
| 82 | +CSS: |
| 83 | + |
| 84 | +- Inline CSS via postcss-lit |
| 85 | +- External CSS via rollup plugins (using CSS imports) |
| 86 | + |
| 87 | +These could be linked in the lit website. |
| 88 | + |
| 89 | +Alternatively, we could document both solutions in the lit website entirely |
| 90 | +rather than blog posts. |
| 91 | + |
| 92 | +## Downsides |
| 93 | + |
| 94 | +N/A |
| 95 | + |
| 96 | +## Alternatives |
| 97 | + |
| 98 | +N/A |
0 commit comments