Skip to content

Commit 4bc7e11

Browse files
committed
Docs.
1 parent cfe5e17 commit 4bc7e11

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.readme/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@ Brim solves all of the issues associated with determining the state of the UI an
2929

3030
## Setup
3131

32-
When page is loaded, Brim will create a **treadmill** element. Treadmill element is used to give user space to scroll. Presence of the treadmill element ensures that user can enter the viewport and viewport continues to persist if user reloads the page or changes device orientation. It is invisible to the user the entire time. This element has ID `brim-treadmill`.
33-
3432
You need to create two elements: mask and main. **Mask** is displayed to the user when page is in the full view. The role of the element is to instruct user to enter the minimal-ui. **Main** element is shown when mask is hidden.
3533

36-
* You have to have these elements as direct descendants of `<body>`.
34+
* These elements must be direct and sole descendants of `<body>`.
3735
* The IDs must be `brim-mask` and `brim-main`.
3836
* Do not apply [styling](#styling) that would affect the position or the dimensions of these elements.
3937

4038
## The Underlying Implementation
4139

40+
When page is loaded, Brim will create a **treadmill** element. Treadmill element is used to give user space to scroll. Presence of the treadmill element ensures that user can enter the viewport and viewport continues to persist if user reloads the page or changes device orientation. It is invisible to the user the entire time. This element has ID `brim-treadmill`.
41+
4242
Upon loading the page or after changing the orientation, Brim is using [Scream](https://github.com/gajus/scream) (developed as part of this project) to detect if page is in the minimal-ui view (page that has been previously in minimal-ui and has been reloaded will remain in the minimal-ui if content height is greater than the viewport height).
4343

4444
For documentation purposes it is worth noting that you cannot use Scream to detect if device is in minimal-ui straight after the [orientationchange](https://developer.mozilla.org/en-US/docs/Web/Events/orientationchange) event because `window` dimensions do not reflect the new orientation until the rotation animation has ended. You have to attach a listener to the [orientationchangeend](https://github.com/gajus/orientationchangeend) (developed as part of this project) event.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,16 @@ Brim solves all of the issues associated with determining the state of the UI an
4242

4343
## Setup
4444

45-
When page is loaded, Brim will create a **treadmill** element. Treadmill element is used to give user space to scroll. Presence of the treadmill element ensures that user can enter the viewport and viewport continues to persist if user reloads the page or changes device orientation. It is invisible to the user the entire time. This element has ID `brim-treadmill`.
46-
4745
You need to create two elements: mask and main. **Mask** is displayed to the user when page is in the full view. The role of the element is to instruct user to enter the minimal-ui. **Main** element is shown when mask is hidden.
4846

49-
* You have to have these elements as direct descendants of `<body>`.
47+
* These elements must be direct and sole descendants of `<body>`.
5048
* The IDs must be `brim-mask` and `brim-main`.
5149
* Do not apply [styling](#styling) that would affect the position or the dimensions of these elements.
5250

5351
## The Underlying Implementation
5452

53+
When page is loaded, Brim will create a **treadmill** element. Treadmill element is used to give user space to scroll. Presence of the treadmill element ensures that user can enter the viewport and viewport continues to persist if user reloads the page or changes device orientation. It is invisible to the user the entire time. This element has ID `brim-treadmill`.
54+
5555
Upon loading the page or after changing the orientation, Brim is using [Scream](https://github.com/gajus/scream) (developed as part of this project) to detect if page is in the minimal-ui view (page that has been previously in minimal-ui and has been reloaded will remain in the minimal-ui if content height is greater than the viewport height).
5656

5757
For documentation purposes it is worth noting that you cannot use Scream to detect if device is in minimal-ui straight after the [orientationchange](https://developer.mozilla.org/en-US/docs/Web/Events/orientationchange) event because `window` dimensions do not reflect the new orientation until the rotation animation has ended. You have to attach a listener to the [orientationchangeend](https://github.com/gajus/orientationchangeend) (developed as part of this project) event.

0 commit comments

Comments
 (0)