From c127d656055d1b9bfdf54191b3400a4abbb1065b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Sojka?= Date: Mon, 12 May 2025 22:56:32 +0200 Subject: [PATCH] Fix colour picker preview page not displaying correctly (#2321) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: codecalm Co-authored-by: Paweł Kuna <1282324+codecalm@users.noreply.github.com> --- .changeset/dry-mails-fix.md | 5 + preview/pages/illustrations.html | 4 +- shared/data/site.json | 164 +++++++++++++++++--------- shared/includes/docs/colors.html | 4 +- shared/includes/layout/js-libs.html | 2 +- shared/includes/ui/chart-heatmap.html | 2 +- shared/includes/ui/colorpicker.html | 2 +- 7 files changed, 121 insertions(+), 62 deletions(-) create mode 100644 .changeset/dry-mails-fix.md diff --git a/.changeset/dry-mails-fix.md b/.changeset/dry-mails-fix.md new file mode 100644 index 000000000..3906b6f82 --- /dev/null +++ b/.changeset/dry-mails-fix.md @@ -0,0 +1,5 @@ +--- +"@tabler/core": patch +--- + +Fix colour picker preview page not displaying correctly diff --git a/preview/pages/illustrations.html b/preview/pages/illustrations.html index b15101f21..4189c4dcd 100644 --- a/preview/pages/illustrations.html +++ b/preview/pages/illustrations.html @@ -142,8 +142,8 @@ permalink: illustrations.html {% capture_script %} + {% endfor -%} {% endif -%} {% endfor -%} diff --git a/shared/includes/ui/chart-heatmap.html b/shared/includes/ui/chart-heatmap.html index 9190fa4e5..631882fd7 100644 --- a/shared/includes/ui/chart-heatmap.html +++ b/shared/includes/ui/chart-heatmap.html @@ -56,7 +56,7 @@ document.addEventListener("DOMContentLoaded", function () { } }, {% else %} - colors: [{% if include.color %}'{{ include.color }}'{% else %}{% for color in site.colors limit: colors %}"{{ color[1].hex }}", {% endfor %}{% endif %}], + colors: [{% if include.color %}'{{ include.color }}'{% else %}{% for color in site.colors limit: colors %}"{{ color[1].prop }}", {% endfor %}{% endif %}], {% endif %} series: [ {% for i in site.months-short limit: 12 %} diff --git a/shared/includes/ui/colorpicker.html b/shared/includes/ui/colorpicker.html index 4d5ca5fe4..1ed4fa431 100644 --- a/shared/includes/ui/colorpicker.html +++ b/shared/includes/ui/colorpicker.html @@ -19,7 +19,7 @@ {% if include['swatches-only'] %}swatchesOnly: true,{% endif %} swatches: [ {% for color in site.colors %} - "{{ color[1].hex }}", + window.getComputedStyle(document.body).getPropertyValue('{{ color[1].prop }}'), {% endfor %} ], }))