Document vendored SVG sprite icons and offline binary assets
This commit is contained in:
1 parent
714447aa06
commit
d8dab9bab5
3 files changed
+45
-2
No files matched your search
@@ -1,6 +1,6 @@
|
||||
# Contract: Web Visual Baseline
|
||||
|
||||
Version: 1.1
|
||||
Version: 1.2
|
||||
|
||||
## Scope
|
||||
|
||||
@@ -60,6 +60,28 @@ Copy `assets/view.css` as the starting stylesheet and adapt tokens; do not rewri
|
||||
- Clear primary buttons for the main action on a screen.
|
||||
- Simple alert/error boxes with border + tinted background.
|
||||
|
||||
## Icons and Offline Assets
|
||||
|
||||
- Use ready-made SVG icons from Lucide for new actions. Do not draw icon paths,
|
||||
generate pictograms with AI, or mix icon families within the same interface.
|
||||
Reuse the project's existing icon aliases and shared rendering helper.
|
||||
- Vendor the SVG geometry and its license in the source tree. Record the icon
|
||||
name and upstream source. Downloading an asset is a development step only.
|
||||
- Collect icons in one local SVG sprite of named `symbol` elements. Render them
|
||||
through one shared template/helper using `svg` and `use`; do not paste a new
|
||||
SVG body into each button or page. Preserve the library's geometry.
|
||||
- Use a 24 x 24 viewBox, `fill="none"`, `stroke="currentColor"`, stroke width 2,
|
||||
round line caps and joins. Size and color come from shared icon/button CSS.
|
||||
- An icon-only action needs both `title` and `aria-label`. Decorative SVGs have
|
||||
`aria-hidden="true"` and must not receive keyboard focus.
|
||||
- Embed all UI assets in the application binary: templates, scripts, styles,
|
||||
icons, fonts and any third-party UI code. Go applications use `go:embed` and
|
||||
serve these assets themselves. System fonts are allowed without downloads.
|
||||
- The application and its UI must start and work without access to public
|
||||
websites. No CDN, remote font, external icon service, package manager or
|
||||
separately installed UI library may be a runtime prerequisite. Explicit
|
||||
connections to configured application data sources are a separate concern.
|
||||
|
||||
## Data Formatting
|
||||
|
||||
- Money: no minor units (no cents/kopecks) — round to whole currency units for
|
||||
|
||||
Reference in new issue
Block a user