Skip to the content

Kazu数

Generate checked Sudoku and logic puzzles, read native rules and hints, and draw or embed playable boards.

Kazu is the Japanese word 数 for number. About the name

Contents

Reference · Heyawake rules

HEYAWAKE_PLAY_STYLEconstant

Scoped native Heyawake board and player CSS.

Import it

import { HEYAWAKE_PLAY_STYLE } from "@johnmorrisdotca/kazu/heyawake";

Also exported from: @johnmorrisdotca/kazu

Definition

const HEYAWAKE_PLAY_STYLE: "\n.kh-root{max-width:40rem;margin:auto;font:inherit;color:inherit}.kh-board{position:relative;max-width:min(92vw,36rem);margin:0 auto}.kh-board svg{display:block}.kh-grid{position:absolute;inset:0;display:grid;touch-action:manipulation}.kh-cell{position:relative;aspect-ratio:1;border:0;background:transparent;color:inherit;font:inherit;padding:0;cursor:pointer}.kh-cell:focus-visible{outline:3px solid var(--kz-select,#ffd45b);outline-offset:-3px;z-index:1}.kh-cell[aria-pressed=true]{font-weight:700}.kh-tools{display:flex;flex-wrap:wrap;justify-content:center;gap:.5rem;margin:.9rem 0}.kh-tools button{min-height:2.75rem;padding:.45rem .8rem;border:1px solid currentColor;border-radius:.5rem;background:transparent;color:inherit;font:inherit}.kh-status,.kh-help{text-align:center;min-height:1.5em}.kh-errors{color:var(--kz-bad,#b5452c)}" = `
.kh-root{max-width:40rem;margin:auto;font:inherit;color:inherit}.kh-board{position:relative;max-width:min(92vw,36rem);margin:0 auto}.kh-board svg{display:block}.kh-grid{position:absolute;inset:0;display:grid;touch-action:manipulation}.kh-cell{position:relative;aspect-ratio:1;border:0;background:transparent;color:inherit;font:inherit;padding:0;cursor:pointer}.kh-cell:focus-visible{outline:3px solid var(--kz-select,#ffd45b);outline-offset:-3px;z-index:1}.kh-cell[aria-pressed=true]{font-weight:700}.kh-tools{display:flex;flex-wrap:wrap;justify-content:center;gap:.5rem;margin:.9rem 0}.kh-tools button{min-height:2.75rem;padding:.45rem .8rem;border:1px solid currentColor;border-radius:.5rem;background:transparent;color:inherit;font:inherit}.kh-status,.kh-help{text-align:center;min-height:1.5em}.kh-errors{color:var(--kz-bad,#b5452c)}`

Examples

import { HEYAWAKE_PLAY_STYLE } from "@johnmorrisdotca/kazu/heyawake";

console.log(HEYAWAKE_PLAY_STYLE.length);
838

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/kazu 2.1.0.