https://github.com/fallaciousreasoning/lit-mangler
A project to make it possible to override/modify `lit-html` templates for `brave-core`
https://github.com/fallaciousreasoning/lit-mangler
Last synced: 11 months ago
JSON representation
A project to make it possible to override/modify `lit-html` templates for `brave-core`
- Host: GitHub
- URL: https://github.com/fallaciousreasoning/lit-mangler
- Owner: fallaciousreasoning
- Created: 2025-02-13T03:13:07.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-02-16T23:32:02.000Z (over 1 year ago)
- Last Synced: 2025-06-28T18:45:25.338Z (about 1 year ago)
- Language: TypeScript
- Size: 33.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Lit Mangler
The goal of this repository is to devise an ergonomic way (and ideally
performant) way to override (mangle) `lit-html` templates.
The purpose of this is to introduce an easy way to convert our Polymer overrides
to LitElement as upstream migrates over.
## Goals
1. It should be able to replace bits of the Lit template with Lit's `html`
template tag.
2. It should be possible to tweak the internal HTML via a DOM like API (i.e.
`querySelector`, `setAttribute` `remove` ect).
3. Ideally this should run once per element (even better at build time). A first
step might run per instance of a component.
4. It should be easy to convert over our existing overrides in `brave-core`.
5. It should break when upstream changes their HTML/CSS/Typescript such that
the override no longer applies.