diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2857b38..60b98e2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,13 @@
+## [1.14.5](https://github.com/CoCreate-app/CoCreate-css-parser/compare/v1.14.4...v1.14.5) (2024-06-12)
+
+
+### Bug Fixes
+
+* bump cocreate dependencies ([ea1b6fc](https://github.com/CoCreate-app/CoCreate-css-parser/commit/ea1b6fca49f2dc55cceba26f4419efbfa76f4f79))
+* Handlig importan in theme rules ([7078105](https://github.com/CoCreate-app/CoCreate-css-parser/commit/70781057f761557080360535d9ba47ef7aee8e67))
+* handling dark and light mode ([5217148](https://github.com/CoCreate-app/CoCreate-css-parser/commit/52171481883c33d30650366ef70f3b19445266d2))
+* svg icon class ([3864815](https://github.com/CoCreate-app/CoCreate-css-parser/commit/3864815ef136a8b95c7a871fbd69bb37a05583d0))
+
## [1.14.4](https://github.com/CoCreate-app/CoCreate-css-parser/compare/v1.14.3...v1.14.4) (2024-04-29)
diff --git a/demo/atomic-css.html b/demo/atomic-css.html
index 3f14f6d..21835fe 100644
--- a/demo/atomic-css.html
+++ b/demo/atomic-css.html
@@ -57,41 +57,31 @@
CoCreate helper CSS
href="https://github.com/CoCreate-app/CoCreateCSS"
target="_blank"
class="margin-right:15px"
- >
@@ -114,9 +104,7 @@ Reference
@@ -1004,9 +992,7 @@ Demo
@@ -1050,7 +1036,7 @@ Demo
toggle="code-height"
toggle-selector="#demo-code"
>
Demo
hide="#eye-slash"
toggle="code-height"
toggle-selector="#demo-code"
- >
Demo
show="#code, #demo-code"
hide="#code-slash"
>
SPREAD THE WORD!
href="https://twitter.com/CoCreate_App"
target="_blank"
class="margin:15px color:white"
- >
diff --git a/docs/index.html b/docs/index.html
index 824a23e..0a6d853 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -91,43 +91,33 @@ CoCreate utility CSS
class="margin-right:15px"
share-network="twitter"
title="Share on twitter"
- >
@@ -153,9 +143,7 @@ Usage
@@ -1048,9 +1036,7 @@ Demo
@@ -1094,7 +1080,7 @@ Demo
toggle="code-height"
toggle-selector="#demo-code"
>
Demo
hide="#eye-slash"
toggle="code-height"
toggle-selector="#demo-code"
- >
Demo
show="#code, #demo-code"
hide="#code-slash"
>
2) {
- console.log('pseudo names need to be added after theme');
- return;
- }
+ // if (res.length > 2) {
+ // console.log('pseudo names need to be added after theme');
+ // return;
+ // }
let property = res[0];
let suffix = parseValue(res[1]);
let value = res[1].replace(/_/g, " ");
+ //TODO: set theme rule with pseudo and !important
let rule = "";
- if (pseudo) {
- suffix += "\\@" + theme;
- for (let i = 0; i < pseudo.length; i++) {
- suffix += ":" + pseudo[0 + i];
- }
- rule = `.${property}\\:${suffix} { ${property}: ${value}; }`;
- }
- else {
+ if (res.length > 2) {
+ // suffix += "\\@" + theme;
+ // for (let i = 0; i < res.length - 2; i++) {
+ suffix += "\\:" + res[2] + importantSuffix + ":" + "\\@" + theme + ":" + res[2];
+ // }
+ rule = `.${property}\\:${suffix} { ${property}: ${value}${important}; }`;
+ } else {
rule = `.${property}\\:${suffix}\\@${theme} { ${property}: ${value}; }`;
}
+
if (theme == 'dark' || theme == 'light') {
- rule = `[theme="${theme}"] ${rule}`;
- let reverseRule = `html:not([theme="${themes[1 - themes.indexOf(theme)]}"]) ${rule}`;
- tempStyleList.push(rule);
- themeCSS[theme].push(reverseRule);
+ // rule = `[theme="${theme}"] ${rule}`;
+ // let reverseRule = `html:not([theme="${themes[1 - themes.indexOf(theme)]}"]) ${rule}`;
+ // let reverseRule = `${rule}`;
+ // tempStyleList.push(rule);
+ themeCSS[theme].push(rule);
classNameList.set(classname, true);
}
}
function createThemeMedia() {
- let initial;
if (themeCSS.dark.length) {
+ let initial;
initial = "@media (prefers-color-scheme: dark) {";
for (let c of themeCSS.dark) {
initial += c + "\n";
@@ -250,6 +260,7 @@ function createThemeMedia() {
themeCSS.dark = [];
}
if (themeCSS.light.length) {
+ let initial;
initial = "@media (prefers-color-scheme: light) {";
for (let c of themeCSS.light) {
initial += c + "\n";