From 30825fe98684a564f763508ab65cab53c2e8e93e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Burzy=C5=84ski?= Date: Sat, 8 Aug 2020 00:58:00 +0200 Subject: [PATCH] Small docs tweaks after changes related to Stylis v4 work (#1949) --- docs/cache-provider.mdx | 5 ++++- packages/cache/README.md | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/cache-provider.mdx b/docs/cache-provider.mdx index 7fa05e9612..81340018a7 100644 --- a/docs/cache-provider.mdx +++ b/docs/cache-provider.mdx @@ -9,11 +9,14 @@ It can be useful to customize emotion's options - i.e. to add custom Stylis plug /** @jsx jsx */ import { CacheProvider, jsx, css } from '@emotion/react' import createCache from '@emotion/cache' +import { prefixer } from 'stylis' const myCache = createCache({ key: 'my-prefix-key', stylisPlugins: [ - /* your plugins here */ + customPlugin, + // has to be included manually when customizing `stylisPlugins` if you want to have vendor prefixes added automatically + prefixer ], }) diff --git a/packages/cache/README.md b/packages/cache/README.md index dfdaa7b933..2e051ebec7 100644 --- a/packages/cache/README.md +++ b/packages/cache/README.md @@ -41,7 +41,7 @@ A Stylis plugins that will be run by Stylis during preprocessing. [Read the Styl > Note: > -> Prefixer is just a plugin which happens to be put in default `stylisPlugins`. If you plan to use custom `stylisPlugins` and you want to have your styles prefixed automatically you must include prefixer in your custom `stylisPlugins`. +> Prefixer is just a plugin which happens to be put in default `stylisPlugins`. If you plan to use custom `stylisPlugins` and you want to have your styles prefixed automatically you must include prefixer in your custom `stylisPlugins`. You can import `prefixer` from the `stylis` module to do that (`import { prefixer } from 'stylis'`); ### `key`