Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable ion-button shadow in ionic 4?

Tags:

ionic4

I can't set the box-shadow property of ion-button to none in ionic 4, so how can I do that for a single button and for all the buttons at once ?

like image 293
Tariq Saeed Avatar asked Dec 05 '18 14:12

Tariq Saeed


2 Answers

I found a way that worked for me, the below code disables the ion-button shadow:

ion-button{ --box-shadow:none; }

like image 184
Tariq Saeed Avatar answered Nov 18 '22 12:11

Tariq Saeed


 <ion-button  class="main-button"  >Get Started</ion-button>


    .main-button{
    --box-shadow:none;
 }

CSS Custom Properties

--box-shadow

--background

--color

There is whole list of CSS Custom Properties in this link https://ionicframework.com/docs/api/button

like image 45
Tahseen Quraishi Avatar answered Nov 18 '22 12:11

Tahseen Quraishi