Skip to content

Commit

Permalink
test(consistent-selector-style): added rule tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marekdedic committed Dec 10, 2024
1 parent 882fd80 commit be7ca3c
Show file tree
Hide file tree
Showing 35 changed files with 814 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"options": [{ "style": ["id", "class", "type"] }]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<a class="link">Click me!</a>

<a>Click me two!</a>

<b class="bold">Text 1</b>

<b data-key="val">Text 3</b>

<i>Italic</i>

<style>
.link,
.bold,
.link:active,
.link + .bold,
.bold[data-key="val"],
.bold::before,
i,
i:active,
#bold + i,
i::before {
color: red;
}
</style>
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<a class="link">Click me!</a>

<a>Click me two!</a>

<b class="bold">Text 1</b>

<b data-key="val">Text 3</b>

<i>Italic</i>

<style>
.link {
color: red;
}
.bold {
color: red;
}
.link:active {
color: red;
}
.link + .bold {
color: red;
}
.bold[data-key="val"] {
color: red;
}
.bold::before {
color: red;
}
i {
color: red;
}
i:active {
color: red;
}
#bold + i {
color: red;
}
i::before {
color: red;
}
</style>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"options": [{ "style": ["id", "type", "class"] }]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<a class="link">Click me!</a>

<a>Click me two!</a>

<b class="bold">Text 1</b>

<b data-key="val">Text 3</b>

<i>Italic</i>

<style>
.link {
color: red;
}
.bold {
color: red;
}
.link:active {
color: red;
}
.link + .bold {
color: red;
}
.bold[data-key="val"] {
color: red;
}
.bold::before {
color: red;
}
i {
color: red;
}
i:active {
color: red;
}
#bold + i {
color: red;
}
i::before {
color: red;
}
</style>
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<a class="link">Click me!</a>

<a class="link">Click me two!</a>

<b class="bold">Text 1</b>

<b class="bold" data-key="val">Text 2</b>

<style>
.link {
color: red;
}
.bold {
color: red;
}
.link:active {
color: red;
}
.link + .bold {
color: red;
}
.bold[data-key="val"] {
color: red;
}
.bold::before {
color: red;
}
</style>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"options": [{ "style": ["type", "class", "id"] }]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<a class="link">Click me!</a>

<a class="link">Click me two!</a>

<b class="bold">Text 1</b>

<b class="bold" data-key="val">Text 2</b>

<i id="italic">Italic</i>

<style>
.link {
color: red;
}
.bold {
color: red;
}
.link:active {
color: red;
}
.link + .bold {
color: red;
}
.bold[data-key="val"] {
color: red;
}
.bold::before {
color: red;
}
#italic {
color: red;
}
#italic:active {
color: red;
}
b + #italic {
color: red;
}
#italic::before {
color: red;
}
</style>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"options": [{ "style": ["type", "id", "class"] }]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<a class="link">Click me!</a>

<a>Click me two!</a>

<b class="bold">Text 1</b>

<b data-key="val">Text 3</b>

<style>
.link {
color: red;
}
.bold {
color: red;
}
.link:active {
color: red;
}
.link + .bold {
color: red;
}
.bold[data-key="val"] {
color: red;
}
.bold::before {
color: red;
}
</style>
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<a class="link">Click me!</a>

<a class="link">Click me two!</a>

<b class="bold">Text 1</b>

<b class="bold" data-key="val">Text 2</b>

<i id="italic">Italic</i>

<style>
.link {
color: red;
}
.bold {
color: red;
}
.link:active {
color: red;
}
.link + .bold {
color: red;
}
.bold[data-key="val"] {
color: red;
}
.bold::before {
color: red;
}
#italic {
color: red;
}
#italic:active {
color: red;
}
b + #italic {
color: red;
}
#italic::before {
color: red;
}
</style>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"options": [{ "style": ["class", "id", "type"] }]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<a class="link">Click me!</a>

<b class="bold">Text 1</b>

<b>Text 2</b>

<style lang="scss">
.link {
color: red;
}
.bold {
color: red;
}
</style>
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<a class="link">Click me!</a>

<b class="bold">Text 1</b>

<b data-key="val">Text 2</b>

<style>
.link {
color: red;
}
.bold {
color: red;
}
.link:active {
color: red;
}
.link + .bold {
color: red;
}
.bold[data-key="val"] {
color: red;
}
.bold::before {
color: red;
}
</style>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"options": [{ "style": ["class", "type", "id"] }]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<a class="link">Click me!</a>

<b class="bold">Text 1</b>

<b>Text 2</b>

<style lang="scss">
.link {
color: red;
}
.bold {
color: red;
}
</style>
Loading

0 comments on commit be7ca3c

Please sign in to comment.