-
Notifications
You must be signed in to change notification settings - Fork 22.5k
/
index.md
53 lines (35 loc) · 1.21 KB
/
index.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
---
title: scroll-margin-left
slug: Web/CSS/scroll-margin-left
page-type: css-property
browser-compat: css.properties.scroll-margin-left
---
{{CSSRef}}
The `scroll-margin-left` property defines the left margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets.
{{EmbedInteractiveExample("pages/css/scroll-margin-left.html")}}
## Syntax
```css
/* <length> values */
scroll-margin-left: 10px;
scroll-margin-left: 1em;
/* Global values */
scroll-margin-left: inherit;
scroll-margin-left: initial;
scroll-margin-left: revert;
scroll-margin-left: revert-layer;
scroll-margin-left: unset;
```
### Values
- {{CSSXref("<length>")}}
- : An outset from the left edge of the scroll container.
## Formal definition
{{cssinfo}}
## Formal syntax
{{csssyntax}}
## Specifications
{{Specifications}}
## Browser compatibility
{{Compat}}
## See also
- [CSS scroll snap](/en-US/docs/Web/CSS/CSS_scroll_snap)
- [Well-controlled scrolling with CSS scroll snap](https://web.dev/articles/css-scroll-snap)