A familiar and performant compile time CSS-in-JS library for React.
APACHE-2.0 License
Bot releases are visible (Hide)
Published by atlas-dst-bot 10 months ago
Published by atlas-dst-bot 10 months ago
css
function calls not being extracted when using classic JSX pragma syntax and @babel/preset-react
is turned on. Now, when the classic JSX pragma syntax is used for Compiled and @babel/preset-react
is turned on (assuming @babel/preset-react
runs before @compiled/babel-plugin-strip-runtime
), the JSX pragma and the jsx
import will be completely removed in the output./** @jsx jsx */
with Emotion no longer worked; this is now fixed.babel-plugin-transform-react-jsx
) directly to @compiled/utils/^\s*\*?\s*@jsx\s+([^\s]+)\s*$/m
instead of /@jsx (\w+)/
; the former is used in babel-plugin-transform-react-jsx
Published by atlas-dst-bot 10 months ago
css
function calls not being extracted when using classic JSX pragma syntax and @babel/preset-react
is turned on. Now, when the classic JSX pragma syntax is used for Compiled and @babel/preset-react
is turned on (assuming @babel/preset-react
runs before @compiled/babel-plugin-strip-runtime
), the JSX pragma and the jsx
import will be completely removed in the output./** @jsx jsx */
with Emotion no longer worked; this is now fixed.babel-plugin-transform-react-jsx
) directly to @compiled/utils/^\s*\*?\s*@jsx\s+([^\s]+)\s*$/m
instead of /@jsx (\w+)/
; the former is used in babel-plugin-transform-react-jsx
Published by atlas-dst-bot 10 months ago
Published by atlas-dst-bot 10 months ago
css
function calls not being extracted when using classic JSX pragma syntax and @babel/preset-react
is turned on. Now, when the classic JSX pragma syntax is used for Compiled and @babel/preset-react
is turned on (assuming @babel/preset-react
runs before @compiled/babel-plugin-strip-runtime
), the JSX pragma and the jsx
import will be completely removed in the output./** @jsx jsx */
with Emotion no longer worked; this is now fixed.babel-plugin-transform-react-jsx
) directly to @compiled/utils/^\s*\*?\s*@jsx\s+([^\s]+)\s*$/m
instead of /@jsx (\w+)/
; the former is used in babel-plugin-transform-react-jsx
Published by atlas-dst-bot 10 months ago
Published by atlas-dst-bot 10 months ago
Published by atlas-dst-bot 11 months ago
Published by atlas-dst-bot 11 months ago
Published by atlas-dst-bot 11 months ago
cssMap
input objects to avoid invalid css and other mistakes.Published by atlas-dst-bot 11 months ago
Published by atlas-dst-bot 11 months ago
Published by atlas-dst-bot 11 months ago
Published by atlas-dst-bot 11 months ago
Published by atlas-dst-bot 11 months ago
Published by atlas-dst-bot 11 months ago
Published by atlas-dst-bot 11 months ago
Published by atlas-dst-bot 11 months ago
Published by atlas-dst-bot 11 months ago
9857009f: Introduce new API createStrictAPI
which returns a strict subset of Compiled APIs augmented by a type definition.
This API does not change Compileds build time behavior — merely augmenting
the returned API types which enforce:
To set up:
import { createStrictAPI } from '@compiled/react';
// ./foo.ts
const { css, cssMap, XCSSProp, cx } = createStrictAPI<{
color: 'var(--ds-text)';
'&:hover': { color: 'var(--ds-text-hover)' };
}>();
// Expose APIs you want to support.
export { css, cssMap, XCSSProp, cx };
// .compiledcssrc
{
+ "importSources": ["./foo.ts"]
}
import { css } from './foo';
const styles = css({ color: 'var(--ds-text)' });
<div css={styles} />;
Published by atlas-dst-bot 11 months ago
9857009f: Introduce new API createStrictAPI
which returns a strict subset of Compiled APIs augmented by a type definition.
This API does not change Compileds build time behavior — merely augmenting
the returned API types which enforce:
To set up:
import { createStrictAPI } from '@compiled/react';
// ./foo.ts
const { css, cssMap, XCSSProp, cx } = createStrictAPI<{
color: 'var(--ds-text)';
'&:hover': { color: 'var(--ds-text-hover)' };
}>();
// Expose APIs you want to support.
export { css, cssMap, XCSSProp, cx };
// .compiledcssrc
{
+ "importSources": ["./foo.ts"]
}
import { css } from './foo';
const styles = css({ color: 'var(--ds-text)' });
<div css={styles} />;