Created
October 16, 2023 11:08
-
-
Save danielborzov/6fc898d8e422d6e69885fa8f24062cd5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/addons/tilda_pages/func.php b/app/addons/tilda_pages/func.php | |
index f8bce00a28..5d9a73cc3b 100644 | |
--- a/app/addons/tilda_pages/func.php | |
+++ b/app/addons/tilda_pages/func.php | |
@@ -350,9 +350,14 @@ function fn_tilda_pages_merge_css($page_id, array $css_list) | |
try { | |
$css_content = implode("\n\n", $contents); | |
+ //Prevent compile CSS calc() properties | |
+ $css_content = preg_replace('/calc\(([^)(]*(?:\([^)(]*(?:\([^)(]*\)[^)(]*)*\)[^)(]*)*)\)/', 'calc(~"$1")', $css_content); | |
$revert_css = file_get_contents(Registry::get('config.dir.design_backend') . 'css/addons/tilda_pages/revert.css'); | |
$css_content = $revert_css . ' .tilda-pages-container {' . $css_content . '}'; | |
+ // FIXME: Fix parsing "0\0" css hack | |
+ $css_content = str_replace('min-width:0\\0', 'min-width:~"0\\0"', $css_content); | |
+ | |
$less = new Less(); | |
$css_content = $less->compile($css_content); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/design/backend/css/addons/tilda_pages/revert.css b/design/backend/css/addons/tilda_pages/revert.css | |
index 443da1b863..257ede953a 100644 | |
--- a/design/backend/css/addons/tilda_pages/revert.css | |
+++ b/design/backend/css/addons/tilda_pages/revert.css | |
@@ -1,3 +1,3 @@ | |
-.tilda-pages-container * { | |
+.tilda-pages-container *:not(.cm-block-loader *) { | |
all:revert; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment