function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jake BullardJake Bullard 

CSS font size not applying to lightning:radioGroup????

Hey guys, 

I have another weird one. I'm trying to change the font size of a lightning:radioGroup. So I created a class, and added the class to my Radio Group. It picks the change to "bold" but the font size doesn't change. Instead the spacing between the buttons change. What am I missing? 

SN: Went I apply this class to a paragraph element it works as intended. it only doesn't work on the lightning:radioGroup. 


Comp

<aura:component access="global" implements="lightning:availableForFlowScreens">
    <aura:attribute name="UploadFiles" type="Boolean" default="false"/>
    <aura:attribute name="Encoded_ID" type="String" />
    <aura:attribute name="radioOptions" type="List" default="[
      {'label': 'Yes' , 'value': 'true'},
      {'label': 'No', 'value': 'false'} ]"/>
                <div class="test"><p>This is top level Paragraph elements</p></div>
			<lightning:radioGroup class="test" aura:id="UploadFiles" 
                        name="UploadFiles" 
                        label="Click here to upload any logos, pictures, or other files you would 
                        like incorporated in your design:" 
			options="{! v.radioOptions }" value="{! v.UploadFiles }" />

                <div class="slds-p-top_small"></div>
            

                
            <!-- If customer clicks yes to upload files show the file upload iframe. -->
            <aura:if isTrue="{! v.UploadFiles }" >      
            	<iframe src="{!'/TVA_CFB__RequestFile?'+v.Encoded_ID}" height="325px" 
                width="325px" frameborder="0" class="slds-p-bottom_small"/>                                                                                                                             
            </aura:if>
</aura:component>
 

CSS class

.THIS.test{
font-size:20pt;
font-weight: bold;
}

 

Result with CCS applied

User-added image

Best Answer chosen by Jake Bullard
sfdcMonkey.comsfdcMonkey.com
hi Jake,
 i have a solution for this, 

use following css to change radiobox label CSS :
.THIS.test  .slds-form-element__label{
font-size:20pt;
font-weight: bold;
}
use following css to change field main lable :
.THIS.test  .slds-form-element__legend{
  font-size:12pt;
}
output : 
User-added image

Thanks, let us know if it helps you and mark it best answer if it helps you so it make proper solution for others 


 

All Answers

sfdcMonkey.comsfdcMonkey.com
hi Jake,
 i have a solution for this, 

use following css to change radiobox label CSS :
.THIS.test  .slds-form-element__label{
font-size:20pt;
font-weight: bold;
}
use following css to change field main lable :
.THIS.test  .slds-form-element__legend{
  font-size:12pt;
}
output : 
User-added image

Thanks, let us know if it helps you and mark it best answer if it helps you so it make proper solution for others 


 
This was selected as the best answer
Jake BullardJake Bullard
You are awesome thank you!