<div class='type'>Compose Modifier</div>

<a id='references'></a>


<h2 id="paddingfrombaseline-top-bottom">paddingFromBaseline</h2>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun Modifier.paddingFromBaseline(top: Dp = Dp.Unspecified, bottom: Dp = Dp.Unspecified) =
    this.then(
            if (top.isSpecified) {
                Modifier.paddingFrom(FirstBaseline, before = top)
            } else {
                Modifier
            }
        )
        .then(
            if (bottom.isSpecified) {
                Modifier.paddingFrom(LastBaseline, after = bottom)
            } else {
                Modifier
            }
        )
```


A `Modifier` that positions the content in a layout such that the distance from the top of the
layout to the `baseline of the first line of text in the content` is `top`, and
the distance from the `baseline of the last line of text in the content` to the
bottom of the layout is `bottom`.

When the modified layout is min height constrained and the padded layout is smaller than the
constraint, the modified layout will satisfy the min constraint and the content will be
positioned to satisfy the `top` requirement if specified, or the `bottom` requirement otherwise.





<hr class="docs-overload-divider">


<h2 id="paddingfrombaseline-top-bottom-2">paddingFromBaseline</h2>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun Modifier.paddingFromBaseline(
    top: TextUnit = TextUnit.Unspecified,
    bottom: TextUnit = TextUnit.Unspecified,
) =
    this.then(
            if (!top.isUnspecified) Modifier.paddingFrom(FirstBaseline, before = top) else Modifier
        )
        .then(
            if (!bottom.isUnspecified) Modifier.paddingFrom(LastBaseline, after = bottom)
            else Modifier
        )
```


A `Modifier` that positions the content in a layout such that the distance from the top of the
layout to the `baseline of the first line of text in the content` is `top`, and
the distance from the `baseline of the last line of text in the content` to the
bottom of the layout is `bottom`.

When the modified layout is min height constrained and the padded layout is smaller than the
constraint, the modified layout will satisfy the min constraint and the content will be
positioned to satisfy the `top` requirement if specified, or the `bottom` requirement otherwise.