By adding an element with the double icon (according to the theme) instead of rendering only the correct icon, the incorrect one is also rendered by putting an extra space
To Reproduce
Steps to reproduce the behavior:
Go to Codesandbox
Click on + icon
See extra space cause by icon
Expected behavior
I would expect the icon to not take up any space
Found problem:
In the actually <i> visible there is a rule in css :
.list .item-media i + i, .list .item-media i + img {
margin-left: var(--f7-list-item-media-icons-margin);
}
I don’t agree, I’m always of the opinion that the more detailed the documentation, the less time you waste doing things.
I take the opportunity to ask you, when an actionSheet is opened that has an icon can this method be used and above all why is this step not automatic in your opinion?
using f7 correctly, there is no need for that func (among other).
we don’t manipulate dom directly anymore, we (also) usually do it wrong.
let vdom handle your dom by simply calling $update().
i that specific case you don’t really need to removeThemeElements,
there is no css rule .actions-button-media i + i.
you can avoid all of this by using actions-routableModal
I will create a snippet for you so you can correct me if i am wrong.
I don’t think there is a valid reason to have two icons attached, the icon theoretically serves to make the user understand what that button/action is for without using text.
And the main problem of the double icon is on the MD/not-MD icon itself
This can work with something easy like list, but for example using a list with accordion it’s impossible to use update. I will use removeThemeElements to fix this (thanks for now )