@_nu/html-validator
Advanced tools
+147
-1
@@ -1,1 +0,147 @@ | ||
| :root{--c-level1:#f00;--c-level2:#f90}head{display:block;max-height:200px;overflow:auto;font-size:0;line-height:0}html:not([lang]),html[lang=""]{display:block}html:not([lang]):not([data-hvi])::before,html[lang=""]:not([data-hvi])::before{margin:8px;background-color:var(--c-level1);color:#fff;padding:.5em;display:block;font-size:12px;line-height:16px;content:'<html> needs [lang="…"]'}style:empty,script:not([src]):empty,title:empty{display:block}style:empty:not([data-hvi])::before,script:not([src]):empty:not([data-hvi])::before,title:empty:not([data-hvi])::before{margin:8px;background-color:var(--c-level1);color:#fff;padding:.5em;display:block;font-size:12px;line-height:16px;content:'Those -moz-element should not be empty';content:'Those element should not be empty'}[style=""]:not([data-hvi]),[title=""]:not([data-hvi]),[id=""]:not([data-hvi]),[src=""]:not([data-hvi]),[href=""]:not([data-hvi]),[name=""]:not([data-hvi]),[for=""]:not([data-hvi]),[type=""]:not([data-hvi]),[width=""]:not([data-hvi]),[height=""]:not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:'Those props should not empty'}abbr:not([title]):not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:'<abbr> needs [title="…"]'}a[target]:not([rel*="noopener"]):not([data-hvi]),a[target]:not([rel*="noreferrer"]):not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:'[target="…"] also needs [rel="noopener"] or [rel="noopener noreferrer"]'}:not(figure)>figcaption:not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:"<figcaption> must be a child of <figure>"}figure>figcaption:not(:first-child):not(:last-child):not([data-hvi]),figure>figcaption:not(:first-child):not(:last-child)~:last-child:not(figcaption):not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:"<figcaption> must be first/last child of <figure>"}figure>figcaption:not(:first-of-type):not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:"<figure> should only contain one <figcaption>"}:not(ul):not(ol)>li:not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:"<li> is missing a parent <ul> or <ol>"}ol>:not(li):not([data-hvi]),ul>:not(li):not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:"Immediate child of <ol> or <ul> must be <li>"}:not(dl):not(div)>dd:not([data-hvi]),:not(dl):not(div)>dt:not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:"<dd> or <dt> is missing a parent <dl> or <div>"}dl>:not(dt):not(dd):not(div):not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:"Immediate child of <dl> must be <dt>, <dd>, or <div>"}fieldset>:not(legend):first-child:not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:"Invalid: first-child of <legend>"}:not(fieldset)>legend:not([data-hvi]),fieldset>legend:not(:first-child):not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:"<legend> must be: first-child of <fieldset>"}input[type="radio"]:not([name]):not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:'Radios without name="…"'}form button:not([type]):not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:'<button> in <form> need [type="…"]'}a a:not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:'<a/> should not be the kids of <a/>'}p div:not([data-hvi]),p+div:not(:empty)+p:empty:not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:'<div> is not allowed within <p>'}:not(svg) [href]:not(a):not(link):not(area):not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:'attribute href not allowed on this element'}[target]:not(a):not(form):not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:'attribute target not allowed on this element'} | ||
| /* | ||
| Variables. | ||
| ================================================== | ||
| */ | ||
| :root { | ||
| --c-level1: #f00; | ||
| --c-level2: #f90; | ||
| } | ||
| head { | ||
| display: block; | ||
| max-height: 200px; | ||
| overflow: auto; | ||
| font-size: 0; | ||
| line-height: 0; | ||
| } | ||
| /* | ||
| leve1: Should to fixed | ||
| ================================================== | ||
| */ | ||
| html:not([lang]), | ||
| html[lang=""] { | ||
| display: block; | ||
| } | ||
| html:not([lang]):not([data-hvi])::before, | ||
| html[lang=""]:not([data-hvi])::before { | ||
| margin: 8px; | ||
| background-color: var(--c-level1); | ||
| color: #ffffff; | ||
| padding: 0.5em; | ||
| display: block; | ||
| font-size: 12px; | ||
| line-height: 16px; | ||
| content: '<html> needs [lang="…"]'; | ||
| position: relative; | ||
| z-index: 20000; | ||
| } | ||
| style:empty, | ||
| script:not([src]):empty, | ||
| title:empty { | ||
| display: block; | ||
| } | ||
| style:empty:not([data-hvi])::before, | ||
| script:not([src]):empty:not([data-hvi])::before, | ||
| title:empty:not([data-hvi])::before { | ||
| margin: 8px; | ||
| background-color: var(--c-level1); | ||
| color: #ffffff; | ||
| padding: 0.5em; | ||
| display: block; | ||
| font-size: 12px; | ||
| line-height: 16px; | ||
| content: 'Those element should not be empty'; | ||
| position: relative; | ||
| z-index: 20000; | ||
| } | ||
| [style=""]:not([data-hvi]), | ||
| [title=""]:not([data-hvi]), | ||
| [id=""]:not([data-hvi]), | ||
| [src=""]:not([data-hvi]), | ||
| [href=""]:not([data-hvi]), | ||
| [name=""]:not([data-hvi]), | ||
| [for=""]:not([data-hvi]), | ||
| [type=""]:not([data-hvi]), | ||
| [width=""]:not([data-hvi]), | ||
| [height=""]:not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: 'Those props should not empty'; | ||
| } | ||
| abbr:not([title]):not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: '<abbr> needs [title="…"]'; | ||
| } | ||
| a[target]:not([rel*="noopener"]):not([data-hvi]), | ||
| a[target]:not([rel*="noreferrer"]):not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: '[target="…"] also needs [rel="noopener"] or [rel="noopener noreferrer"]'; | ||
| } | ||
| /* figure */ | ||
| :not(figure) > figcaption:not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: "<figcaption> must be a child of <figure>"; | ||
| } | ||
| figure > figcaption:not(:first-child):not(:last-child):not([data-hvi]), | ||
| figure > figcaption:not(:first-child):not(:last-child) ~ :last-child:not(figcaption):not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: "<figcaption> must be first/last child of <figure>"; | ||
| } | ||
| figure > figcaption:not(:first-of-type):not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: "<figure> should only contain one <figcaption>"; | ||
| } | ||
| /* ul/ol */ | ||
| :not(ul):not(ol) > li:not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: "<li> is missing a parent <ul> or <ol>"; | ||
| } | ||
| ol > :not(li):not([data-hvi]), | ||
| ul > :not(li):not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: "Immediate child of <ol> or <ul> must be <li>"; | ||
| } | ||
| :not(dl):not(div) > dd:not([data-hvi]), | ||
| :not(dl):not(div) > dt:not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: "<dd> or <dt> is missing a parent <dl> or <div>"; | ||
| } | ||
| /* dl */ | ||
| dl > :not(dt):not(dd):not(div):not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: "Immediate child of <dl> must be <dt>, <dd>, or <div>"; | ||
| } | ||
| /* form */ | ||
| fieldset > :not(legend):first-child:not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: "Invalid: first-child of <legend>"; | ||
| } | ||
| :not(fieldset) > legend:not([data-hvi]), | ||
| fieldset > legend:not(:first-child):not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: "<legend> must be: first-child of <fieldset>"; | ||
| } | ||
| input[type="radio"]:not([name]):not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: 'Radios without name="…"'; | ||
| } | ||
| form button:not([type]):not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: '<button> in <form> need [type="…"]'; | ||
| } | ||
| /* dom */ | ||
| a a:not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: '<a/> should not be the kids of <a/>'; | ||
| } | ||
| p div:not([data-hvi]), | ||
| p + div:not(:empty) + p:empty:not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: '<div> is not allowed within <p>'; | ||
| } | ||
| :not(svg) [href]:not(a):not(link):not(area):not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: 'attribute href not allowed on this element'; | ||
| } | ||
| [target]:not(a):not(form):not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: 'attribute target not allowed on this element'; | ||
| } |
+298
-1
@@ -1,1 +0,298 @@ | ||
| :root{--c-level1:#f00;--c-level2:#f90}head{display:block;max-height:200px;overflow:auto;font-size:0;line-height:0}html:not([lang]),html[lang=""]{display:block}html:not([lang]):not([data-hvi])::before,html[lang=""]:not([data-hvi])::before{margin:8px;background-color:var(--c-level1);color:#fff;padding:.5em;display:block;font-size:12px;line-height:16px;content:'<html> needs [lang="…"]'}style:empty,script:not([src]):empty,title:empty{display:block}style:empty:not([data-hvi])::before,script:not([src]):empty:not([data-hvi])::before,title:empty:not([data-hvi])::before{margin:8px;background-color:var(--c-level1);color:#fff;padding:.5em;display:block;font-size:12px;line-height:16px;content:'Those -moz-element should not be empty';content:'Those element should not be empty'}[style=""]:not([data-hvi]),[title=""]:not([data-hvi]),[id=""]:not([data-hvi]),[src=""]:not([data-hvi]),[href=""]:not([data-hvi]),[name=""]:not([data-hvi]),[for=""]:not([data-hvi]),[type=""]:not([data-hvi]),[width=""]:not([data-hvi]),[height=""]:not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:'Those props should not empty'}abbr:not([title]):not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:'<abbr> needs [title="…"]'}a[target]:not([rel*="noopener"]):not([data-hvi]),a[target]:not([rel*="noreferrer"]):not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:'[target="…"] also needs [rel="noopener"] or [rel="noopener noreferrer"]'}:not(figure)>figcaption:not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:"<figcaption> must be a child of <figure>"}figure>figcaption:not(:first-child):not(:last-child):not([data-hvi]),figure>figcaption:not(:first-child):not(:last-child)~:last-child:not(figcaption):not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:"<figcaption> must be first/last child of <figure>"}figure>figcaption:not(:first-of-type):not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:"<figure> should only contain one <figcaption>"}:not(ul):not(ol)>li:not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:"<li> is missing a parent <ul> or <ol>"}ol>:not(li):not([data-hvi]),ul>:not(li):not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:"Immediate child of <ol> or <ul> must be <li>"}:not(dl):not(div)>dd:not([data-hvi]),:not(dl):not(div)>dt:not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:"<dd> or <dt> is missing a parent <dl> or <div>"}dl>:not(dt):not(dd):not(div):not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:"Immediate child of <dl> must be <dt>, <dd>, or <div>"}fieldset>:not(legend):first-child:not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:"Invalid: first-child of <legend>"}:not(fieldset)>legend:not([data-hvi]),fieldset>legend:not(:first-child):not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:"<legend> must be: first-child of <fieldset>"}input[type="radio"]:not([name]):not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:'Radios without name="…"'}form button:not([type]):not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:'<button> in <form> need [type="…"]'}a a:not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:'<a/> should not be the kids of <a/>'}p div:not([data-hvi]),p+div:not(:empty)+p:empty:not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:'<div> is not allowed within <p>'}:not(svg) [href]:not(a):not(link):not(area):not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:'attribute href not allowed on this element'}[target]:not(a):not(form):not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:'attribute target not allowed on this element'}a[href^="http:"]:not([data-hvi]){outline:1px dashed var(--c-level2) !important;content:'Link to "http: " site. Does "https:" equivalent exist?'}a:not([title]):not([data-hvi]){outline:1px dashed var(--c-level2) !important;content:'<a/> may needs [title="…"]'}body style{display:block}body style:not([data-hvi])::before{margin:8px;background-color:var(--c-level2);color:#fff;padding:.5em;display:block;font-size:12px;line-height:16px;content:"<body> should not contain <style>"}body link{display:block}body link:not([data-hvi])::before{margin:8px;background-color:var(--c-level2);color:#fff;padding:.5em;display:block;font-size:12px;line-height:16px;content:'<body> should not contain <link> '}dl dd:first-child:not([data-hvi]){outline:1px dashed var(--c-level2) !important;content:"<dd> can not be: first-child of <dl>"}div:only-child>div:only-child>div:only-child:not([data-hvi]){outline:1px dashed var(--c-level2) !important;content:'Needlessly nested <div> tags (3).'}label:not([for]):not([data-hvi]){outline:1px dashed var(--c-level2) !important;content:'<label> needs [for="…"]'}img:not([src]):not([data-hvi]),img:not([width]):not([data-hvi]),img:not([height]):not([data-hvi]),img:not([alt]):not([data-hvi]){outline:1px dashed var(--c-level2) !important;content:'<img> needs [width="…"] & [height="…"] & [alt="…"] & [src="…"]'}[style]:not([data-hvi]){outline:1px dashed var(--c-level2) !important;content:'inline [style="…"] detected'}script[src^="http:"]:not([data-hvi]){outline:1px dashed var(--c-level2) !important;content:'Consider "https: " for <script> with [src="' attr(src) '"]'}script[src]:not([async]):not([defer]){display:block}script[src]:not([async]):not([defer]):not([data-hvi])::before{margin:8px;background-color:var(--c-level2);color:#fff;padding:.5em;display:block;font-size:12px;line-height:16px;content:'Consider [async] or [defer] for <script> with [src="' attr(src) '"]'}span div:not([data-hvi]),strong div:not([data-hvi]),small div:not([data-hvi]),em div:not([data-hvi]),i div:not([data-hvi]),label div:not([data-hvi]),span h1:not([data-hvi]),strong h1:not([data-hvi]),small h1:not([data-hvi]),em h1:not([data-hvi]),i h1:not([data-hvi]),label h1:not([data-hvi]),span h2:not([data-hvi]),strong h2:not([data-hvi]),small h2:not([data-hvi]),em h2:not([data-hvi]),i h2:not([data-hvi]),label h2:not([data-hvi]),span h3:not([data-hvi]),strong h3:not([data-hvi]),small h3:not([data-hvi]),em h3:not([data-hvi]),i h3:not([data-hvi]),label h3:not([data-hvi]),span h4:not([data-hvi]),strong h4:not([data-hvi]),small h4:not([data-hvi]),em h4:not([data-hvi]),i h4:not([data-hvi]),label h4:not([data-hvi]),span h5:not([data-hvi]),strong h5:not([data-hvi]),small h5:not([data-hvi]),em h5:not([data-hvi]),i h5:not([data-hvi]),label h5:not([data-hvi]),span h6:not([data-hvi]),strong h6:not([data-hvi]),small h6:not([data-hvi]),em h6:not([data-hvi]),i h6:not([data-hvi]),label h6:not([data-hvi]),span p:not([data-hvi]),strong p:not([data-hvi]),small p:not([data-hvi]),em p:not([data-hvi]),i p:not([data-hvi]),label p:not([data-hvi]),span form:not([data-hvi]),strong form:not([data-hvi]),small form:not([data-hvi]),em form:not([data-hvi]),i form:not([data-hvi]),label form:not([data-hvi]),span ul:not([data-hvi]),strong ul:not([data-hvi]),small ul:not([data-hvi]),em ul:not([data-hvi]),i ul:not([data-hvi]),label ul:not([data-hvi]),span ol:not([data-hvi]),strong ol:not([data-hvi]),small ol:not([data-hvi]),em ol:not([data-hvi]),i ol:not([data-hvi]),label ol:not([data-hvi]){outline:2px dashed var(--c-level1) !important;content:"Block elements are not suppose be in the inline or inline block elements"} | ||
| /* | ||
| Variables. | ||
| ================================================== | ||
| */ | ||
| :root { | ||
| --c-level1: #f00; | ||
| --c-level2: #f90; | ||
| } | ||
| head { | ||
| display: block; | ||
| max-height: 200px; | ||
| overflow: auto; | ||
| font-size: 0; | ||
| line-height: 0; | ||
| } | ||
| /* | ||
| leve1: Should to fixed | ||
| ================================================== | ||
| */ | ||
| html:not([lang]), | ||
| html[lang=""] { | ||
| display: block; | ||
| } | ||
| html:not([lang]):not([data-hvi])::before, | ||
| html[lang=""]:not([data-hvi])::before { | ||
| margin: 8px; | ||
| background-color: var(--c-level1); | ||
| color: #ffffff; | ||
| padding: 0.5em; | ||
| display: block; | ||
| font-size: 12px; | ||
| line-height: 16px; | ||
| content: '<html> needs [lang="…"]'; | ||
| position: relative; | ||
| z-index: 20000; | ||
| } | ||
| style:empty, | ||
| script:not([src]):empty, | ||
| title:empty { | ||
| display: block; | ||
| } | ||
| style:empty:not([data-hvi])::before, | ||
| script:not([src]):empty:not([data-hvi])::before, | ||
| title:empty:not([data-hvi])::before { | ||
| margin: 8px; | ||
| background-color: var(--c-level1); | ||
| color: #ffffff; | ||
| padding: 0.5em; | ||
| display: block; | ||
| font-size: 12px; | ||
| line-height: 16px; | ||
| content: 'Those element should not be empty'; | ||
| position: relative; | ||
| z-index: 20000; | ||
| } | ||
| [style=""]:not([data-hvi]), | ||
| [title=""]:not([data-hvi]), | ||
| [id=""]:not([data-hvi]), | ||
| [src=""]:not([data-hvi]), | ||
| [href=""]:not([data-hvi]), | ||
| [name=""]:not([data-hvi]), | ||
| [for=""]:not([data-hvi]), | ||
| [type=""]:not([data-hvi]), | ||
| [width=""]:not([data-hvi]), | ||
| [height=""]:not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: 'Those props should not empty'; | ||
| } | ||
| abbr:not([title]):not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: '<abbr> needs [title="…"]'; | ||
| } | ||
| a[target]:not([rel*="noopener"]):not([data-hvi]), | ||
| a[target]:not([rel*="noreferrer"]):not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: '[target="…"] also needs [rel="noopener"] or [rel="noopener noreferrer"]'; | ||
| } | ||
| /* figure */ | ||
| :not(figure) > figcaption:not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: "<figcaption> must be a child of <figure>"; | ||
| } | ||
| figure > figcaption:not(:first-child):not(:last-child):not([data-hvi]), | ||
| figure > figcaption:not(:first-child):not(:last-child) ~ :last-child:not(figcaption):not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: "<figcaption> must be first/last child of <figure>"; | ||
| } | ||
| figure > figcaption:not(:first-of-type):not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: "<figure> should only contain one <figcaption>"; | ||
| } | ||
| /* ul/ol */ | ||
| :not(ul):not(ol) > li:not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: "<li> is missing a parent <ul> or <ol>"; | ||
| } | ||
| ol > :not(li):not([data-hvi]), | ||
| ul > :not(li):not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: "Immediate child of <ol> or <ul> must be <li>"; | ||
| } | ||
| :not(dl):not(div) > dd:not([data-hvi]), | ||
| :not(dl):not(div) > dt:not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: "<dd> or <dt> is missing a parent <dl> or <div>"; | ||
| } | ||
| /* dl */ | ||
| dl > :not(dt):not(dd):not(div):not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: "Immediate child of <dl> must be <dt>, <dd>, or <div>"; | ||
| } | ||
| /* form */ | ||
| fieldset > :not(legend):first-child:not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: "Invalid: first-child of <legend>"; | ||
| } | ||
| :not(fieldset) > legend:not([data-hvi]), | ||
| fieldset > legend:not(:first-child):not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: "<legend> must be: first-child of <fieldset>"; | ||
| } | ||
| input[type="radio"]:not([name]):not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: 'Radios without name="…"'; | ||
| } | ||
| form button:not([type]):not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: '<button> in <form> need [type="…"]'; | ||
| } | ||
| /* dom */ | ||
| a a:not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: '<a/> should not be the kids of <a/>'; | ||
| } | ||
| p div:not([data-hvi]), | ||
| p + div:not(:empty) + p:empty:not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: '<div> is not allowed within <p>'; | ||
| } | ||
| :not(svg) [href]:not(a):not(link):not(area):not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: 'attribute href not allowed on this element'; | ||
| } | ||
| [target]:not(a):not(form):not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: 'attribute target not allowed on this element'; | ||
| } | ||
| /* https: */ | ||
| a[href^="http:"]:not([data-hvi]) { | ||
| outline: 1px dashed var(--c-level2) !important; | ||
| content: 'Link to "http: " site. Does "https:" equivalent exist?'; | ||
| } | ||
| a:not([title]):not([data-hvi]) { | ||
| outline: 1px dashed var(--c-level2) !important; | ||
| content: '<a/> may needs [title="…"]'; | ||
| } | ||
| /* body */ | ||
| body style { | ||
| display: block; | ||
| } | ||
| body style:not([data-hvi])::before { | ||
| margin: 8px; | ||
| background-color: var(--c-level2); | ||
| color: #ffffff; | ||
| padding: 0.5em; | ||
| display: block; | ||
| font-size: 12px; | ||
| line-height: 16px; | ||
| content: "<body> should not contain <style>"; | ||
| position: relative; | ||
| z-index: 20000; | ||
| } | ||
| body link { | ||
| display: block; | ||
| } | ||
| body link:not([data-hvi])::before { | ||
| margin: 8px; | ||
| background-color: var(--c-level2); | ||
| color: #ffffff; | ||
| padding: 0.5em; | ||
| display: block; | ||
| font-size: 12px; | ||
| line-height: 16px; | ||
| content: '<body> should not contain <link> '; | ||
| position: relative; | ||
| z-index: 20000; | ||
| } | ||
| /* dl */ | ||
| dl dd:first-child:not([data-hvi]) { | ||
| outline: 1px dashed var(--c-level2) !important; | ||
| content: "<dd> can not be: first-child of <dl>"; | ||
| } | ||
| /* dom */ | ||
| div:only-child > div:only-child > div:only-child:not([data-hvi]) { | ||
| outline: 1px dashed var(--c-level2) !important; | ||
| content: 'Needlessly nested <div> tags (3).'; | ||
| } | ||
| /* head */ | ||
| label:not([for]):not([data-hvi]) { | ||
| outline: 1px dashed var(--c-level2) !important; | ||
| content: '<label> needs [for="…"]'; | ||
| } | ||
| img:not([src]):not([data-hvi]), | ||
| img:not([width]):not([data-hvi]), | ||
| img:not([height]):not([data-hvi]), | ||
| img:not([alt]):not([data-hvi]) { | ||
| outline: 1px dashed var(--c-level2) !important; | ||
| content: '<img> needs [width="…"] & [height="…"] & [alt="…"] & [src="…"]'; | ||
| } | ||
| /* script */ | ||
| script[src^="http:"]:not([data-hvi]) { | ||
| outline: 1px dashed var(--c-level2) !important; | ||
| content: 'Consider "https: " for <script> with [src="' attr(src) '"]'; | ||
| } | ||
| script[src]:not([async]):not([defer]) { | ||
| display: block; | ||
| } | ||
| script[src]:not([async]):not([defer]):not([data-hvi])::before { | ||
| margin: 8px; | ||
| background-color: var(--c-level2); | ||
| color: #ffffff; | ||
| padding: 0.5em; | ||
| display: block; | ||
| font-size: 12px; | ||
| line-height: 16px; | ||
| content: 'Consider [async] or [defer] for <script> with [src="' attr(src) '"]'; | ||
| position: relative; | ||
| z-index: 20000; | ||
| } | ||
| span div:not([data-hvi]), | ||
| strong div:not([data-hvi]), | ||
| small div:not([data-hvi]), | ||
| em div:not([data-hvi]), | ||
| i div:not([data-hvi]), | ||
| label div:not([data-hvi]), | ||
| span h1:not([data-hvi]), | ||
| strong h1:not([data-hvi]), | ||
| small h1:not([data-hvi]), | ||
| em h1:not([data-hvi]), | ||
| i h1:not([data-hvi]), | ||
| label h1:not([data-hvi]), | ||
| span h2:not([data-hvi]), | ||
| strong h2:not([data-hvi]), | ||
| small h2:not([data-hvi]), | ||
| em h2:not([data-hvi]), | ||
| i h2:not([data-hvi]), | ||
| label h2:not([data-hvi]), | ||
| span h3:not([data-hvi]), | ||
| strong h3:not([data-hvi]), | ||
| small h3:not([data-hvi]), | ||
| em h3:not([data-hvi]), | ||
| i h3:not([data-hvi]), | ||
| label h3:not([data-hvi]), | ||
| span h4:not([data-hvi]), | ||
| strong h4:not([data-hvi]), | ||
| small h4:not([data-hvi]), | ||
| em h4:not([data-hvi]), | ||
| i h4:not([data-hvi]), | ||
| label h4:not([data-hvi]), | ||
| span h5:not([data-hvi]), | ||
| strong h5:not([data-hvi]), | ||
| small h5:not([data-hvi]), | ||
| em h5:not([data-hvi]), | ||
| i h5:not([data-hvi]), | ||
| label h5:not([data-hvi]), | ||
| span h6:not([data-hvi]), | ||
| strong h6:not([data-hvi]), | ||
| small h6:not([data-hvi]), | ||
| em h6:not([data-hvi]), | ||
| i h6:not([data-hvi]), | ||
| label h6:not([data-hvi]), | ||
| span p:not([data-hvi]), | ||
| strong p:not([data-hvi]), | ||
| small p:not([data-hvi]), | ||
| em p:not([data-hvi]), | ||
| i p:not([data-hvi]), | ||
| label p:not([data-hvi]), | ||
| span form:not([data-hvi]), | ||
| strong form:not([data-hvi]), | ||
| small form:not([data-hvi]), | ||
| em form:not([data-hvi]), | ||
| i form:not([data-hvi]), | ||
| label form:not([data-hvi]), | ||
| span ul:not([data-hvi]), | ||
| strong ul:not([data-hvi]), | ||
| small ul:not([data-hvi]), | ||
| em ul:not([data-hvi]), | ||
| i ul:not([data-hvi]), | ||
| label ul:not([data-hvi]), | ||
| span ol:not([data-hvi]), | ||
| strong ol:not([data-hvi]), | ||
| small ol:not([data-hvi]), | ||
| em ol:not([data-hvi]), | ||
| i ol:not([data-hvi]), | ||
| label ol:not([data-hvi]) { | ||
| outline: 2px dashed var(--c-level1) !important; | ||
| content: "Block elements are not suppose be in the inline or inline block elements"; | ||
| } |
+3
-1
@@ -31,2 +31,4 @@ /* | ||
| content: @content; | ||
| position: relative; | ||
| z-index: 20000; | ||
| } | ||
@@ -156,2 +158,2 @@ } | ||
| #level1('attribute target not allowed on this element'); | ||
| } | ||
| } |
+1
-5
@@ -56,6 +56,2 @@ @import './level1.less'; | ||
| [style] { | ||
| #level2('inline [style="…"] detected'); | ||
| } | ||
| /* script */ | ||
@@ -90,2 +86,2 @@ script[src^="http:"] { | ||
| } | ||
| } |
+1
-1
| { | ||
| "name": "@_nu/html-validator", | ||
| "version": "0.0.9", | ||
| "version": "0.0.10", | ||
| "description": "Semantic HTML liner in just pure CSS way.", | ||
@@ -5,0 +5,0 @@ "main": "/css/level2.css", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
29436
5.93%445
Infinity%1
-50%