With a CSS Class we can change the color of a single text for it to stand out. In this article, we will change the function of the Italic button to change the color of a single text.
Changing a text color using CSS
1. Open Site Editor
2. On the left panel, click on Styling
3. Under Local Site Styles, click on the Edit button beside Edit Site CSS
4. Copy and paste the CSS code below:
/* All text tagged as italic turn to this color */
.italic-to-color em {
color: #EF5B5B!important;
font-style: normal!important;
}
5. In this example, we have set the color to #EF5B5B. This value can be changed to your preferred color.
6. Click on Save, then Done
7. Click on the tile of the text where you want to apply the CSS Class
8. On the left panel, under CSS Class, input "italic-to-color"
β
β
7. Highlight the text you want to change color
8. Click on Italic on the box that will pop up after you highlight the text
9. Notice that the color of the text will change depending on the value set using the Custom CSS
β
β