# \[Ionic 4\] Style ion-button line-height in shadow DOM

**URL:** <https://forum.ionicframework.com/t/ionic-4-style-ion-button-line-height-in-shadow-dom/174254>\
**Category:** ionic-v3\
**Created:** [September 26, 2019, 2:23pm UTC](https://forum.ionicframework.com/t/ionic-4-style-ion-button-line-height-in-shadow-dom/174254 "2019-09-26T14:23:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jacky-gds](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jacky-gds/32/131930_2.png) [@jacky-gds](https://forum.ionicframework.com/u/jacky-gds)\
**Post date:** [September 26, 2019, 2:23pm UTC](https://forum.ionicframework.com/t/ionic-4-style-ion-button-line-height-in-shadow-dom/174254/1 "2019-09-26T14:23:50Z")

</div>

Hi there,  
i’m trying to modify the line-height property of an element.

The fact is that it’s impossible for me to access that property on the ion-button shadow content.

```auto
      <ion-button class="my-button">
        <ion-ripple-effect></ion-ripple-effect>
        Hello
      </ion-button>

  ion-button{
    font-size: 15px;
    line-height: 20px !important;
    --line-height: 20px !important;

    &::slotted(*) {
      line-height: 20px !important;
    }

  }

```

![30](https://global.discourse-cdn.com/ionicframework/original/3X/6/3/63850c93072b3da0c0a3737fdd157684f2993100.png)

None of the specified properties has work.

May anybody help?

Thanks,  
Cheers

---

<div class="post-metadata">

**Author:** ![Dovel](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/dovel/32/127722_2.png) [@Dovel](https://forum.ionicframework.com/u/Dovel)\
**Post date:** [September 26, 2019, 3:47pm UTC](https://forum.ionicframework.com/t/ionic-4-style-ion-button-line-height-in-shadow-dom/174254/2 "2019-09-26T15:47:23Z")

</div>

Try this:

```css
ion-button {
  --height: 100px;
}

```

But I recommend to use the official way like `size="large"` attribute. And the `ripple` effect is automatically added when you use click or href.

See docs: [https://ionicframework.com/docs/api/button](https://ionicframework.com/docs/api/button)

btw. you selected the tag `ionic-v3` but your title and content is about “Ionic 4”.

---

<div class="post-metadata">

**Author:** ![jacky-gds](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jacky-gds/32/131930_2.png) [@jacky-gds](https://forum.ionicframework.com/u/jacky-gds)\
**Post date:** [September 26, 2019, 5:12pm UTC](https://forum.ionicframework.com/t/ionic-4-style-ion-button-line-height-in-shadow-dom/174254/3 "2019-09-26T17:12:33Z")

</div>

Ok thank my issue is on **multiple line ion button with css** , I created a class to allow ionic buttons to follow the new lines of a text or the button to accept text on multiple lines, by the following class:

```auto
  &.allowMultipleLines {
    text-overflow: inherit;
    white-space: inherit;
    height: auto;
    --padding-top: 12px;
    --padding-bottom: 12px;
    --padding-left: 10px;
    --padding-right: 10px;
    margin-bottom: 18px !important;
    margin-top: 18px !important;
  }

```

In this case I can’t really modify the line height of the button due to the shadow DOM. Does anyone knows how to style that by its slot or similar?

Thanks again

Ah ok, thanks, has the tag already being introduced? I didnt found it on the top of the tag select, and found so many topic on v4 tagged with ionic/ionic-v3 that I assumed it was the standard and selected that. In case I would make more attention.

---

<div class="post-metadata">

**Author:** ![Dovel](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/dovel/32/127722_2.png) [@Dovel](https://forum.ionicframework.com/u/Dovel)\
**Post date:** [September 27, 2019, 8:28am UTC](https://forum.ionicframework.com/t/ionic-4-style-ion-button-line-height-in-shadow-dom/174254/4 "2019-09-27T08:28:08Z")

</div>

Multi Line buttons in Ionic is really a challenge. In Ionic v3 created a multiline button with a icon on the top. It was a lot of “hack”. In Ionic 4 the button does not work anymore. And I stopped the debugging on it for time reasons.

You could create your own component with the same styles like Ionic and the ion ripple tag.

PS: Ionic v4 ist just “Ionic”. (Info in the description of a category.) 🙂

---

<div class="post-metadata">

**Author:** ![SatyaVaishnav](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@SatyaVaishnav](https://forum.ionicframework.com/u/SatyaVaishnav)\
**Post date:** [October 10, 2020, 4:42am UTC](https://forum.ionicframework.com/t/ionic-4-style-ion-button-line-height-in-shadow-dom/174254/5 "2020-10-10T04:42:19Z")

</div>

Try This

```auto
<ion-button expand="block" fill="outline" class="add-line-height" >A Mental Health<br> Professional <br> 1 (800) 667-8888</ion-button>

```

ion-button.add-line-height{  
\*{  
line-height: 1.5;  
}  
}

 ![ion-button-;ine-height](https://global.discourse-cdn.com/ionicframework/original/3X/2/0/207bed0bf98bfb33861564d2cb6382c317bc8ccf.png)
