UNPKG
ocat-lang
Version:
latest (1.3.1)
1.3.1
1.3.0
1.2.0
1.1.6
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.0.3
1.0.2
1.0.1
0.8.0
0.7.3
0.7.2
0.7.1
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1
A programming language for the web design and development
orangecatprog.com
luisRG-L/ocat-lang-npm
ocat-lang
/
src
/
runner
/
adapters
/
css.ts
10 lines
(8 loc)
•
335 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
import
{
Memory
}
from
"../../memory"
;
export
const
processCSS
= (
css
:
string
,
cname
:
string
,
memory
:
Memory
) => {
return
css .
replace
(
/local/g
,
`.oc-component-
${cname}
`
) .
replace
(
/prop\((\w+)\)/g
,
(
_match, propname
) =>
{
return
memory.
getActuallyTheme
().
properties
[propname]; }); };