Sha256: a96f213cebd340550ad334823f01a435477ff4617e808d78db0f71ecfb2db5ab
Contents?: true
Size: 524 Bytes
Versions: 3
Compression:
Stored size: 524 Bytes
Contents
# frozen_string_literal: true module ThemeCheck class DeprecateBgsizes < HtmlCheck severity :suggestion category :html, :performance doc docs_url(__FILE__) def on_div(node) class_list = node.attributes["class"]&.value&.split(" ") add_offense("Use the native loading=\"lazy\" attribute instead of lazysizes", node: node) if class_list&.include?("lazyload") add_offense("Use the CSS imageset attribute instead of data-bgset", node: node) if node.attributes["data-bgset"] end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
theme-check-1.2.0 | lib/theme_check/checks/deprecate_bgsizes.rb |
theme-check-1.1.0 | lib/theme_check/checks/deprecate_bgsizes.rb |
theme-check-1.0.0 | lib/theme_check/checks/deprecate_bgsizes.rb |