bullframe.css 6.1.0 → 6.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/CHANGELOG.md +24 -1
  2. package/README.md +34 -20
  3. package/bin/bullframe.mjs +277 -0
  4. package/dist/css/bullframe-classless-dark.css +1 -1
  5. package/dist/css/bullframe-classless-dark.min.css +1 -1
  6. package/dist/css/bullframe-classless-dark.min.css.map +1 -1
  7. package/dist/css/bullframe-classless-system-default.css +1 -1
  8. package/dist/css/bullframe-classless-system-default.min.css +1 -1
  9. package/dist/css/bullframe-classless-system-default.min.css.map +1 -1
  10. package/dist/css/bullframe-classless.css +1 -1
  11. package/dist/css/bullframe-classless.min.css +1 -1
  12. package/dist/css/bullframe-classless.min.css.map +1 -1
  13. package/dist/css/bullframe-dark.css +1 -1
  14. package/dist/css/bullframe-dark.min.css +1 -1
  15. package/dist/css/bullframe-dark.min.css.map +1 -1
  16. package/dist/css/bullframe-system-default.css +1 -1
  17. package/dist/css/bullframe-system-default.min.css +1 -1
  18. package/dist/css/bullframe-system-default.min.css.map +1 -1
  19. package/dist/css/bullframe-utilities.css +1 -1
  20. package/dist/css/bullframe-utilities.min.css +1 -1
  21. package/dist/css/bullframe-utilities.min.css.map +1 -1
  22. package/dist/css/bullframe.css +1 -1
  23. package/dist/css/bullframe.min.css +1 -1
  24. package/dist/css/bullframe.min.css.map +1 -1
  25. package/dist/skills/AGENTS.bullframe.md +46 -0
  26. package/dist/skills/_shared/builds.md +66 -0
  27. package/dist/skills/_shared/conventions.md +93 -0
  28. package/dist/skills/api.json +1023 -0
  29. package/dist/skills/bullframe-convert/SKILL.md +117 -0
  30. package/dist/skills/bullframe-convert/examples/after.html +43 -0
  31. package/dist/skills/bullframe-convert/examples/before.html +44 -0
  32. package/dist/skills/bullframe-core/SKILL.md +143 -0
  33. package/dist/skills/bullframe-docs-page/SKILL.md +89 -0
  34. package/dist/skills/bullframe-docs-page/examples/docs-page.html +72 -0
  35. package/dist/skills/bullframe-forms/SKILL.md +99 -0
  36. package/dist/skills/bullframe-forms/examples/contact-form.html +67 -0
  37. package/dist/skills/bullframe-landing-page/SKILL.md +96 -0
  38. package/dist/skills/bullframe-landing-page/examples/landing.html +98 -0
  39. package/dist/skills/index.json +134 -0
  40. package/package.json +15 -5
@@ -0,0 +1,117 @@
1
+ ---
2
+ name: bullframe-convert
3
+ description: Convert existing HTML and CSS to Bullframe CSS. Use when migrating a page off Bootstrap, Tailwind, a hand-rolled stylesheet, or an older Bullframe version, and when asked to remove custom CSS in favour of the framework.
4
+ bullframe: '>=6.1.0 <7.0.0'
5
+ builds: [bullframe.css, bullframe-classless.css, bullframe-utilities.css]
6
+ requires: [bullframe-core]
7
+ docs: ['/migration', '/utilities', '/api-reference']
8
+ ---
9
+
10
+ # Convert to Bullframe
11
+
12
+ <!-- bf-absent: bf-d-flex, bf-mt-3, bf-text-center, bf-card, bf-btn-primary, bf-col-md-6 -->
13
+
14
+ This is advisory work, not a codemod. Read the source, rewrite the markup, and report
15
+ what could not be mapped. Never run a blind find and replace: class names from other
16
+ frameworks look similar to Bullframe's and are not the same.
17
+
18
+ ## When to use
19
+
20
+ Migrating a page or component onto Bullframe, stripping custom CSS that the framework
21
+ already covers, or upgrading markup from Bullframe v5.
22
+
23
+ ## Inputs to gather
24
+
25
+ The HTML, the stylesheet that styles it, which framework it uses today, the target build,
26
+ and how aggressive to be: replace the reset only, or convert the whole page.
27
+
28
+ ## Rules
29
+
30
+ 1. Work in four passes, in order: base styles, layout, utilities, leftovers.
31
+ 2. Pass 1, base. Delete the reset, normalize and base typography rules; link one
32
+ Bullframe build instead. Most of the deleted CSS is now element styling.
33
+ 3. Pass 2, layout. Map the page's container and grid onto `.bf-container`
34
+ (`--fluid`, `--break-xs|md|lg`), `.bf-row` and `.bf-col-1` … `.bf-col-12`. Per-breakpoint
35
+ column classes have no equivalent: collapse them to the desktop span and put the
36
+ breakpoint on the container.
37
+ 4. Pass 3, utilities. Map declaration by declaration against `api.json`. Never guess a
38
+ name from the source framework.
39
+ 5. Pass 4, leftovers. Anything with no equivalent stays as project CSS. List it. Do not
40
+ silently drop a rule.
41
+ 6. Upgrade the markup while you are there: a `<div class="header">` becomes `<header>`,
42
+ `<div class="card-title">` becomes a heading, a clickable `<div>` becomes a `<button>`
43
+ or `<a>`.
44
+ 7. Preserve every accessibility attribute: `alt`, `aria-*`, `for`, `id`, `lang`,
45
+ `scope`, `tabindex`. Add the skip link if the page lacks one.
46
+ 8. Output the converted file plus a mapping table and a residual list. The user needs to
47
+ see what moved and what stayed.
48
+
49
+ ## Name mapping
50
+
51
+ Common false friends. The left column does not exist in Bullframe.
52
+
53
+ | Source | Bullframe |
54
+ | ------------------------------- | ------------------------------------------------- |
55
+ | `container`, `container-fluid` | `bf-container`, `bf-container--fluid` |
56
+ | `row`, `col-md-6` | `bf-row`, `bf-col-6` + `bf-container--break-md` |
57
+ | `d-flex`, `justify-content-end` | `bf-display-flex`, `bf-display-flex--justify-end` |
58
+ | `mt-3`, `mb-4` | `bf-m-t-3`, `bf-m-b-4` |
59
+ | `p-3` | `bf-p-3` (padding-bottom) or `bf-p-t-3` |
60
+ | `text-center`, `text-start` | `bf-t-center`, `bf-t-left` |
61
+ | `fw-bold`, `font-weight-bold` | `bf-t-weight-700` |
62
+ | `text-truncate` | `bf-t-truncate` |
63
+ | `btn btn-primary` | `bf-btn bf-btn--primary` |
64
+ | `table table-striped` | `bf-table bf-table--zebra` |
65
+ | `visually-hidden`, `sr-only` | `bf-sr-only` |
66
+ | `card`, `card-body` | no equivalent: compose `<article>` with tokens |
67
+ | `badge`, `alert`, `navbar` | no equivalent: semantic markup plus tokens |
68
+
69
+ Spacing steps do not translate by number. Bullframe's `1` … `4` are `0.5rem`, `1rem`,
70
+ `2rem`, `3rem`, and the unsuffixed `.bf-m-N` sets `margin-bottom` only.
71
+
72
+ ## Recipe
73
+
74
+ 1. Inventory: list every class in the source and every rule in its stylesheet.
75
+ 2. Decide the target build.
76
+ 3. Convert the markup pass by pass.
77
+ 4. Diff the result against the original visually, not just structurally.
78
+ 5. Emit: converted file, mapping table, residual CSS with a one-line reason for each rule
79
+ that stayed, and a count of removed declarations.
80
+
81
+ ## Example
82
+
83
+ [`examples/before.html`](examples/before.html) is a `div`-heavy page on a custom
84
+ stylesheet. [`examples/after.html`](examples/after.html) is the same page converted: two
85
+ stylesheets replaced by one, `div` wrappers replaced by landmarks, card titles promoted to
86
+ headings, inline footer styling replaced by `.bf-t-center` and `<small>`.
87
+
88
+ ## Expected output
89
+
90
+ The converted markup, plus the mapping table and the residual list. The converted page
91
+ must validate and must reference only classes present in `api.json`.
92
+
93
+ ## Failure modes
94
+
95
+ - Mechanical prefixing: `mt-3` becoming `bf-mt-3`, `d-flex` becoming `bf-d-flex`,
96
+ `text-center` becoming `bf-text-center`. All three are wrong.
97
+ - Keeping per-breakpoint column classes with a `bf-` prefix.
98
+ - Dropping rules that had no mapping instead of reporting them.
99
+ - Losing `aria-*`, `alt` or `for` attributes during the rewrite.
100
+ - Linking Bullframe while leaving the old framework's stylesheet in place.
101
+ - Converting a page that only needed the utilities build, and rewriting its base styles
102
+ for no reason.
103
+ - Treating a `.bf-m-N` class as all-sides margin.
104
+
105
+ ## Do not
106
+
107
+ - Do not run a regex replace over class attributes.
108
+ - Do not rewrite the project's own component CSS that Bullframe does not cover.
109
+ - Do not change copy, structure or behaviour while converting styles.
110
+ - Do not delete a rule you cannot explain.
111
+
112
+ ## Canonical docs
113
+
114
+ - Migration from v5: <https://bullframecss.marcopontili.com/migration.md>
115
+ - Utilities overview: <https://bullframecss.marcopontili.com/utilities.md>
116
+ - API reference: <https://bullframecss.marcopontili.com/api-reference.md>
117
+ - Every class and token as JSON: <https://bullframecss.marcopontili.com/api.json>
@@ -0,0 +1,43 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <title>Team · Acme</title>
7
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bullframe.css" />
8
+ </head>
9
+ <body>
10
+ <a class="bf-skip-link" href="#main-content">Skip to content</a>
11
+
12
+ <header class="bf-container bf-container--break-md bf-p-t-3">
13
+ <nav aria-label="Primary"><a href="/">Home</a> · <a href="/team">Team</a></nav>
14
+ </header>
15
+
16
+ <main id="main-content" class="bf-container bf-container--break-md bf-p-b-4">
17
+ <section class="bf-t-center bf-m-b-4">
18
+ <h1>The people behind Acme</h1>
19
+ <p class="bf-lead">Twelve engineers, three time zones, one release train.</p>
20
+ <p><a class="bf-btn bf-btn--primary" href="/jobs">See open roles</a></p>
21
+ </section>
22
+
23
+ <section class="bf-row">
24
+ <div class="bf-col-6">
25
+ <article style="border: 1px solid var(--bf-gray-light); border-radius: var(--bf-spacing-sm); padding: var(--bf-spacing-xl)">
26
+ <h2 class="bf-m-t-0">Engineering</h2>
27
+ <p class="bf-m-b-0">Ships the product and keeps the pipeline green.</p>
28
+ </article>
29
+ </div>
30
+ <div class="bf-col-6">
31
+ <article style="border: 1px solid var(--bf-gray-light); border-radius: var(--bf-spacing-sm); padding: var(--bf-spacing-xl)">
32
+ <h2 class="bf-m-t-0">Support</h2>
33
+ <p class="bf-m-b-0">Answers every ticket within one business day.</p>
34
+ </article>
35
+ </div>
36
+ </section>
37
+ </main>
38
+
39
+ <footer class="bf-container bf-container--break-md bf-t-center bf-p-b-4">
40
+ <p class="bf-m-b-0"><small>© 2026 Acme</small></p>
41
+ </footer>
42
+ </body>
43
+ </html>
@@ -0,0 +1,44 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <title>Team · Acme</title>
7
+ <link rel="stylesheet" href="/css/reset.css" />
8
+ <link rel="stylesheet" href="/css/site.css" />
9
+ </head>
10
+ <body>
11
+ <div class="page-wrap">
12
+ <div class="header">
13
+ <div class="nav-links"><a href="/">Home</a> <a href="/team">Team</a></div>
14
+ </div>
15
+
16
+ <div class="container">
17
+ <div class="hero text-center mt-4">
18
+ <div class="hero-title">The people behind Acme</div>
19
+ <p class="lead-text">Twelve engineers, three time zones, one release train.</p>
20
+ <a class="btn btn-primary" href="/jobs">See open roles</a>
21
+ </div>
22
+
23
+ <div class="row mt-5">
24
+ <div class="col-md-6">
25
+ <div class="card">
26
+ <div class="card-title">Engineering</div>
27
+ <p class="card-text">Ships the product and keeps the pipeline green.</p>
28
+ </div>
29
+ </div>
30
+ <div class="col-md-6">
31
+ <div class="card">
32
+ <div class="card-title">Support</div>
33
+ <p class="card-text">Answers every ticket within one business day.</p>
34
+ </div>
35
+ </div>
36
+ </div>
37
+
38
+ <div class="footer mt-5" style="text-align: center; color: #666; font-size: 14px">
39
+ <p>© 2026 Acme</p>
40
+ </div>
41
+ </div>
42
+ </div>
43
+ </body>
44
+ </html>
@@ -0,0 +1,143 @@
1
+ ---
2
+ name: bullframe-core
3
+ description: Core conventions for writing HTML styled with Bullframe CSS. Use before any other Bullframe skill, and whenever choosing a build, scaffolding a page, theming with tokens, or deciding whether to write custom CSS.
4
+ bullframe: '>=6.1.0 <7.0.0'
5
+ builds: [bullframe.css, bullframe-dark.css, bullframe-system-default.css, bullframe-classless.css, bullframe-classless-dark.css, bullframe-classless-system-default.css, bullframe-utilities.css]
6
+ requires: []
7
+ docs: ['/getting-started', '/variables', '/theming', '/api-reference']
8
+ ---
9
+
10
+ # Bullframe core conventions
11
+
12
+ <!-- bf-absent: bf-col-md-6, bf-col-sm-12, bf-d-flex, bf-mt-3, bf-text-center, bf-card -->
13
+
14
+ Bullframe is one stylesheet of plain CSS. No build step, no JavaScript, no components to
15
+ import. It styles semantic HTML, then adds `.bf-*` utilities on the class-based builds.
16
+
17
+ Read [`_shared/conventions.md`](../_shared/conventions.md) and
18
+ [`_shared/builds.md`](../_shared/builds.md) alongside this file. They hold the rule list
19
+ and the build table this skill applies.
20
+
21
+ ## When to use
22
+
23
+ Any task that writes or edits HTML in a project that links Bullframe. Every other
24
+ Bullframe skill assumes these rules.
25
+
26
+ ## Rules
27
+
28
+ 1. Link exactly one base build. Two base builds cascade over each other and produce
29
+ wrong colours in dark mode.
30
+ 2. Do not invent classes. Check `api.json` (shipped at
31
+ `node_modules/bullframe.css/dist/skills/api.json`, published at
32
+ <https://bullframecss.marcopontili.com/api.json>). 179 classes, 47 tokens, and nothing
33
+ else exists.
34
+ 3. Prefer the element over the class. `<button>` is already styled; `.bf-btn` is for
35
+ links that must look like buttons and for buttons that need the framework's chrome.
36
+ 4. Prefer a utility over a declaration. Before writing `style="margin-bottom: 2rem"`,
37
+ use `.bf-m-b-3`.
38
+ 5. Prefer a token over a literal. `var(--bf-gray-light)`, not `#ccc`; the dark builds
39
+ rebind those tokens, a literal does not follow.
40
+ 6. Keep custom CSS in one project stylesheet, loaded after Bullframe, and confine it to
41
+ `:root` token overrides plus genuinely project-specific rules.
42
+ 7. The root font-size is `62.5%`, so `1rem` is about `10px`. `--bf-body-font-size-rem` is
43
+ `1.6rem`, which renders as 16px.
44
+
45
+ ## Page scaffold
46
+
47
+ Class-based, light. Every generated page starts here.
48
+
49
+ ```html
50
+ <!doctype html>
51
+ <html lang="en">
52
+ <head>
53
+ <meta charset="UTF-8" />
54
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
55
+ <title>Page title</title>
56
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bullframe.css" />
57
+ </head>
58
+ <body>
59
+ <a class="bf-skip-link" href="#main-content">Skip to content</a>
60
+ <main id="main-content" class="bf-container bf-container--break-md">
61
+ <h1>Page title</h1>
62
+ <p class="bf-lead">One sentence that says what this page is for.</p>
63
+ </main>
64
+ </body>
65
+ </html>
66
+ ```
67
+
68
+ Classless, same page:
69
+
70
+ ```html
71
+ <!doctype html>
72
+ <html lang="en">
73
+ <head>
74
+ <meta charset="UTF-8" />
75
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
76
+ <title>Page title</title>
77
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bullframe.css/dist/css/bullframe-classless.min.css" />
78
+ </head>
79
+ <body>
80
+ <main>
81
+ <h1>Page title</h1>
82
+ <p>One sentence that says what this page is for.</p>
83
+ </main>
84
+ </body>
85
+ </html>
86
+ ```
87
+
88
+ There is no skip link on a classless build: `.bf-skip-link` is not in that stylesheet.
89
+
90
+ ## Layout
91
+
92
+ `.bf-container` caps width at `114rem` and adds gutters. `.bf-container--fluid` is full
93
+ width. `.bf-row` is a flex row with negative gutters, `.bf-col-1` … `.bf-col-12` are
94
+ twelfths.
95
+
96
+ ```html
97
+ <main id="main-content" class="bf-container bf-container--break-md">
98
+ <section class="bf-row">
99
+ <div class="bf-col-8">Main column</div>
100
+ <div class="bf-col-4">Sidebar</div>
101
+ </section>
102
+ </main>
103
+ ```
104
+
105
+ Columns in one row sum to 12 or less. Responsiveness is a container modifier:
106
+ `--break-xs` stacks below 576px, `--break-md` below 768px, `--break-lg` below 992px.
107
+ Use `--break-md` unless there is a reason not to.
108
+
109
+ ## Theming
110
+
111
+ ```html
112
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bullframe.css" />
113
+ <style>
114
+ :root {
115
+ --bf-blue: rgb(84 47 194);
116
+ --bf-blue-light: rgb(64 32 160);
117
+ --bf-focus-ring-color: rgb(84 47 194);
118
+ }
119
+ </style>
120
+ ```
121
+
122
+ That restyles links, primary buttons and focus rings across the page. Check contrast:
123
+ the shipped blues are WCAG AA (4.5:1) on white, and a replacement has to clear the same
124
+ bar.
125
+
126
+ ## Do not
127
+
128
+ - Do not link `bullframe.css` and `bullframe-dark.css` together, or any two base builds.
129
+ - Do not write `.bf-col-md-6`, `.bf-col-sm-12`, `.bf-d-flex`, `.bf-mt-3`, `.bf-text-center`
130
+ or `.bf-card`. None exist. The real names are `.bf-col-6`, `.bf-display-flex`,
131
+ `.bf-m-t-3`, `.bf-t-center`, and a card is composed markup.
132
+ - Do not add a theme-toggle script to get dark mode; pick a `-system-default` build.
133
+ - Do not set `outline: none` anywhere.
134
+ - Do not reimplement the grid, the spacing scale or the type scale in project CSS.
135
+ - Do not add a CSS framework alongside Bullframe.
136
+
137
+ ## Canonical docs
138
+
139
+ - Getting started: <https://bullframecss.marcopontili.com/getting-started.md>
140
+ - Variables: <https://bullframecss.marcopontili.com/variables.md>
141
+ - Theming: <https://bullframecss.marcopontili.com/theming.md>
142
+ - API reference: <https://bullframecss.marcopontili.com/api-reference.md>
143
+ - Every class and token as JSON: <https://bullframecss.marcopontili.com/api.json>
@@ -0,0 +1,89 @@
1
+ ---
2
+ name: bullframe-docs-page
3
+ description: Build a documentation, article or reference page with Bullframe CSS. Use for docs, guides, changelogs, help center articles, blog posts, or any prose-first page.
4
+ bullframe: '>=6.1.0 <7.0.0'
5
+ builds: [bullframe-classless.css, bullframe-classless-dark.css, bullframe-classless-system-default.css, bullframe.css]
6
+ requires: [bullframe-core]
7
+ docs: ['/typography', '/getting-started', '/examples']
8
+ ---
9
+
10
+ # Documentation page
11
+
12
+ <!-- bf-absent: bf-prose, bf-article, bf-toc -->
13
+
14
+ Prose is where the classless builds win. Semantic HTML with no class attributes at all
15
+ renders as a finished document: headings, lists, tables, quotes, code blocks and figures
16
+ are styled by element.
17
+
18
+ ## When to use
19
+
20
+ Documentation, a guide, a changelog, a help center article, a blog post, an API page, or
21
+ any page that is mostly text.
22
+
23
+ ## Inputs to gather
24
+
25
+ Title, section outline, whether a table of contents or breadcrumb is needed, code sample
26
+ languages, and the theme. Default to the classless light build and say so.
27
+
28
+ ## Rules
29
+
30
+ 1. Default to `bullframe-classless.css`. Write zero class attributes. Escalate to the
31
+ class-based build only when the page needs a real multi-column layout, and state why.
32
+ 2. `.bf-*` classes do not exist in a classless build. Writing them there produces
33
+ unstyled markup.
34
+ 3. One `<h1>`, then `<h2>` sections in order. Give every heading that is a link target an
35
+ `id`.
36
+ 4. The body is `<article>` inside `<main>`. A table of contents is a `<nav>` with an
37
+ `aria-label` and an ordered list.
38
+ 5. Code samples are `<pre><code>`. Inline code is `<code>`. Do not add a highlighter
39
+ unless the task asks for one.
40
+ 6. Tables carry a `<caption>` and `<th scope="col">` headers.
41
+ 7. Use `<blockquote>`, `<figure>` with `<figcaption>`, `<dl>`, `<abbr>` and `<time>` where
42
+ they fit. All of them are styled.
43
+ 8. A skip link needs `.bf-skip-link`, which only exists on class-based builds. On a
44
+ classless page, a `<main>` landmark plus ordered headings is the accessible structure.
45
+
46
+ ## Recipe
47
+
48
+ 1. Confirm the page is prose. If it needs a sidebar with independent scroll, it is a
49
+ layout page, not this.
50
+ 2. Emit the classless scaffold from `bullframe-core`.
51
+ 3. Breadcrumb `<nav>` in `<header>` if the page sits inside a hierarchy.
52
+ 4. `<article>` with the `<h1>`, a lead paragraph, then the sections.
53
+ 5. Table of contents as a `<nav aria-label="On this page">` with anchors matching the
54
+ heading ids.
55
+ 6. Close with a `<footer>` carrying the review date or edit link.
56
+
57
+ ## Example
58
+
59
+ [`examples/docs-page.html`](examples/docs-page.html) is a complete classless page:
60
+ breadcrumb, table of contents, code block, captioned table and a quote. It contains no
61
+ class attribute.
62
+
63
+ ## Expected output
64
+
65
+ An HTML file whose class attribute count is zero on the classless path, and which reads
66
+ correctly with stylesheets disabled.
67
+
68
+ ## Failure modes
69
+
70
+ - Reaching for `.bf-container` or `.bf-lead` on a classless build, where neither exists.
71
+ - Wrapping every paragraph in a `<div>`.
72
+ - Restating framework typography in a `<style>` block.
73
+ - Heading levels chosen for size rather than structure; use `.bf-h1` … `.bf-h6` on a
74
+ class-based build when the visual level must differ from the semantic one.
75
+ - A table of contents built from `<div>`s instead of a `<nav>` and a list.
76
+ - Anchors that do not match any heading id.
77
+
78
+ ## Do not
79
+
80
+ - Do not add a JavaScript table of contents generator for a static page.
81
+ - Do not mix a classless build with utility classes; add the utilities sheet if you need
82
+ them, or move to the class-based build.
83
+ - Do not put a skip link on a classless page; the class is not in that stylesheet.
84
+
85
+ ## Canonical docs
86
+
87
+ - Typography: <https://bullframecss.marcopontili.com/typography.md>
88
+ - Getting started: <https://bullframecss.marcopontili.com/getting-started.md>
89
+ - Examples, including the classless blog: <https://bullframecss.marcopontili.com/examples>
@@ -0,0 +1,72 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <title>Installing Fieldnote · Docs</title>
7
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bullframe.css/dist/css/bullframe-classless.min.css" />
8
+ </head>
9
+ <body>
10
+ <header>
11
+ <nav aria-label="Breadcrumb"><a href="/docs">Docs</a> › <a href="/docs/install">Install</a></nav>
12
+ </header>
13
+
14
+ <main>
15
+ <article>
16
+ <h1>Installing Fieldnote</h1>
17
+ <p>Fieldnote runs as a single binary. This page covers install, first run and the two configuration files it reads.</p>
18
+
19
+ <nav aria-label="On this page">
20
+ <h2>On this page</h2>
21
+ <ol>
22
+ <li><a href="#requirements">Requirements</a></li>
23
+ <li><a href="#install">Install</a></li>
24
+ <li><a href="#configuration">Configuration</a></li>
25
+ </ol>
26
+ </nav>
27
+
28
+ <h2 id="requirements">Requirements</h2>
29
+ <p>Node 20 or newer, and 200 MB of free disk space.</p>
30
+
31
+ <h2 id="install">Install</h2>
32
+ <pre><code>npm install --global fieldnote
33
+ fieldnote init</code></pre>
34
+ <p>The <code>init</code> step writes <code>fieldnote.json</code> into the current directory and never overwrites an existing file.</p>
35
+
36
+ <h2 id="configuration">Configuration</h2>
37
+ <table>
38
+ <caption>
39
+ Configuration files, in load order
40
+ </caption>
41
+ <thead>
42
+ <tr>
43
+ <th scope="col">File</th>
44
+ <th scope="col">Scope</th>
45
+ <th scope="col">Wins</th>
46
+ </tr>
47
+ </thead>
48
+ <tbody>
49
+ <tr>
50
+ <td><code>~/.fieldnote.json</code></td>
51
+ <td>User</td>
52
+ <td>No</td>
53
+ </tr>
54
+ <tr>
55
+ <td><code>fieldnote.json</code></td>
56
+ <td>Project</td>
57
+ <td>Yes</td>
58
+ </tr>
59
+ </tbody>
60
+ </table>
61
+
62
+ <blockquote>
63
+ <p>A missing configuration file is not an error. Fieldnote falls back to its defaults and says so on first run.</p>
64
+ </blockquote>
65
+ </article>
66
+ </main>
67
+
68
+ <footer>
69
+ <p>Last reviewed 26 September 2026.</p>
70
+ </footer>
71
+ </body>
72
+ </html>
@@ -0,0 +1,99 @@
1
+ ---
2
+ name: bullframe-forms
3
+ description: Build accessible forms with Bullframe CSS. Use when creating a contact form, login, signup, checkout, search box, filter bar, or any page with input controls.
4
+ bullframe: '>=6.1.0 <7.0.0'
5
+ builds: [bullframe.css, bullframe-dark.css, bullframe-system-default.css, bullframe-classless.css]
6
+ requires: [bullframe-core]
7
+ docs: ['/forms', '/components/forms', '/accessibility']
8
+ ---
9
+
10
+ # Forms
11
+
12
+ <!-- bf-absent: bf-form-group, bf-input, bf-label, bf-form-control, bf-checkbox -->
13
+
14
+ Bullframe styles form elements directly. A plain `<label>` plus `<input>` is already
15
+ sized, spaced and focus-ringed on every build, classless included. Classes appear only
16
+ for state (`.bf-invalid`, `.bf-disabled`) and layout.
17
+
18
+ ## When to use
19
+
20
+ Any task that adds or edits a form, a single control, or validation feedback.
21
+
22
+ ## Inputs to gather
23
+
24
+ The field list with types and required flags, the submit label, the form action and
25
+ method, whether the layout is stacked or two-column, and whether errors are rendered
26
+ server-side or client-side.
27
+
28
+ ## Rules
29
+
30
+ 1. Every control has a `<label for>` whose value is the control's `id`. A placeholder is
31
+ not a label, and `aria-label` is a fallback for controls with no visible text, not the
32
+ default.
33
+ 2. Pick the narrowest input type: `email`, `tel`, `url`, `number`, `date`, `search`. It
34
+ changes the mobile keyboard and gives free validation.
35
+ 3. Set `autocomplete` with the standard token (`name`, `email`, `street-address`,
36
+ `cc-number`, `current-password`, `new-password`). Checkout and sign-in forms are the
37
+ main reason users abandon a page.
38
+ 4. Mark a required field with the `required` attribute. Do not use a class for it.
39
+ 5. Group related controls, especially radios and checkboxes, in `<fieldset>` with a
40
+ `<legend>`.
41
+ 6. Hints go in an element referenced by `aria-describedby`, not in the label.
42
+ 7. Error state is `.bf-invalid` on the control plus a message referenced by
43
+ `aria-describedby`. Colour alone never carries the meaning.
44
+ 8. A disabled control gets the `disabled` attribute; `.bf-disabled` is for styling
45
+ elements that cannot take the attribute, such as a link styled as a button.
46
+ 9. Two-column layouts use `.bf-row` with `.bf-col-*`. The form itself needs no wrapper
47
+ class.
48
+ 10. The submit control is `<button type="submit" class="bf-btn bf-btn--primary">`.
49
+
50
+ ## Recipe
51
+
52
+ 1. Choose the build. A form-only page on a classless build works and needs no classes;
53
+ any two-column layout needs the class-based build.
54
+ 2. Emit the page scaffold from `bullframe-core`.
55
+ 3. Write the form: `action`, `method`, then label and control pairs in source order.
56
+ 4. Add `fieldset`/`legend` around each radio or checkbox group.
57
+ 5. Add the submit button last, inside the form.
58
+ 6. Check every control has a label, a type and, where applicable, an autocomplete token.
59
+
60
+ ## Example
61
+
62
+ [`examples/contact-form.html`](examples/contact-form.html) is a complete two-column contact
63
+ page: labelled controls, a select with an empty first option, a described textarea, a
64
+ radio fieldset, and an aside composed from tokens.
65
+
66
+ ## Expected output
67
+
68
+ Markup where every control is labelled and typed, which passes html-validate with the
69
+ `input-missing-label` rule set to error. No form framework, no validation library, no
70
+ custom control CSS.
71
+
72
+ ## Failure modes
73
+
74
+ - A placeholder standing in for a label.
75
+ - `<div>` or `<a>` used as a submit control.
76
+ - `outline: none` or a custom focus style that drops contrast.
77
+ - Inventing `.bf-form-group`, `.bf-input`, `.bf-label` or `.bf-form-control`. None exist;
78
+ the element selectors do the work.
79
+ - Custom checkbox and radio CSS when `src/css/utilities/form-custom-radio-checkbox.css`
80
+ already ships it on the class-based builds.
81
+ - Missing `autocomplete` on address, payment and password fields.
82
+ - A select whose first option is a real value, so the user cannot express "not chosen".
83
+ - Client-side validation messages that replace, rather than supplement, the `required`
84
+ attribute.
85
+
86
+ ## Do not
87
+
88
+ - Do not remove or restyle the focus ring; tune `--bf-focus-ring-color`,
89
+ `--bf-focus-ring-width`, `--bf-focus-ring-offset`.
90
+ - Do not use `.bf-invalid` as a permanent style; it is a state.
91
+ - Do not nest a form inside another form.
92
+ - Do not add JavaScript unless the task explicitly asks for client-side behaviour.
93
+
94
+ ## Canonical docs
95
+
96
+ - Forms: <https://bullframecss.marcopontili.com/forms.md>
97
+ - Form patterns: <https://bullframecss.marcopontili.com/components/forms.md>
98
+ - Accessibility: <https://bullframecss.marcopontili.com/accessibility.md>
99
+ - Live examples: <https://bullframecss.marcopontili.com/examples>