You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: addons/van_dml/src/README.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ With VAN_DML, this can be rewritten:
44
44
```
45
45
begin() is "transparent", it just returns the DOM reference of the first child. This let´s you create functions like this:
46
46
```JS
47
-
constbdiv (...args) =>begin(div(...args))
47
+
constbdiv=(...args) =>begin(div(...args))
48
48
49
49
bdiv() // Create a div and open for append
50
50
h1()
@@ -61,7 +61,7 @@ begin(ID) can also digest Strings:
61
61
62
62
## end(n)
63
63
64
-
end() finishes the append mode and returns to the previous base. For each begin() there should be one call of end(). You can verify this by checking `SP()==0` (see below).
64
+
end() finishes the append mode and returns to the previous base. For each begin() there should be one call of end(). You can verify this by checking `SP()===0` (see below).
65
65
If no base is selected (or the calls begin() and end() are balanced), auto-Append is disabled.
66
66
67
67
end(n) runs "end()" n times. May be convenient to return from deep nested functions.
@@ -84,17 +84,17 @@ To check your code, you can add this line to the end of Javascript:
84
84
if (sp() !==0) alert(`baseStack mismatch: stacksize ${sp()} at end of Javascript`)
85
85
```
86
86
87
-
## CSS(s): create CSS-Defintions dynamically with Javascript
87
+
## css(s): create CSS-Defintions dynamically with Javascript
88
88
s can be
89
-
- a string CSS(".myClass { color: red; }")
89
+
- a string css(".myClass { color: red; }")
90
90
- a template string with multiple rules
91
-
CSS(`
91
+
css(`
92
92
.myClass { color: red; }
93
93
.myClass: hover { color: green }
94
94
`)
95
95
- It can contain even template literals:
96
96
let color = ["red","green","blue"]
97
-
CSS(`
97
+
css(`
98
98
.myClass { color: ${mycolor[1]}; }
99
99
`)
100
-
Definitions with CSS() work like any other CSS you provide with static definitions, they just are added from within Javascript. This makes it easy to control CSS programmatically
100
+
Definitions with css() work like any other CSS you provide with static definitions, they just are added from within Javascript. This makes it easy to control CSS programmatically
0 commit comments