uikit / uikit

A lightweight and modular front-end framework for developing fast and powerful web interfaces

Home Page:http://getuikit.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Background image - Error: Attribute sizes not allowed on element div at this point.

chriswthomson opened this issue · comments

When using data-srcset for a background image, the docs state that sizes should be used without the data- prefix. This fails HTML validation: https://validator.w3.org/nu/?doc=https%3A%2F%2Fgetuikit.com%2Fdocs%2Fimage#vnuId22

Is there a reason why 'data-sizes' cannot also be used? Would it not just be a case of adding 'data-sizes' to srcProps?

const srcProps = ['data-src', 'data-srcset', 'sizes'];

You can already use data-sizes attribute, the data() function reads both, a sizes and a data-sizes attribute.

Lovely thanks