Skip to the content

Tenka天下

Play seeded world conquest for two to six, with dice battles, cards, computer players and saved games.

Tenka means the world under heaven in Japanese. About the name

Contents

Reference · Browser table and SVG

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/tenka/ui";

Definition

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

Parameters

NameTypeDescription
clothstring | null | undefined

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

Returns

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

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

Examples

import { clothVars } from "@johnmorrisdotca/tenka/ui";
console.log(clothVars("green"));
{
  '--tk-sea': '#2f5d4a',
  '--tk-link': '#f3efe4',
  '--tk-accent': '#2f5d4a',
  '--tk-accent-ink': '#f3efe4'
}

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/tenka 2.4.0.