Documentation
¶
Overview ¶
Package css holds the nechat stylesheet and its theme overrides. Hosts use it through nekit.ChatTheme.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FaceKey ¶
FaceKey returns a short hash identifying the overrides in dark and light, or "" when neither sets a usable colour.
Types ¶
type Layout ¶
type Layout struct {
// Side is the page edge the chat sits at; the zero value is the right edge.
Side Side
// Width is the floating window's width; default 25rem.
Width string
// Height is the floating window's height; default 40rem.
Height string
// DockWidth is the docked panel's width, which the page makes room for; default 28rem.
DockWidth string
}
type Theme ¶
type Theme struct {
// AppBg is the widget background.
AppBg string
// AppBorder is the colour of borders and dividers; hover backgrounds derive from it.
AppBorder string
// AppInk is the main text colour.
AppInk string
// AppInkQuiet is the colour of secondary text, form accents and focus rings.
AppInkQuiet string
// PanelBg is the background of the composer, popovers, form fields and message bubbles.
PanelBg string
// PanelBorderFocus is the border of input fields, the composer, checkboxes and radio buttons,
// hovered and pressed buttons, and focused surfaces.
PanelBorderFocus string
// ButtonBorder is the border of buttons and the background of pressed buttons and controls.
ButtonBorder string
// ButtonInk is the text and icon colour of buttons.
ButtonInk string
// ButtonInkOff is the text and icon colour of disabled buttons.
ButtonInkOff string
// SecondaryBg is the background of secondary buttons, the context gauge and attached files.
SecondaryBg string
// DangerInk is the text colour of destructive actions and errors.
DangerInk string
// DangerBgHover is the fill of a hovered destructive button.
DangerBgHover string
// DangerBgActive is the fill of a pressed destructive button.
DangerBgActive string
// DangerInkOnFill is the text colour on a danger fill.
DangerInkOnFill string
// LauncherBg is the fill of the round button that opens a collapsed chat; it defaults to AppInk.
LauncherBg string
// LauncherInk is the icon colour of the round button that opens a collapsed chat; it defaults to AppBg.
LauncherInk string
}
Theme overrides colours of one face of the nechat palette. Each field takes any CSS colour value, such as "#18181b" or "var(--my-bg)"; an empty field keeps the default, and a value containing any of {};< is ignored.
Click to show internal directories.
Click to hide internal directories.