diff --git a/STYLEGUIDE.md b/STYLEGUIDE.md index c3e22cf47..8a22821ed 100644 --- a/STYLEGUIDE.md +++ b/STYLEGUIDE.md @@ -69,6 +69,30 @@ const emit = defineEmits(["routeToName"]); useRouteToName(emit); ``` +### Breakpoints + +activist uses Tailwind for CSS, and some parts of components will be conditionally rendered based on Tailwind breakpoints, but we want to avoid using it to show and hide whole components. The reason for this is that using CSS in this way means that unneeded TypeScript for the hidden components will still run on page load. Please use `useBreakpoint` for all conditional rendering of full components. + +- ✅ No TS ran: + + ```vue + + + + ``` +- ❌ TS still ran: + + ```vue + + ``` + ## TypeScript [`⇧`](#contents) diff --git a/frontend/components/card/CardTextArea.vue b/frontend/components/card/CardTextArea.vue index af8a2231c..221994e8a 100644 --- a/frontend/components/card/CardTextArea.vue +++ b/frontend/components/card/CardTextArea.vue @@ -8,19 +8,21 @@ {{ description }}

- + - +