Skip to content

@gtkx/css / injectGlobal

Function: injectGlobal()

injectGlobal(...args): void

Defined in: css.ts:155

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

tsx
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