How can I replace the text from the screenshot with any other svg icon (any) using only CSS?
Much appreciated!
How can I replace the text from the screenshot with any other svg icon (any) using only CSS?
Much appreciated!
Youāll need to first upload your SVG file in the Uploads section. For the SCSS variable name, do something short and succint.
Then, add this bit to the Common tab:
th.posts.sortable.num.topic-list-data {
content: url($name-of-variable);
}
Note that you should not put quotes inside of the url parentheses.
Don made a helper tool for using icons in CSS:
Iām sorry, I donāt get it. What do you mean with $name-of-variable? Iām trying to add a SVG code after content:
, and itās not working.
Much appreciated @CocoQuark, but Iām not looking into installing more components in order to change the word ārepliesā with an SVG code.
The variable name is the one you entered when you uploaded the SVG file.
You will need to be an Admin to do this.
/admin
on the forum.name-of-variable
with the name you chose in Step 4. Keep the $
before the variable name.Thank you so much, Itās very clear now.
Quick question: If I have letās say 10 icons, do I need to upload the icons one by one?
Yes, I believe you do.
@Radu In the event my guide doesnāt work, you can follow this guide, where I believe you can just upload 1 file for multiple icons:
This was a great post and it helped me to replace the default icons. One more thing if I mayā¦
In the following, how can I put a FontAwsome icon inside content
?
th.topic-list-data.posts.num > span {
visibility: hidden;
}
th.topic-list-data.posts.num > span:after {
content:'a FontAwesome Icon here';
visibility: visible;
display: inline-block;
padding-bottom: 1.2em;
}
You can download it as a SVG and then do the same thing. Otherwise, youāll have to make a component, which will be more complex.
So there is no way of doing something like this?
content:'fa d-icon d-icon-reply';
If not, how would the code look like for the following method? I just need an example from where to start, because I tried basic css and there is no effect.
Kindly appreciated!
No, but you can use the same method as you did with previous methods. Upload it, then add it as an SVG file you followed using the guide;
Iām not too sure where you want to place the icon. Could you send a screenshot?
Thanks.
It doesnāt matter where, I just want to place a FA icon inside the line content:'...'
I think I will go with the FA as a font family and Unicodes inside the content
method.
You could do this:
Iām not 100% sure if this works, but Iām quite sure it does.