Skip to the content

Kyuubuキューブ

Turn CSS 3D cubes by touch, keys or notation, reproduce a scramble from a seed, and follow a solve one named step at a time.

Kyuubu (キューブ) is the Japanese spelling of cube. About the name

Contents

Reference · Cuboid player

CUBOID_PLAYER_CSSconstant

The player's stylesheet, put in the page once: the cube player's, under the same class names and custom properties.

Import it

import { CUBOID_PLAYER_CSS } from "@johnmorrisdotca/kyuubu/cuboid/play";

Definition

const CUBOID_PLAYER_CSS: "\n.kyuubu-cuboid-player{display:grid;gap:.5rem;font:inherit;color:inherit;max-width:100%}\n.kyuubu-cuboid-player-stage{aspect-ratio:1;width:100%;position:relative;background:var(--kyuubu-player-felt,transparent);border-radius:var(--kyuubu-player-radius,12px);touch-action:none}\n.kyuubu-cuboid-player-row{display:flex;flex-wrap:wrap;gap:.375rem;align-items:center}\n.kyuubu-cuboid-player button{touch-action:manipulation;font:inherit;color:inherit;min-height:44px;min-width:44px;padding:0 .75rem;border-radius:999px;border:1px solid var(--kyuubu-player-rule,color-mix(in srgb,currentColor 28%,transparent));background:var(--kyuubu-player-button,transparent);cursor:pointer}\n.kyuubu-cuboid-player button[aria-pressed=\"true\"],.kyuubu-cuboid-player button[data-main]{background:var(--kyuubu-player-ink,currentColor);border-color:var(--kyuubu-player-ink,currentColor)}\n.kyuubu-cuboid-player button[aria-pressed=\"true\"]>span,.kyuubu-cuboid-player button[data-main]>span{color:var(--kyuubu-player-paper,Canvas)}\n.kyuubu-cuboid-player button:focus-visible,.kyuubu-cuboid-player input:focus-visible{outline:2px solid var(--kyuubu-player-focus,Highlight);outline-offset:2px}\n.kyuubu-cuboid-player input[type=range]{flex:1 1 8rem;min-height:44px;accent-color:var(--kyuubu-player-ink,currentColor)}\n.kyuubu-cuboid-player-at{font-variant-numeric:tabular-nums;font-size:.875em;opacity:.8;margin-inline-start:auto}\n.kyuubu-cuboid-player-note{font-size:.8125em;opacity:.75;margin:0}\n.kyuubu-cuboid-player-note[data-tone=\"bad\"]{opacity:1;font-weight:600}\n.kyuubu-cuboid-player-readout{display:flex;align-items:center;gap:.75rem;min-height:3.75rem}\n.kyuubu-cuboid-player-code{flex:none;box-sizing:border-box;min-width:4.6ch;padding:.35rem .5rem;border-radius:12px;border:2px solid var(--kyuubu-player-ink,currentColor);font:700 2.25rem/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-variant-ligatures:none;text-align:center}\n.kyuubu-cuboid-player-says{display:grid;gap:.125rem;min-width:0;font-weight:600}\n.kyuubu-cuboid-player-says small{min-height:1.25em;font-size:.8125rem;font-weight:400;opacity:.8}\n.kyuubu-cuboid-player-live{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}\n"

Examples

import { CUBOID_PLAYER_CSS } from "@johnmorrisdotca/kyuubu/cuboid/play";

console.log(CUBOID_PLAYER_CSS.includes("."));
true

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/kyuubu 1.14.1.