Skip to content

attach hono-css's global scope from hono/css with global #1926

Closed
@sor4chi

Description

What is the feature you are proposing?

I think it would be useful to have an API to inject directly from #hono/css to the root scope of #hono-css.

like this:

import { css, global } from 'hono/css'

const hogeCss = css`
  color: red;
`

global`
  body {
    background-color: red;
  }

  @media (min-width: 768px) {
    ${hogeCss} {
      color: blue;
    }
  }
`

Although it may be difficult from a security perspective, this would allow for more expressive CSS design.

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions