Tips Editor toolbar button icon styling

Compatible XF 2.x versions
  1. 2.x
This simple guide will explain how to style the editor toolbar button icons.

The use of the browser inspector (F12 -> Elements) will be necessary to identify the id and data names ... or good guesswork.

If we check the code for the standard toolbar we see this in the browser inspector:
Screenshot_68.png

From that we can determine that the first three buttons have the following attributes:

Buttonid namedata-cmd name
Remove formattingclearFormatting-1clearFormatting
Boldbold-1bold
Italicitalic-1italic

We can use the id names and data-cmd names to target the buttons for styling purposes.

Buttons
To style a button using the data-cmd name use this:
Less:
[data-cmd="clearFormatting"]
{
    color: orange !important;
}
To style it using the id name use this:
Less:
#clearFormatting-1
{
    color: orange;
}
 

Similar threads

October 2024

Total amount
$160.50
Goal
$400.00
Donation ends:

Staff online

Forum statistics

Threads
10,651
Messages
28,709
Members
48,020
Latest member
lazersate
Top