- New components should avoid
<style>blocks and prefer Tailwind CSS utility classes for everything. Two color scales are available:primaryanddanger(e.g.bg-primary-500,text-danger-700). Do not use Tailwind's built-in color palette (blue-500,red-600, etc.) and do not use the legacy CSS variables (--blue,--light-blue, etc.) in new code..wc.svelteweb components needextend: withTailwind(imported from../../helpers/tailwind) in their<svelte:options>for Tailwind to work in their shadow root. - Always add
partattributes to elements in components so consumers can override styles via::part()as an escape hatch. Use thelens-*naming convention (e.g.part="lens-button") for allpartspecifiers. - Use icons from
lucide-svelteinstead of Unicode symbols or inline SVG. - Do not use decorative section-delimiter comments (e.g.
// ======== Section ========or/* --- helpers --- */). - Prefer
for...ofloops over.forEach(). - Use the
functionkeyword for top-level function declarations instead ofconst fn = () =>arrow expressions. - Use
translate()(imported from../../helpers/translations) for all user-facing strings. Add new keys tolensTranslationsinsrc/helpers/translations.tswith at leastenanddetranslations. Do not hardcode English strings in templates. - Keep documentation in
book/in sync with code and behavior changes whenever implementation is updated.