@compiled/react
Version:
A familiar and performant compile time CSS-in-JS library for React.
38 lines (37 loc) • 1.04 kB
TypeScript
import type { Bucket, StyleSheetOpts } from './types';
/**
* Ordered style buckets using their short pseudo name.
*
* This is very bare-bones, with no support for nesting, like styles in
* `@media` queries, pseudo-selectors mixed with shorthand properties, etc.
*
* If changes are needed to the pseudo-selectors, make sure that it aligns with the
* definition in `packages/css/src/utils/style-ordering.ts`.
*/
export declare const styleBucketOrdering: Bucket[];
/**
* Gets the bucket depending on the sheet.
* This function makes assumptions as to the form of the input class name.
*
* Input:
*
* ```
* "._a1234567:hover{ color: red; }"
* ```
*
* Output:
*
* ```
* "h"
* ```
*
* @param sheet styles for which we are getting the bucket
*/
export declare const getStyleBucketName: (sheet: string) => Bucket;
/**
* Used to move styles to the head of the application during runtime.
*
* @param css string
* @param opts StyleSheetOpts
*/
export default function insertRule(css: string, opts: StyleSheetOpts): void;