# SDKInitOptions.styleNonce

Part of [Initialization](https://kernstra.com/docs/web-sdk/config/init) in the Kernstra Web SDK 1.0.0 configuration reference.

- Type: `string`
- Page: https://kernstra.com/docs/web-sdk/config/init/stylenonce

The page's CSP nonce, carried by every stylesheet the SDK injects — the print frame's included. A `style-src` without `'unsafe-inline'` refuses every `<style>` the SDK adds unless it carries the page's nonce; pass that nonce once. When `styleNonce` is not given, the SDK reads the nonce a page declares for its tooling as `<meta property="csp-nonce" nonce="…">`, the convention Vite and others follow. With a nonce in force the Google Fonts link ([`tools.sign.webFonts`](https://kernstra.com/docs/web-sdk/config/tools/sign-webfonts)) carries it too, so `style-src` needs no Google origin. The SDK styles its elements through the CSSOM, never with `style="…"` markup, so `style-src-attr` needs nothing.

A value that is not base64 or base64url is refused with `INVALID_ARGUMENT`. A policy that enforces Trusted Types (`require-trusted-types-for 'script'`) is not supported in 1.0. See [Installation and support](https://kernstra.com/docs/web-sdk/guides/installation) for the full policy.

```ts
await Kernstra.init({
  license: import.meta.env.KERNSTRA_LICENSE,
  styleNonce: nonceFromYourServer,
});
```

Web page: https://kernstra.com/docs/web-sdk/config/init/stylenonce
