@canopycanopycanopy/b-ber-theme-serif 3.1.0 → 4.0.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.
- package/AGENTS.md +47 -0
- package/CLAUDE.md +1 -0
- package/README.md +22 -5
- package/index.js +2 -2
- package/layout/_web.scss +14 -0
- package/package.json +2 -4
- package/.eslintrc.js +0 -1
package/AGENTS.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# AGENTS.md — b-ber-theme-serif
|
|
2
|
+
|
|
3
|
+
## What This Is
|
|
4
|
+
|
|
5
|
+
A serif-first SCSS theme for b-ber publications. The build pipeline compiles `application.scss` into a stylesheet embedded in EPUB, web, reader, and mobi output. The theme uses `b-ber-theme-mixins` for shared mixins and `modularscale-sass` for typographic scale. All settings variables use `!default` so project-level stylesheets can override them. The `$build` variable gates conditional rules per output format.
|
|
6
|
+
|
|
7
|
+
## Key Files
|
|
8
|
+
|
|
9
|
+
| File/Directory | Purpose |
|
|
10
|
+
| ----------------------------- | -------------------------------------------------------------- |
|
|
11
|
+
| `application.scss` | Entry point; imports settings, mixins, typography, layout |
|
|
12
|
+
| `_settings.scss` | SCSS variables for colors, fonts, spacing, and layout defaults |
|
|
13
|
+
| `typography/_fonts.scss` | Font-face declarations |
|
|
14
|
+
| `typography/_reset.scss` | Base element reset |
|
|
15
|
+
| `layout/_container.scss` | Page/column container rules |
|
|
16
|
+
| `layout/_figure.scss` | Figure and image layout |
|
|
17
|
+
| `layout/_text.scss` | Paragraph, heading, inline text styles |
|
|
18
|
+
| `layout/_list.scss` | List element styles |
|
|
19
|
+
| `layout/_table.scss` | Table styles |
|
|
20
|
+
| `layout/_media-controls.scss` | Audio/video player controls |
|
|
21
|
+
| `layout/_epub.scss` | EPUB-specific conditional styles |
|
|
22
|
+
| `layout/_web.scss` | Web-specific conditional styles |
|
|
23
|
+
| `layout/_reader.scss` | Reader-specific conditional styles |
|
|
24
|
+
| `layout/_print.scss` | Print/PDF styles |
|
|
25
|
+
| `layout/_helpers.scss` | Utility classes |
|
|
26
|
+
| `fonts/` | Theme font files (empty placeholder in repo) |
|
|
27
|
+
| `images/` | Theme image assets (empty placeholder in repo) |
|
|
28
|
+
| `index.js` | Node entry point for build tooling |
|
|
29
|
+
|
|
30
|
+
## Dev Commands
|
|
31
|
+
|
|
32
|
+
No test suite. The `test` script exits with an error by default.
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm run build:sass # compile application.scss to application.css
|
|
36
|
+
npm run watch:sass # watch and recompile on change
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Code Standards
|
|
40
|
+
|
|
41
|
+
This package follows the monorepo-wide standards in the root AGENTS.md.
|
|
42
|
+
Additional standards for this package:
|
|
43
|
+
|
|
44
|
+
- SCSS follows BEM-adjacent naming conventions established in `b-ber-theme-mixins`
|
|
45
|
+
- All variable declarations must use `!default` to remain overridable
|
|
46
|
+
- Build-target conditional logic must use the `$build` variable (`epub`, `reader`, `mobi`, `web`)
|
|
47
|
+
- Do not add compiled CSS files (`application.css`) to version control
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@AGENTS.md
|
package/README.md
CHANGED
|
@@ -1,9 +1,26 @@
|
|
|
1
|
-
#
|
|
1
|
+
# b-ber-theme-serif
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A serif-first SCSS theme for b-ber publications. During a build, b-ber compiles `application.scss` into the stylesheet that is embedded in generated EPUB, web, reader, and mobi output. The theme imports `b-ber-theme-mixins` for shared mixins and `modularscale-sass` for typographic scale calculations. Settings are controlled by SCSS variables in `_settings.scss`; all variables use `!default` so they can be overridden by project-level stylesheets. The `$build` variable gates conditional rules for `epub`, `reader`, `mobi`, and `web` targets.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Contents
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
| Path | Purpose |
|
|
8
|
+
| ------------------ | ----------------------------------------------------------------------------------------------------------------------- |
|
|
9
|
+
| `application.scss` | Entry point; imports settings, mixins, typography, and layout |
|
|
10
|
+
| `_settings.scss` | SCSS variables for colors, fonts, spacing, and layout defaults |
|
|
11
|
+
| `typography/` | `_fonts.scss` (font-face rules), `_reset.scss` (base reset) |
|
|
12
|
+
| `layout/` | Partials for container, figure, text, list, table, media controls, epub/web/reader/print variants, and helper utilities |
|
|
13
|
+
| `fonts/` | Directory for theme font files (empty placeholder in repo) |
|
|
14
|
+
| `images/` | Directory for theme image assets (empty placeholder in repo) |
|
|
15
|
+
| `index.js` | Node entry point (exposes package path for build tooling) |
|
|
16
|
+
|
|
17
|
+
## Dev
|
|
18
|
+
|
|
19
|
+
No test suite. The `test` script exits with an error by default.
|
|
20
|
+
|
|
21
|
+
To compile the stylesheet locally:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm run build:sass # outputs application.css
|
|
25
|
+
npm run watch:sass # watch mode
|
|
9
26
|
```
|
package/index.js
CHANGED
|
@@ -8,10 +8,10 @@ module.exports = {
|
|
|
8
8
|
fonts: (() =>
|
|
9
9
|
fs
|
|
10
10
|
.readdirSync(path.join(__dirname, 'fonts'))
|
|
11
|
-
.filter(file => /\.(otf|ttf|woff2?|eot)/i.test(path.extname(file))))(),
|
|
11
|
+
.filter((file) => /\.(otf|ttf|woff2?|eot)/i.test(path.extname(file))))(),
|
|
12
12
|
images: (() =>
|
|
13
13
|
fs
|
|
14
14
|
.readdirSync(path.join(__dirname, 'images'))
|
|
15
|
-
.filter(file => /\.(jpe?g|png|gif)/i.test(path.extname(file))))(),
|
|
15
|
+
.filter((file) => /\.(jpe?g|png|gif)/i.test(path.extname(file))))(),
|
|
16
16
|
npmPackage,
|
|
17
17
|
}
|
package/layout/_web.scss
CHANGED
|
@@ -79,6 +79,20 @@
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
+
// The header/footer chrome icons are inline SVGs emitted directly by
|
|
83
|
+
// b-ber-tasks' web Template (see TASK-111) rather than a webfont ligature.
|
|
84
|
+
// `fill: currentColor` keeps the `button:hover { color: $success; }` /
|
|
85
|
+
// `.publication__nav__link:hover { color: $success; }` rules above working
|
|
86
|
+
// the same way they did when the icon was glyph text. 24px matches the
|
|
87
|
+
// Material Icons default ligature size these SVGs replace.
|
|
88
|
+
.header__item__toggle svg,
|
|
89
|
+
.publication__search__button svg,
|
|
90
|
+
.publication__nav__link svg {
|
|
91
|
+
width: 24px;
|
|
92
|
+
height: 24px;
|
|
93
|
+
fill: currentColor;
|
|
94
|
+
}
|
|
95
|
+
|
|
82
96
|
// Variables for spacing, sizing, and transitions.
|
|
83
97
|
//
|
|
84
98
|
// Show/hide the navigation panels (TOC and info sidebar).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canopycanopycanopy/b-ber-theme-serif",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "A serif theme for b-ber projects",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "Triple Canopy <b-ber@canopycanopycanopy.com> (https://triplecanopy.github.io/)",
|
|
@@ -16,8 +16,6 @@
|
|
|
16
16
|
"access": "public"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
20
|
-
"clean": "echo OK",
|
|
21
19
|
"sass": "sass",
|
|
22
20
|
"watch:sass": "sass --watch application.scss application.css",
|
|
23
21
|
"build:sass": "sass application.scss application.css"
|
|
@@ -29,5 +27,5 @@
|
|
|
29
27
|
"devDependencies": {
|
|
30
28
|
"sass": "^1.49.8"
|
|
31
29
|
},
|
|
32
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "435b9c7e6b97d3fbdeb21f2308283597040ebfc8"
|
|
33
31
|
}
|
package/.eslintrc.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = { extends: '../../.eslintrc.js' }
|