---
url: /reference/@cssdoc/core/functions/ampStaysAtScope.md
---
# Function: ampStaysAtScope()

```ts
function ampStaysAtScope(branch): boolean;
```

Defined in: [packages/core/src/parse.ts:76](https://github.com/thedannywahl/cssdoc/blob/main/packages/core/src/parse.ts#L76)

Whether a single selector branch (no commas) keeps `&`/`:scope` meaning "the same scope root" one
nesting level deeper — true for `&`, `&.-mod`, `&::before`, `&:hover` (chained onto the same compound,
no combinator); false once a combinator introduces a new compound (`& > .part`, `.part &`, …), since
a rule nested inside THAT one would have `&` refer to the new compound, not the original scope root.

## Parameters

### branch

`string`

## Returns

`boolean`
