common front-end assets for /dev/hack services
Renovate Bot 5db17d4ffe
All checks were successful
Check / check (pull_request) Successful in 2m43s
Check / check (push) Successful in 2m5s
Build and Deploy / build-docker (push) Successful in 2m15s
Build and Deploy / deploy (push) Successful in 4s
Update https://code.forgejo.org/actions/checkout action to v5
2025-09-02 11:03:48 +00:00
.forgejo/workflows Update https://code.forgejo.org/actions/checkout action to v5 2025-09-02 11:03:48 +00:00
examples Deprecate use of #wrapper, fix body height 2025-06-07 22:09:06 -07:00
static/berkeley-mono Add initial global styling 2025-06-06 22:20:50 -07:00
styles Officiate canonical table gap 2025-06-08 02:18:48 -07:00
.editorconfig Add examples to dist output 2025-06-07 01:31:38 -07:00
.gitignore Add Docker image with Caddy 2025-06-07 15:40:28 -07:00
.prettierignore Add development tools and build pipeline 2025-06-06 22:21:07 -07:00
Caddyfile Add Docker image with Caddy 2025-06-07 15:40:28 -07:00
compose.yaml Add Compose for the non-Nix people 2025-06-10 21:37:26 -07:00
flake.lock Add development tools and build pipeline 2025-06-06 22:21:07 -07:00
flake.nix Make flake check more robust 2025-06-10 21:47:01 -07:00
Justfile Add just watch for development 2025-06-10 21:13:00 -07:00
LICENSE Initial commit 2025-06-06 17:07:56 -04:00
README.md Fix Markdown mistake 2025-06-10 21:39:01 -07:00
renovate.json Add renovate.json 2025-06-06 22:00:07 +00:00

assets.devhack.net

common front-end assets for /dev/hack services

Build Rules

  • static is copied verbatim into dist.
  • styles are compiled using Dart SASS and bundled into dist/styles.css.
    • styles/_styles.css is the entrypoint stylesheet.
    • No absolute paths, please!

Development

Use of the Nix shell is strongly recommended. Otherwise, you will need prettier, lightningcss and just installed.

To generate the dist directory, run:

just
just build # is the same as `just`

Then, you can open the examples/demo.html file in your browser to see the result.

Watching for Changes

The development environment comes with a small inotifywait script that will automatically rebuild on file changes. To use it, run:

just watch

Developing with Docker/Podman Compose

If you don't have Nix installed but do have Docker or Podman, you can use the existing compose.yaml to launch the file watcher above:

docker-compose up # or
podman-compose up

CSS Layers

This project makes extensive use of CSS layers to manage styles. All styles provided by this project must be in the devhack layer. This ensures that styles can be overridden by other projects without needing to use !important.

If you're finding that your styles are being overridden, make sure that you put them in their own (ideally anonymous) layer like this:

@layer devhack;

@layer {
  /* Your styles here */
}

For more information, see MDN Docs: @layer Description.