Skip to the content

Kumimoji組み文字

Build crosswords from seeded English or Japanese tile bags, alone or at a shared table.

Kumimoji means assembled characters in Japanese. About the name

Contents

Reference · Browser table

clothVarsfunction

A cloth as CSS variables; nothing for a name that is not a cloth, so the defaults stay.

Import it

import { clothVars } from "@johnmorrisdotca/kumimoji/ui";

Definition

function clothVars(cloth: string | undefined | null): Record<`--km-${string}`, string>

Parameters

NameTypeDescription
clothstring | null | undefined

A built-in cloth name; an unknown name leaves the defaults.

Returns

Record<`--km-${string}`, string>

The CSS variables to set on the element, or an empty object.

Examples

import { clothVars } from "@johnmorrisdotca/kumimoji/ui";
console.log(clothVars("green"));
{
  '--km-felt': '#2f5d4a',
  '--km-accent': '#2f5d4a',
  '--km-accent-ink': '#f3efe4'
}

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/kumimoji 1.6.0.