PHP Classes

File: theme/theme.schema.json

Recommend this page to a friend!
  Packages of Boss Ibrahim Mussa   Caelrik   theme/theme.schema.json   Download  
File: theme/theme.schema.json
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Caelrik
Build Web user interface from PHP components
Author: By
Last change:
Date: 8 days ago
Size: 3,082 bytes
 

 

Contents

Class file image Download
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://github.com/kivudesign/caelrik/theme/theme.schema.json", "title": "Caelrik UI theme", "description": "Design tokens of a Caelrik theme on Bootstrap. Theme::toCss() (PHP), the ThemeBuilder and bin/caelrik-theme turn it into a stylesheet loaded after caelrik.css.", "type": "object", "required": ["name", "light", "dark"], "additionalProperties": false, "properties": { "name": { "description": "Display name, e.g. \"Acme\".", "type": "string", "minLength": 1, "maxLength": 60, "pattern": "^[\\p{L}\\p{N} ._-]+$" }, "base": { "description": "Deprecated: written by themes made before 0.2.0, when Material and Tailwind looks existed. Bootstrap is the only look; omit it.", "const": "bootstrap" }, "light": { "$ref": "#/$defs/palette" }, "dark": { "$ref": "#/$defs/palette" }, "radius": { "description": "Corner radius of fields, cards, the grid and the calendar, in rem.", "type": "number", "minimum": 0, "maximum": 2 }, "fontFamily": { "description": "A CSS font stack of family names and generic families. Omit it to keep Bootstrap's font.", "type": "string", "maxLength": 200, "pattern": "^[A-Za-z0-9 ,'\"-]+$" }, "shadow": { "description": "How containers (grid, chart, calendar, file manager) stand out from the page.", "enum": ["none", "subtle", "elevated", "outlined"] } }, "$defs": { "color": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" }, "palette": { "description": "Colors of one mode (data-bs-theme=\"light\" or \"dark\"). Text pairs need 4.5:1, field borders 3:1 (WCAG 1.4.3, 1.4.11).", "type": "object", "required": ["primary", "primaryHover", "onPrimary", "bodyBg", "bodyColor", "muted", "surface", "border", "inputBorder", "danger"], "additionalProperties": false, "properties": { "primary": { "$ref": "#/$defs/color", "description": "Buttons, links, active tabs, the current page, calendar events." }, "primaryHover": { "$ref": "#/$defs/color", "description": "Hovered and pressed buttons, hovered links." }, "onPrimary": { "$ref": "#/$defs/color", "description": "Text and icons on the primary color." }, "bodyBg": { "$ref": "#/$defs/color", "description": "Page background." }, "bodyColor": { "$ref": "#/$defs/color", "description": "Body text." }, "muted": { "$ref": "#/$defs/color", "description": "Secondary text: help texts, captions, placeholders." }, "surface": { "$ref": "#/$defs/color", "description": "Raised areas: grid header, upload area, toolbars." }, "border": { "$ref": "#/$defs/color", "description": "Dividers and decorative borders." }, "inputBorder": { "$ref": "#/$defs/color", "description": "Borders of form fields, which identify them (3:1)." }, "danger": { "$ref": "#/$defs/color", "description": "Error messages and invalid fields." } } } } }