# NestedStyleConsumerStyleScope

Artifact: [androidx.compose.foundation:foundation](https://developer.android.com/jetpack/androidx/releases/compose-foundation) [View Source](https://cs.android.com/search?q=file:androidx/compose/foundation/style/NestedStyles.kt+class:androidx.compose.foundation.style.NestedStyleConsumerStyleScope) Added in [1.13.0-rc01](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.13.0-rc01) Common/All
- Cmn

  ```
  @ExperimentalFoundationStyleApi
  interface NestedStyleConsumerStyleScope
  ```
Known direct subclasses [CommonStyleScope](https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/CommonStyleScope)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/CommonStyleScope` | A `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/CommonStyleScope` is the scope used by a `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/CommonStyle`. |

*** ** * ** ***

A scope that allows applying a style defined in a parent style.

## Summary

| ### Public functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/NestedStyleConsumerStyleScope#applyNestedStyle(androidx.compose.foundation.style.NestedStyleKey)(key: https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/NestedStyleKey)` Applies a style with the given `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/NestedStyleConsumerStyleScope#applyNestedStyle(androidx.compose.foundation.style.NestedStyleKey)` defined in a parent style. | Cmn |

## Public functions

### applyNestedStyle

Cmn Added in [1.13.0-rc01](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.13.0-rc01)

```
fun applyNestedStyle(key: NestedStyleKey): Unit
```

Applies a style with the given `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/NestedStyleConsumerStyleScope#applyNestedStyle(androidx.compose.foundation.style.NestedStyleKey)` defined in a parent style. If no style is provided by the parent for the given `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/NestedStyleConsumerStyleScope#applyNestedStyle(androidx.compose.foundation.style.NestedStyleKey)`, calling this is equivalent to an empty style.

| Parameters |
|---|---|
| `key: https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/NestedStyleKey` | the key used to look up the style to apply |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/style/NestedStyleProviderStyleScope#provideNestedStyle(androidx.compose.foundation.style.NestedStyleKey,androidx.compose.foundation.style.CommonStyle)` |   |