From e9fd43d79062ab55fe046257effb2bff34a111da Mon Sep 17 00:00:00 2001 From: ksa Date: Tue, 11 Oct 2016 16:46:53 +0200 Subject: [PATCH] Document ReactModal__Body--open so people dare to use it --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 12af9257..e3fffcf2 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,17 @@ This doesn't affect styling as no styles are applied to this element by default. The default styles above are available on `Modal.defaultStyles`. Changes to this object will apply to all instances of the modal. +### Body class +When the modal is opened a `ReactModal__Body--open` class is added to the `body` tag. +You can use this to remove scrolling on the the body while the modal is open. + +```CSS +/* Remove scroll on the body when react-modal is open */ +.ReactModal__Body--open { + overflow: hidden; +} +``` + ## Examples Inside an app: