Open CloudPower97 opened 6 years ago
Also, to support <picture>
element on the CSS side, you should consider patching /sass/components/_carousel.scss
from (starting from line 46):
.carousel-item {
visibility: hidden;
width: $carousel-item-width;
height: $carousel-item-height;
position: absolute;
top: 0;
left: 0;
& > img {
width: 100%;
}
}
to:
.carousel-item {
visibility: hidden;
width: $carousel-item-width;
height: $carousel-item-height;
position: absolute;
top: 0;
left: 0;
& > img`,
& > picture > img {
width: 100%;
}
}
Hello, I've seen that the current slider implementation just looks for the
src
property of theimg
element.This is NOT ideal, as, for example, one can't use a
picture
HTML elementInstead, consider using this:
This little change make it possible to use a
picture
element, but doesn't expect it to be there, since everyimg
element has acurrentSrc
property, wheter apicture
element is present or not. So this doesn't force you to update any existingHTML
code if this change will ever be accepted.I already have a branch on my local machine, if you want I can create a PR for this issue.
Hopefully we'll be able to use a
picture
element soon with all of its benefit.Anyway thanks for your work, I just love
materialize.css
Keep up the good work!