Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48979

Change color of radio button selected text

$
0
0

How can I change the color of ionic label text when the radio button is checked? This is what I am trying to do but I don’t know how to translate it to ionic CSS:

image

ion-label input[type="radio"]:checked {

  color:red !important;  

}

I want both the box and the words “Rigid Frame 20"” to turn red when it is checked.

Here is the HTML code:

          <ion-radio-group mode= 'ios' value='chairs' @ionChange='changeColor'>
            <ion-item v-for='chair in chairs' v-bind:key='chair.name' lines='none'>
              <ion-label v-if="chair.type == 'AUWR'" style="color:#CACACC;  line-height: 24px; font-size: 16px; letter-spacing: -0.25px;">{{chair.name}} <span>{{showMetric ? inchesToMetric(chair.size) + 'cm' : chair.size + '"'}}</span></ion-label>
              <ion-label v-if="chair.type == 'OWR'" style="color:#CACACC;  line-height: 24px; font-size: 16px; letter-spacing: -0.25px;">{{chair.name}}</ion-label>
              <ion-radio slot='start' v-model='chair.name' @click='onClickRadio(chair.size)' style='width:23px;height:23px;border-radius:4px;border:3px solid #D3D7D9;'></ion-radio>
            </ion-item>
          </ion-radio-group>

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 48979

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>