New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correctly handle dark icons in data-icon
and data-icon-disabled
#6880
Conversation
/cc @leofeyer - Should we change this to 5.3 then as 5.2.9 has already been released? |
Yes please. |
Would it not be much shorter if we just added the following in line 210? foreach (array('data-icon', 'data-icon-disabled') as $icon)
{
if (isset($darkAttributes[$icon]))
{
$pathinfo = pathinfo($darkAttributes[$icon]);
$darkAttributes[$icon] = $pathinfo['filename'] . '--dark.' . $pathinfo['extension'];
}
} contao/core-bundle/contao/library/Contao/Image.php Lines 207 to 209 in e2ea04c
|
leofeyer |
Guess after trying out multiple approaches, I didn't see this. That works as well @leofeyer, you are right. |
data-icon
and data-icon-disabled
data-icon
and data-icon-disabled
Thank you @zoglo. |
Fixes #6869
Description
I extract the incoming data-attributes and properly distribute them for the two states now, this has been missing before.
Attributes get merged again but I remove the data-icons from the HtmlAttributes before doing so.
Edit