Skip to content

Commit 2d19c6b

Browse files
committed
feat: update examples
1 parent f6639fa commit 2d19c6b

File tree

11 files changed

+56
-24
lines changed

11 files changed

+56
-24
lines changed

examples/multi-root/proj-1/index.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
color: var(--color-1);
88
background-color: var(--color-2);
99

10+
/* LOL!! I didn't know adding a var() in the comment makes it visible for diagnostics */
11+
/* FIXME(phoenisx) When var() function is used with default values, the regex doesn't */
12+
/* work as expected */
1013
/* Non declared variable test */
1114
color: var(--space-2, 2rem);
1215
}

examples/multi-root/proj-3/index.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
@import "./theme.dark.css";
33

44
body {
5+
/* FIXME(phoenisx) Not working. It was working before */
6+
/* It started working after reload */
57
color: var(--primary-text);
68
background-color: var(--primary-bg);
79
padding: var(--container-spacing);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"cssvar.files": ["testing.css"],
2+
"cssvar.files": ["testing-*.css"],
33
}

examples/recursion/02-var-fn-not-evaluated.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
}
88

99
.test {
10-
/* This needs to be fixed, and will be fixed once stop using object mapping in */
11-
/* done to single value in v3.0 */
10+
/* --foo should point to #f00, but it isn't righ now */
11+
/* Need to find a way to set recursive value to previously declared variable */
1212
background: var(--foo);
1313
}
1414

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
:root {
2+
--fuzz: #fff;
3+
4+
--fuzz-large: var(--fuzz);
5+
--boo: var(--not-defined);
6+
}
7+
8+
@media (min-width: 768px) {
9+
:root {
10+
--boo: 48px;
11+
}
12+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.card {
2+
background: var(--fuzz);
3+
padding: var(--not-defined);
4+
}
5+
6+
/* Just updating variables instead of having to re-define each property */
7+
.card--large {
8+
--fuzz: var(--fuzz-large);
9+
--not-defined: var(--boo);
10+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/* Folllowing is valid css */
2+
:root {
3+
--bar: var(--foo);
4+
}
5+
6+
.test {
7+
background: var(--foo);
8+
}
9+
10+
.test--two {
11+
--foo: var(--bar);
12+
}
13+
14+
.test--two.define {
15+
--foo: lightgreen;
16+
}

examples/recursion/testing.css

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"cssvar.postcssPlugins": [
3+
// `cwd` option is required only if tokencss config is not declared directly under project root
34
["@tokencss/postcss", { "cwd": "examples/tokencss-plugin/config" }]
45
]
56
}

src/test/main.test.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,3 @@ describe("Test Extension Main", () => {
223223
});
224224
});
225225
});
226-
227-
// Need to work on this later.
228-
test.skip("setup() should map user config to in-mem Config object", () => {
229-
230-
});

0 commit comments

Comments
 (0)