From 104b719dec0c0ddac37b515f584edfd6bcf93043 Mon Sep 17 00:00:00 2001 From: Vinh Date: Mon, 1 Jun 2020 20:12:21 +0200 Subject: [PATCH] docs: bodyClassName (#2970) --- docs/source/02-04-css.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/source/02-04-css.md b/docs/source/02-04-css.md index 190364029..0a1f2bc57 100644 --- a/docs/source/02-04-css.md +++ b/docs/source/02-04-css.md @@ -10,3 +10,21 @@ If you would like to change the styling of any elements of the comment embed, we The easiest way to find the classname for the element you're looking for is to use the web inspector, and then update your stylesheet accordingly. You can also navigate to https://github.com/coralproject/talk/blob/master/src/core/client/stream/classes.ts to see available stable class names. + +### Custom body class for theming + +You can set the class name of the `` tag inside the embed by using the `bodyClassName` parameter when calling `Coral.createStreamEmbed`: + +```js + Coral.createStreamEmbed({ + bodyClassName: "pink", + }); +``` + +This will allow your styles to include variations: + +```css + .pink button.coral { + background: pink; + } +```