Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: emotion-js/emotion
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: @emotion/babel-preset-css-prop@11.11.0
Choose a base ref
...
head repository: emotion-js/emotion
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d57cfcb6daf48fc5458f91b4db2e072fbc2863e4
Choose a head ref

Commits on May 23, 2021

  1. Removed Flow (and its tooling) from the source code (#2385)

    * Removed Flow
    
    * Update packages/jest/src/utils.js
    
    Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
    
    * Update packages/react/src/theming.js
    
    Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
    
    * Update site/src/utils/markdown-styles.js
    
    Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
    
    * Fix markdown-styles.js
    
    * Title.js
    
    * One more formatting, and a FlowFixMe removal
    
    * Updated a few snapshots, and yarn.lock
    
    Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
    Josh Goldberg and Andarist authored May 23, 2021
    Copy the full SHA
    1d6cde5 View commit details

Commits on May 24, 2021

  1. Merge branch 'main' into ts-migration

    # Conflicts:
    #	.prettierrc.yaml
    #	flow-typed/npm/jest-glamor-react_vx.x.x.js
    #	flow-typed/npm/jest_v25.x.x.js
    #	packages/babel-plugin/src/emotion-macro.js
    #	packages/babel-plugin/src/index.js
    #	packages/css/src/create-instance.js
    #	packages/jest/src/create-serializer.js
    #	packages/react/src/class-names.js
    #	packages/react/src/context.js
    #	packages/react/src/global.js
    #	packages/react/src/jsx.js
    #	packages/serialize/src/index.js
    #	packages/server/src/create-instance/construct-style-tags-from-chunks.js
    #	packages/server/src/create-instance/extract-critical-to-chunks.js
    #	packages/server/src/create-instance/index.js
    #	packages/server/src/create-instance/inline.js
    #	packages/server/src/create-instance/stream.js
    #	packages/styled/src/base.js
    #	packages/weak-memoize/src/index.js
    #	test/testSetup.js
    Andarist committed May 24, 2021
    Copy the full SHA
    73073f3 View commit details

Commits on Jun 25, 2021

  1. Add TypeScript tooling and configs (#2360)

    * Add typescript-eslint and base tsconfig.json
    
    * Create/move tsconfig.json files and extend from root
    
    * Add "site" and "test" to root tsconfig include
    
    * Add @babel/preset-typescript
    
    * Add tsconfig.json for site
    
    * Add "playgrounds" to root tsconfig include
    
    * Add typescript-eslint as eslint plugin
    
    * Remove standard
    
    * Add eslint files override for ts,tsx
    
    * Add eslint import and react plugins
    
    * Remove eslint-plugin-import and related rules
    
    * Add extend for @typescript-extend/eslint-recommended
    
    * Restore **/types/tsconfig.json files
    
    * Remove typescript-eslint resolutions
    
    * Move parserOptions to ts overrides
    
    * Enable skipDefaultLibCheck
    
    * Exclude types tests from root tsconfig
    
    * Add tsconfig content for jsx-pragmatic
    
    * Update eslint prettier parser and add auto-fixes
    
    * Remove per-package tsconfig.json files
    with-heart authored Jun 25, 2021
    Copy the full SHA
    4912b82 View commit details

Commits on Aug 14, 2021

  1. Migrate @emotion/memoize to TypeScript (#2427)

    * [memoize] Migrate to TypeScript
    
    * Add changeset
    
    * Move tsconfig.json for types tests back
    
    * Fix dtslint setup in @emotion/memoize
    
    * Add TS files to Jest transform setting
    
    * Update .changeset/hip-moons-play.md
    
    Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
    sarayourfriend and Andarist authored Aug 14, 2021
    Copy the full SHA
    7f8db2d View commit details
  2. Migrate @emotion/weak-memoize to TypeScript (#2429)

    * [weak-memoize] Convert to TypeScript
    
    * Add changeset
    
    * tweak a bunch of stuff
    
    Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
    sarayourfriend and Andarist authored Aug 14, 2021
    Copy the full SHA
    b1d16b0 View commit details
  3. Copy the full SHA
    3119b05 View commit details
  4. Migrate @emotion/unitless to TypeScript (#2430)

    * [unitless] Convert to TypeScript
    
    * Add changeset
    
    * tweak some minor things
    
    Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
    sarayourfriend and Andarist authored Aug 14, 2021
    Copy the full SHA
    fc4d27c View commit details
  5. Migrate @emotion/is-prop-valid to TypeScript (#2432)

    * [is-prop-valid] Convert to TypeScript
    
    * Add changeset
    
    * tweak some minor things
    
    Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
    sarayourfriend and Andarist authored Aug 14, 2021
    Copy the full SHA
    a1e881b View commit details
  6. Migrate @emotion/sheet to TypeScript (#2431)

    * [sheet] Convert to TypeScript
    
    * Add changeset
    
    * Make _insertTag private
    
    * tweak some minor things
    
    * add more type tests for constructing StyleSheet
    
    * add changeset
    
    Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
    sarayourfriend and Andarist authored Aug 14, 2021
    Copy the full SHA
    52aadc6 View commit details

Commits on Aug 15, 2021

  1. Migrate @emotion/utils to TypeScript (#2359)

    * feat(ts-utils): Initial migration of utils
    
    * Small tweaks
    
    * More small tweaks
    
    Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
    rjdestigter and Andarist authored Aug 15, 2021
    Copy the full SHA
    16d8a8c View commit details
  2. Copy the full SHA
    ea2c397 View commit details
  3. Use import type when importing StyleSheet from @emotion/sheet i…

    …n `@emotion/utils`
    Andarist committed Aug 15, 2021
    Copy the full SHA
    e3a4919 View commit details

Commits on Nov 14, 2021

  1. Merge branch 'main' of https://github.com/emotion-js/emotion into ts-…

    …migration
    
    Conflicts:
    	packages/cache/__tests__/index.js
    	packages/jest/src/matchers.js
    	packages/react/src/context.js
    	packages/react/src/global.js
    	packages/react/src/index.js
    	packages/react/src/theming.js
    	packages/sheet/__tests__/index.js
    	packages/sheet/src/index.ts
    	packages/sheet/types/index.d.ts
    srmagura committed Nov 14, 2021
    Copy the full SHA
    d48d7f6 View commit details
  2. Copy the full SHA
    ce3bccb View commit details
  3. Merge branch 'main' of https://github.com/emotion-js/emotion into ts-…

    …migration
    
    Conflicts:
    	packages/jest/src/create-enzyme-serializer.js
    	packages/jest/src/create-serializer.js
    	packages/jest/src/utils.js
    	packages/react/src/class-names.js
    	packages/react/src/emotion-element.js
    	scripts/benchmarks/src/impl.js
    srmagura committed Nov 14, 2021
    Copy the full SHA
    30f982c View commit details
  4. Copy the full SHA
    e0cb8ab View commit details
  5. Copy the full SHA
    fb0d461 View commit details
  6. Copy the full SHA
    908703b View commit details

Commits on Nov 19, 2021

  1. Merge pull request #2546 from srmagura/ts-migration

    Merge main into ts-migration
    emmatown authored Nov 19, 2021
    Copy the full SHA
    7d56dbf View commit details
  2. Copy the full SHA
    f3ef8cb View commit details

Commits on Nov 20, 2021

  1. Copy the full SHA
    da3f244 View commit details

Commits on Nov 23, 2021

  1. Copy the full SHA
    85772c3 View commit details

Commits on Feb 19, 2022

  1. Merge branch 'main' of https://github.com/emotion-js/emotion into ts-…

    …migration-merge
    
    Conflicts:
    	.github/workflows/main.yml
    	jest.config.js
    	package.json
    	packages/css/test/instance/stream.test.js
    	packages/primitives/test/emotion-primitives.test.js
    	packages/react/__tests__/global-with-theme.js
    	packages/react/__tests__/global.js
    	packages/react/__tests__/rehydration.js
    	packages/react/src/class-names.js
    	packages/react/src/get-label-from-stack-trace.js
    	packages/react/src/global.js
    	packages/server/test/index.test.js
    	packages/server/test/inline.test.js
    	packages/server/test/stream.test.js
    	packages/server/test/util.js
    	packages/utils/types/index.d.ts
    	test/styleTransform.js
    	yarn.lock
    srmagura committed Feb 19, 2022
    Copy the full SHA
    c4bff2e View commit details

Commits on Mar 16, 2022

  1. Copy the full SHA
    0646268 View commit details

Commits on Mar 18, 2022

  1. Migrate @emotion/babel-plugin-jsx-pragmatic to TypeScript (#2570)

    * feat(babel-plugin-jsx-pragmatic): add changeset
    
    * feat(babel-plugin-jsx-pragmatic): convert to typescript
    
    * fix(babel-plugin-jsx-pragmatic): update babel core types
    
    * Update .changeset/wet-boxes-raise.md
    
    Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
    G-Rath and Andarist authored Mar 18, 2022
    Copy the full SHA
    ea84c40 View commit details
  2. Merge branch 'ts-migration' of https://github.com/emotion-js/emotion

    …into ts-migration-merge
    srmagura committed Mar 18, 2022
    Copy the full SHA
    5e46164 View commit details

Commits on Mar 19, 2022

  1. Copy the full SHA
    e959f38 View commit details

Commits on Apr 9, 2022

  1. Migrate babel-tester to TypeScript (#2688)

    * Migrate `babel-tester` to TypeScript
    
    * update yarn.lock
    Andarist authored Apr 9, 2022
    Copy the full SHA
    f99981b View commit details

Commits on Apr 11, 2022

  1. Migrate @emotion/eslint-plugin to TypeScript (#2568)

    * feat(eslint-plugin): add standard utils & dependencies for typescript
    
    * feat(eslint-plugin): convert `no-vanilla` to typescript
    
    * feat(eslint-plugin): convert `styled-import` to typescript
    
    * feat(eslint-plugin): convert `import-from-emotion` to typescript
    
    * feat(eslint-plugin): convert `syntax-preference` to typescript
    
    * feat(eslint-plugin): convert `pkg-renaming` to typescript
    
    * feat(eslint-plugin): convert `jsx-import` to typescript
    
    * feat(eslint-plugin): move index to typescript
    
    * feat(eslint-plugin): add changeset
    
    * fix(eslint-plugin): use `require` to get package version
    
    * fix(eslint-plugin): adjust rule description
    
    Co-authored-by: Sam Magura <srmagura@gmail.com>
    
    * fix(eslint-plugin): use `REPO_URL` constant everywhere
    
    * chore(eslint-plugin): add change sets for other bugs
    
    * nit
    
    * Tweak changeset
    
    * Report empty css attribute as invalid in syntax-preference rule
    
    * Tweak changesets
    
    Co-authored-by: Sam Magura <srmagura@gmail.com>
    Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
    3 people authored Apr 11, 2022
    Copy the full SHA
    304f7e3 View commit details

Commits on Apr 18, 2022

  1. Copy the full SHA
    3045a2f View commit details
  2. Copy the full SHA
    4c56bcb View commit details

Commits on Apr 19, 2022

  1. Fix some TS things (#2559)

    * Point to package root rather than src so that the declarations are used when published, not the src
    
    * Don't use as const for unitless
    
    * Make tsc pass
    
    * Add tsc to CI
    
    * Remove type aware linting
    
    * Remove ESLint from DTSLint CI job
    
    * Newline
    
    * Fix more things
    
    Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
    emmatown and Andarist authored Apr 19, 2022
    Copy the full SHA
    17fee4b View commit details
  2. Migrate @emotion/serialize to TypeScript (#2543)

    * [serialize]: Convert to Typescript
    
    * fix: Some tests
    
    * chore: Revert unrelated change
    
    * chore: Revert code behaviour changes
    
    * chore: Revert toString method addition
    
    * chore: Changeset
    
    * fix: Add missing return of ComponentSelector
    
    * fix: Export missing interfaces
    
    * small tweaks
    
    * fix stuff
    
    Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
    danilofuchs and Andarist authored Apr 19, 2022
    Copy the full SHA
    9ca22c6 View commit details

Commits on May 21, 2022

  1. Copy the full SHA
    a22d43b View commit details
  2. Merge pull request #2758 from srmagura/ts-merge2

    Merge `main` into `ts-migration`
    Andarist authored May 21, 2022
    Copy the full SHA
    8c4e2c3 View commit details
  3. Copy the full SHA
    f01f9bc View commit details

Commits on May 22, 2022

  1. Fix d.ts emit in @emotion/eslint-plugin (#2761)

    * Put TS hacks in @emotion/eslint-plugin to make Preconstruct not error
    
    * Fixed the declaration emit for `@emotion/eslint-plugin` without casts
    
    Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
    srmagura and Andarist authored May 22, 2022
    Copy the full SHA
    8ed0042 View commit details

Commits on Jul 10, 2022

  1. Copy the full SHA
    8c6ad60 View commit details
  2. Merge pull request #2816 from srmagura/ts-merge-0710

    Merge `main` into `ts-migration`
    srmagura authored Jul 10, 2022
    Copy the full SHA
    95726a9 View commit details

Commits on Jul 26, 2022

  1. Fixed dtslint tasks for @emotion/cache and @emotion/server (#2817)

    * Fix dtslint issues
    
    * Update @emotion/server tsconfig comment about DOM types
    
    * Remove redundant declarations
    
    * Fixed dtslint in `@emotion/cache`
    
    Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
    srmagura and Andarist authored Jul 26, 2022
    Copy the full SHA
    945169b View commit details

Commits on Jul 31, 2022

  1. Convert @emotion/primitives-core to TypeScript (#2818)

    * [wip] primitives-core TS migration
    
    * Finish converting primitives-core to TS
    
    * Update yarn.lock?
    
    * Implement @Andarist's feedback for primitives-core TS migration
    
    * Fix regression
    srmagura authored Jul 31, 2022
    Copy the full SHA
    8546dd0 View commit details

Commits on Aug 2, 2022

  1. 1
    Copy the full SHA
    62a513b View commit details

Commits on Aug 6, 2022

  1. Copy the full SHA
    5fedb73 View commit details
  2. Merge pull request #2846 from srmagura/ts-merge-0806

    Merge `main` into `ts-migration` (August 8th)
    srmagura authored Aug 6, 2022
    Copy the full SHA
    5cd2199 View commit details

Commits on Aug 16, 2022

  1. Move site outside of the main typecheck task (#2851)

    * Make tsc succeed for site
    
    * Change tsc-all to tsc:all
    
    * Update package.json
    
    Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
    srmagura and Andarist authored Aug 16, 2022
    Copy the full SHA
    62e49ad View commit details
  2. Copy the full SHA
    993557d View commit details

Commits on Jun 7, 2023

  1. Added ElementType to the Emotion's JSX namespace (#3048)

    * Support JSX.ElementType
    
    * Reexport ElementType
    
    * Remove failing test case due to type safe concerns
    
    see also: #3048 (comment)
    
    * Create wicked-boxes-lick.md
    
    ---------
    
    Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
    naari3 and Andarist authored Jun 7, 2023
    Copy the full SHA
    9357f33 View commit details
  2. Version Packages (#3051)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    github-actions[bot] and github-actions[bot] authored Jun 7, 2023
    Copy the full SHA
    fef1ea0 View commit details

Commits on Jun 16, 2023

  1. Fix @emotion/css/create-instance types in TypeScript module resolut…

    …ion modes that support the `exports` field (#3057)
    emmatown authored Jun 16, 2023
    Copy the full SHA
    8f66526 View commit details
  2. Version Packages (#3058)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    github-actions[bot] and github-actions[bot] authored Jun 16, 2023
    Copy the full SHA
    f3b268f View commit details
Showing 326 changed files with 6,094 additions and 5,146 deletions.
3 changes: 2 additions & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://unpkg.com/@changesets/config@1.6.0/schema.json",
"$schema": "https://unpkg.com/@changesets/config@3.0.2/schema.json",
"changelog": [
"@changesets/changelog-github",
{ "repo": "emotion-js/emotion" }
@@ -23,6 +23,7 @@
]
],
"access": "public",
"privatePackages": false,
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"onlyUpdatePeerDependentsWhenOutOfRange": true
}
6 changes: 1 addition & 5 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -4,8 +4,4 @@ coverage/
node_modules/
stylis.min.js
/demo/dist
flow-typed/

# This is to prevent ESLint parsing errors in the website which is written in
# TypeScript. TODO: Reenable once the codebase is converted to TypeScript.
/site/
/site/out
24 changes: 0 additions & 24 deletions .flowconfig

This file was deleted.

25 changes: 0 additions & 25 deletions .flowconfig-ci

This file was deleted.

9 changes: 5 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ on:
push:
branches:
- main
- ts-migration
pull_request:

permissions:
@@ -30,15 +31,15 @@ jobs:
uses: codecov/codecov-action@v1
if: ${{ matrix.platform == 'ubuntu-latest' && always() }}

flow:
name: Flow
typescript:
name: TypeScript
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/ci-setup

- name: Check Types
run: yarn flow:check
run: yarn tsc:all

test_react18:
name: Test React 18
@@ -70,7 +71,7 @@ jobs:
- name: ESLint
run: yarn lint:check

typescript:
dtslint:
name: dtslint
runs-on: ubuntu-latest
steps:
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -21,5 +21,5 @@ package-lock.json
!.yarn/versions

# Website
site/out
.next
/site/out
.next
3 changes: 0 additions & 3 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -6,6 +6,3 @@ overrides:
- files: 'docs/*.md'
options:
printWidth: 60
- files: '*.js'
options:
parser: flow
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git a/dist/lint.js b/dist/lint.js
index ae29f2a0936fe8e4dee9b4a607ed5c611872d30d..96746c55f2df24c6d09ee30ff85e404138ad0fbe 100644
--- a/dist/lint.js
+++ b/dist/lint.js
@@ -107,9 +107,9 @@ function startsWithDirectory(filePath, dirPath) {
return normalFilePath.startsWith(normalDirPath + "/") || normalFilePath.startsWith(normalDirPath + "\\");
}
function testNoTsIgnore(text) {
- const tsIgnore = "ts-ignore";
- const pos = text.indexOf(tsIgnore);
- return pos === -1 ? undefined : { pos, message: "'ts-ignore' is forbidden." };
+ // const tsIgnore = "ts-ignore";
+ // const pos = text.indexOf(tsIgnore);
+ // return pos === -1 ? undefined : { pos, message: "'ts-ignore' is forbidden." };
}
function testNoTslintDisables(text) {
const tslintDisable = "tslint:disable";
14 changes: 0 additions & 14 deletions .yarn/patches/jest-snapshot-npm-27.4.5-6ace6bf68e.patch

This file was deleted.

9 changes: 9 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Security policy

## Supported versions

The latest version of the project is currently supported with security updates.

## Reporting a vulnerability

You can report a vulnerability by contacting maintainers via email.
1 change: 0 additions & 1 deletion __mocks__/react-native.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// @flow
/* eslint-env jest */

let components = [
1 change: 0 additions & 1 deletion __mocks__/react-primitives.js
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
// @flow
export * from 'react-primitives/lib/index.web'
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ let isTestFile = filename =>
module.exports = api => {
api.cache(true)
return {
presets: ['babel-preset-emotion-dev'],
presets: ['babel-preset-emotion-dev', '@babel/preset-typescript'],
overrides: [
{
test: filename =>
16 changes: 8 additions & 8 deletions docs/best-practices.mdx
Original file line number Diff line number Diff line change
@@ -93,29 +93,29 @@ Advantages of sharing styles via component reuse include:

The css prop or `styled` should be used for static styles, while the `style` prop (inline styles) should be used for truly dynamic styles. By dynamic styles, we mean styles that change frequently or are unique to a single element.

Imagine you are displaying a list of user avatars in a forum application. Every avatar shares certain static CSS, like `width: 40px` and `border-radius: 50%`, but the avatar image is set via a `background-style` rule whose value is different for each avatar. If you pass all of this CSS through the CSS prop, you'll end up with a lot of nearly-duplicate CSS in the document. With 3 avatars, Emotion will create something like:
Imagine you are displaying a list of user avatars in a forum application. Every avatar shares certain static CSS, like `width: 40px` and `border-radius: 50%`, but the avatar image is set via a `background-image` rule whose value is different for each avatar. If you pass all of this CSS through the CSS prop, you'll end up with a lot of nearly-duplicate CSS in the document. With 3 avatars, Emotion will create something like:

```html
<style>
.css-1udhswa {
border-radius: 50%;
width: 40px;
height: 40px;
background-style: url(https://i.pravatar.cc/150?u=0);
background-image: url(https://i.pravatar.cc/150?u=0);
}
.css-1cpwmbr {
border-radius: 50%;
width: 40px;
height: 40px;
background-style: url(https://i.pravatar.cc/150?u=1);
background-image: url(https://i.pravatar.cc/150?u=1);
}
.css-am987o {
border-radius: 50%;
width: 40px;
height: 40px;
background-style: url(https://i.pravatar.cc/150?u=2);
background-image: url(https://i.pravatar.cc/150?u=2);
}
</style>
```
@@ -141,19 +141,19 @@ CSS variables can be used with the `style` prop to keep the CSS in a single plac
border-radius: 50%;
width: 40px;
height: 40px;
background-style: var(--background-style);
background-image: var(--background-image);
}
```

Then, for each avatar, you render an element which sets the value of the `--background-style` CSS variable:
Then, for each avatar, you render an element which sets the value of the `--background-image` CSS variable:

```tsx
function Avatar({ imageUrl }) {
return <div className="avatar" style={{ '--background-style': imageUrl }} />
return <div className="avatar" style={{ '--background-image': imageUrl }} />
}
```

If you're using TypeScript, you'll have to use a type assertion like `style={{ ['--background-style' as any]: imageUrl }}` as explained [here](https://stackoverflow.com/a/52013197/752601).
If you're using TypeScript, you'll have to use a type assertion like `style={{ ['--background-image' as any]: imageUrl }}` as explained [here](https://stackoverflow.com/a/52013197/752601).

### If using React, prefer `@emotion/react` or `@emotion/styled` over `@emotion/css`

8 changes: 4 additions & 4 deletions docs/css-prop.mdx
Original file line number Diff line number Diff line change
@@ -241,8 +241,8 @@ The styles are concatenated together and inserted via `insertRule`.

```css
.css-2 {
font-size: 14px,
font-family: Georgia, serif,
font-size: 14px;
font-family: Georgia, serif;
color: darkgray;
}
```
@@ -264,8 +264,8 @@ The styles are concatenated together and inserted via `insertRule`.
+ line-height: 1.5;
- font-family: 'sans-serif';
- color: black;
- font-size: 14px,
+ font-family: Georgia, serif,
- font-size: 14px;
+ font-family: Georgia, serif;
+ color: darkgray;
+ font-size: 10px;
}
1 change: 0 additions & 1 deletion docs/docs.yaml
Original file line number Diff line number Diff line change
@@ -32,7 +32,6 @@
- source-maps
- testing
- typescript
- flow
- eslint-plugin-react

# This loads the READMEs instead of files in docs/
115 changes: 0 additions & 115 deletions docs/flow.mdx

This file was deleted.

Loading