Skip to main content

Function: injectGlobal()

injectGlobal(...args): void

Defined in: css.ts:164

Injects global CSS styles without a wrapping class.

Use for application-wide styles, CSS variables, or styling native GTK widgets.

Parameters

ParameterTypeDescription
...argsCSSInterpolation[]CSS style definitions

Returns

void

Example

import { injectGlobal } from "@gtkx/css";

injectGlobal`
window {
background-color: @theme_bg_color;
}

.title-1 {
font-size: 24px;
font-weight: bold;
}
`;

See

css for scoped class-based styles