/Wiki/sources/honojs__hono/2026/https-hono-dev-llms-full-txt-global-styles-8b827225fae1-global-styles-s0697-c0000.md
Global styles - hono-docs
Global styles Source evidence: /Sources/raw/honojs hono/honojs hono.md Canonical citation: https://hono.dev/llms full.txt global styles Summary A pseudo sele...
Global styles
Source evidence: /Sources/raw/honojshono/honojshono.md Canonical citation: https://hono.dev/llms-full.txt#global-styles
Summary
A pseudo-selector called :-hono-global allows you to define global styles. tsx const globalClass = css` :-hono-global { html { font-family: Arial, Helvetica, sans-serif; } } ` return c.render( Hello! Today is a good day. ) Or yo...
Content
A pseudo-selector called :-hono-global allows you to define global styles.
const globalClass = css`
:-hono-global {
html {
font-family: Arial, Helvetica, sans-serif;
}
}
`
return c.render(
<div class={globalClass}>
<h1>Hello!</h1>
<p>Today is a good day.</p>
</div>
)Or you can write CSS in the <Style /> component with the css literal.
export const renderer = jsxRenderer(({ children, title }) => {
return (
<html>
<head>
<Style>{css`
html {
font-family: Arial, Helvetica, sans-serif;
}
`}</Style>
<title>{title}</title>
</head>
<body>
<div>{children}</div>
</body>
</html>
)
})