@improv/css v0.10.1
@improv/css
Tiny CSS string parsing utilities.
Try it on codesandbox.io.
Getting Started
import { useStyle } from "@improv/react";
import { css } from "@improv/css";
export function MyComponent(): JSX.Element {
const className = useStyle(css`
color: black;
:hover {
text-decoration: underline;
}
`);
return <div className={className}>Hello, world!</div>;
}
API
Tagged Templates
css
- Returns a style object parsed from the template style text, which can be passed to any Improv style function (e.g.
useStyle()
). - If you are using VSCode, you can enable highlighting and linting by installing the
vscode-styled-components
plugin.
- Returns a style object parsed from the template style text, which can be passed to any Improv style function (e.g.
Utilities
getStyle(styleText)
- Returns a style object parsed from raw Improv (SCSS-like) style text, which can be passed to any Improv style function (e.g.
useStyle()
).
- Returns a style object parsed from raw Improv (SCSS-like) style text, which can be passed to any Improv style function (e.g.
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago