File tree 1 file changed +24
-0
lines changed
rules/req-source-width-height
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change
1
+ # htmlacademy/req-source-width-height
2
+
3
+ Правило требует наличие атрибутов ` width ` и ` height ` у ` <source> ` , находящихся внутри ` <piture> ` .
4
+
5
+ ## true
6
+ Если включён, ` <source> ` без атрибутов ` width ` и ` height ` считаются проблемой.
7
+
8
+
9
+ Проблемными считаются следующие шаблоны:
10
+ ``` html
11
+ <picture >
12
+ <source srcset =" images/image-tablet.jpg" media =" (min-width: 768px)" >
13
+ <img src =" images/image-mobile.jpg" width =" 320" height =" 148" alt =" " >
14
+ </picture >
15
+ ```
16
+
17
+ Следующие шаблоны ** не** считаются проблемами:
18
+
19
+ ``` html
20
+ <picture >
21
+ <source srcset =" images/image-tablet.jpg" width =" 768" height =" 480" media =" (min-width: 768px)" >
22
+ <img src =" images/image-mobile.jpg" width =" 320" height =" 148" alt =" " >
23
+ </picture >
24
+ ```
You can’t perform that action at this time.
0 commit comments