Skip to content

Commit addd1a6

Browse files
committed
docs: fix headers in readme
1 parent e5e6972 commit addd1a6

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Scrolling SVG elements are supported, as well as Shadow DOM elements. The [Visua
2222
- [boundary](#boundary)
2323
- [skipOverflowHiddenElements](#skipoverflowhiddenelements)
2424

25-
## Install
25+
# Install
2626

2727
```bash
2828
npm i compute-scroll-into-view
@@ -36,7 +36,7 @@ const { default: compute } = await import(
3636
)
3737
```
3838

39-
## Usage
39+
# Usage
4040

4141
```js
4242
import compute from 'compute-scroll-into-view'
@@ -66,28 +66,28 @@ actions.forEach(({ el, top, left }) => {
6666
})
6767
```
6868

69-
## API
69+
# API
7070

71-
### compute(target, options)
71+
## compute(target, options)
7272

73-
### options
73+
## options
7474

7575
Type: `Object`
7676

77-
#### [block](https://scroll-into-view.dev/#scroll-alignment)
77+
### [block](https://scroll-into-view.dev/#scroll-alignment)
7878

7979
Type: `'start' | 'center' | 'end' | 'nearest'`<br> Default: `'center'`
8080

8181
Control the logical scroll position on the y-axis. The spec states that the `block` direction is related to the [writing-mode](https://developer.mozilla.org/en-US/docs/Web/CSS/writing-mode), but this is not implemented yet in this library.
8282
This means that `block: 'start'` aligns to the top edge and `block: 'end'` to the bottom.
8383

84-
#### [inline](https://scroll-into-view.dev/#scroll-alignment)
84+
### [inline](https://scroll-into-view.dev/#scroll-alignment)
8585

8686
Type: `'start' | 'center' | 'end' | 'nearest'`<br> Default: `'nearest'`
8787

8888
Like `block` this is affected by the [writing-mode](https://developer.mozilla.org/en-US/docs/Web/CSS/writing-mode). In left-to-right pages `inline: 'start'` will align to the left edge. In right-to-left it should be flipped. This will be supported in a future release.
8989

90-
#### [scrollMode](https://scroll-into-view.dev/#scrolling-if-needed)
90+
### [scrollMode](https://scroll-into-view.dev/#scrolling-if-needed)
9191

9292
Type: `'always' | 'if-needed'`<br> Default: `'always'`
9393

@@ -96,7 +96,7 @@ This is a proposed addition to the spec that you can track here: https://github.
9696
This library will be updated to reflect any changes to the spec and will provide a migration path.
9797
To be backwards compatible with `Element.scrollIntoViewIfNeeded` if something is not 100% visible it will count as "needs scrolling". If you need a different visibility ratio your best option would be to implement an [Intersection Observer](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API).
9898

99-
#### [boundary](https://scroll-into-view.dev/#limit-propagation)
99+
### [boundary](https://scroll-into-view.dev/#limit-propagation)
100100

101101
Type: `Element | Function`
102102

@@ -122,7 +122,7 @@ const actions = compute(target, {
122122
})
123123
```
124124

125-
#### skipOverflowHiddenElements
125+
### skipOverflowHiddenElements
126126

127127
Type: `Boolean`<br> Default: `false`
128128

0 commit comments

Comments
 (0)