test: add more integration tests with insta. Like it!

This commit is contained in:
Yiffy Dev 2024-11-03 17:52:28 +05:00 • committed by spushk
commit cd9305288a
Signed by: spushk
GPG key ID: 7797B761E105E8AA
15 changed files with 413 additions and 21 deletions

View file

@ -0,0 +1,19 @@
@mixin color($color: black)
@if $color == black
color: white
background-color: green
@else if $color == white
color: red
background-color: black
@else
color: #c6c6c6
background-color: #00ffff
&::after
content: 'Colored'
color: $color
background-color: blue
&:hover
transform: scale(2)
&:hover
transform: translateX(10%)

View file

@ -0,0 +1,24 @@
@mixin surface($color: black){
@if $color == black{
color: white;
background-color: green;
}@else if $color == white{
color: red;
background-color: black;
}@else{
color: #c6c6c6;
background-color: #00ffff;
}
&::after{
content: 'Colored';
color: $color;
background-color: blue;
&:hover{
transform: scale(2);
}
}
&:hover{
transform: translateX(10%);
}
}

View file

@ -1,5 +0,0 @@
@mixin colored($color: primary)
@if $color == primary
color: white
@else
color: $col

View file

@ -1,9 +0,0 @@
$primary-color: black;
@mixin colored($col: primary) {
@if $col == primary {
color: $primary-color;
} @else {
color: $col;
}
}

View file

@ -0,0 +1,3 @@
@forward 'mixins_a'
@forward 'mixins_c'

View file

@ -0,0 +1,3 @@
@forward 'mixins_a';
@forward 'mixins_c';

View file

@ -0,0 +1,15 @@
@use 'mixins_a' as *
@use 'mixins_c' as *
.coated
@include color(green)
@include surface(black)
&-dark
@include surface(red)
a
@include surface(blue)
img
@include color(black)
span
@include color(green)
display: block

View file

@ -0,0 +1,20 @@
@use 'mixins_a' as *;
@use 'mixins_c' as *;
.coated{
@include color(green);
@include surface(black);
&-dark{
@include surface(red);
a{
@include surface(blue);
img{
@include color(black);
}
}
}
span{
@include color(green);
display: block;
}
}

3
tests/assets/prelude.css Normal file
View file

@ -0,0 +1,3 @@
html {
background-color: dark;
}

View file

@ -0,0 +1,5 @@
@use 'mixins_a' as *
@use 'mixins_c' as *
body
@include color()

View file

@ -0,0 +1,6 @@
@use 'mixins_a' as *;
@use 'mixins_c' as *;
body {
@include surface();
}

View file

@ -0,0 +1,17 @@
.fuzz
background-color: red
display: block
&-dark
background-color: black
color: white
a
text-transform: uppercase
img
position: absolute
top: 0
left: 10rem
span
position: relative
display: grid
grid-template-areas: 'a b c' 'd e f' 'x x x'
display: block

View file

@ -0,0 +1,22 @@
.fuzz{
background-color: red;
display: block;
&-dark{
background-color: black;
color: white;
a{
text-transform: uppercase;
img{
position: absolute;
top: 0;
left: 10rem;
}
}
}
span{
position: relative;
display: grid;
grid-template-areas: 'a b c' 'd e f' 'x x x';
display: block;
}
}

View file

@ -0,0 +1,14 @@
@use 'module_a' as *
.coated
@include color(green)
@include surface(black)
&-dark
@include surface(red)
a
@include surface(blue)
img
@include color(black)
span
@include color(green)
display: block

View file

@ -0,0 +1,20 @@
@use 'module_c' as *;
.coated{
@include color(green);
@include surface(black);
&-dark{
@include surface(red);
a{
@include surface(blue);
img{
@include color(black);
}
}
}
span{
@include color(green);
display: block;
}
}