You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .agents/skills/vue-components/SKILL.md
+24-4Lines changed: 24 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,10 @@ description: Vue component conventions and patterns for the Perd project. Use wh
5
5
6
6
# Vue Component Conventions
7
7
8
+
## Web Baseline 2025
9
+
10
+
The project targets **Baseline 2025** across all web technologies. Freely use modern HTML elements (like native `<dialog>`, `popover`, etc.), modern JS browser APIs, and modern CSS. We do not chase legacy browser support. Always choose modern native features over polyfills, fallbacks, or compatibility workarounds when they simplify the component structure.
11
+
8
12
## Component Structure
9
13
10
14
Use the standard order: `<template>`, `<script>`, `<style>`.
Do not add an explicit generic to `useTemplateRef` when Vue can infer the type from a static template `ref` on a native element or component. Add a generic only when inference is unavailable or incorrect.
95
+
90
96
### Models
91
97
92
98
Use `defineModel` for two-way binding:
@@ -218,18 +224,32 @@ Use full, readable names for component prop values and CSS/state variants. Prefe
218
224
219
225
Style owned markup through explicit classes on the element being styled. Avoid nested tag selectors such as `& em`, `& span`, or `& strong` when the element can be given its own class.
220
226
221
-
### CSS Features (Baseline 2025)
227
+
When an element changes style based on an ancestor component state, keep that state rule nested under the element's own class instead of writing a separate ancestor-to-descendant selector. Prefer this:
228
+
229
+
```css
230
+
.name {
231
+
.component:hover &,
232
+
.component:focus-visible & {
233
+
color: var(--color-text-primary);
234
+
}
235
+
}
236
+
```
237
+
238
+
Do not write the same rule as a separate selector such as `.component:hover .name` or `.component:focus-visible .name`. In this codebase, selector ownership should stay with the class being styled.
239
+
240
+
### Modern CSS Features
222
241
223
-
The project targets modern browsers only. Use these freely:
242
+
Leverage our Web Baseline 2025 and use these CSS features freely:
224
243
225
244
-**Native CSS nesting** — no preprocessors
245
+
-**Modern CSS features and selectors** when they simplify the component without adding unnecessary complexity
226
246
-**`oklch()` color function** with `prefers-color-scheme` for light/dark themes
227
247
-**`@starting-style`** + `allow-discrete` for animating `display: none` transitions
228
248
-**Range media queries** — `@media (width >= 768px)`, never `@media screen and (min-width: 768px)`
229
249
-**`@layer`** for CSS organization (reset, colors, spacings, sizes, transitions, typography)
230
250
-**CSS custom properties** for all design tokens (`--spacing-*`, `--color-*`, `--font-size-*`, etc.)
231
251
232
-
Prefer native CSS features that are already part of the supported browser baseline over legacy compatibility workarounds.
252
+
Prefer native CSS features over legacy compatibility workarounds.
Copy file name to clipboardExpand all lines: AGENTS.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,11 @@
13
13
- Keep reference-data slugs as canonical lowercase URL tokens using only `a-z`, `0-9`, and single hyphens; `name` values stay English display strings.
14
14
- Keep `equipment_items` brand/category foreign keys non-cascading (`restrict`) so reference-data deletion cannot silently remove catalog or inventory records.
15
15
16
+
## Web Baseline 2025
17
+
18
+
- The project targets **Baseline 2025** across all web technologies, including CSS, HTML, and JS browser APIs.
19
+
- We do not chase legacy browser support. Always choose modern native features over polyfills, fallbacks, or compatibility workarounds when they simplify the code.
20
+
16
21
## Frontend and UX guardrails
17
22
18
23
- For UI work, `new-design-assets/` is the source of truth for layout, component appearance, color tokens, typography, spacing, and interaction patterns.
@@ -36,5 +41,5 @@
36
41
## Verification
37
42
38
43
- Markdown changes: `pnpm run lint:markdown`.
39
-
- TypeScript or Vue changes: `pnpm run test:typecheck`, `pnpm run test:unit:agent`, `pnpm run lint:oxlint`, `pnpm run build`, and `pnpm run test:e2e:ci`.
44
+
- TypeScript or Vue changes: `pnpm run test:typecheck`, `pnpm run test:unit:agent`, `pnpm run lint:oxlint:agent`, `pnpm run build`, and `pnpm run test:e2e:ci`.
40
45
- Run applicable checks in parallel where practical.
0 commit comments