0

I have this line of code:

<i aria-hidden="true" class="tb-icon tb-icon-account"></i>

The change i want to make is exatly this:

<span aria-hidden="true" class="tb-icon tb-icon-account"></span>

The hard part (if there is a way) is that i want the browser to see the change as it is, but take all the css rule of an <i> tag. I dont want to change the css file so i was wondering if can point somehow to the css rule like it was before the change.

pfoutzop
  • 65
  • 11
  • 3
    You can not make any rules that use the `i` element selector, match a `span` instead. You would need to go through all your rules, find the ones that apply based on an `i` selector, and modify or clone them, with the `i` replaced with `span` ... that _could_ be done using JavaScript, but it will get complex - and quite frankly, based on your description so far I can't even see what purpose this was actually supposed to serve. – CBroe May 09 '22 at 14:09
  • @CBroe But you can actually do just that: https://stackoverflow.com/questions/2952667/find-all-css-rules-that-apply-to-an-element – mplungjan May 09 '22 at 14:11
  • Not with HTML editing only – mplungjan May 09 '22 at 14:18
  • Using the `i` tag for icons is way cooler, though. Which IDE do you use? Basically all of them help you with refactoring your code nowadays. – Peter Krebs May 09 '22 at 14:29

0 Answers0