Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

fix class name typo and include it in safelist (#2610)

ruslandogae3f095ade7e7
diff --git a/assets/tailwind.config.js b/assets/tailwind.config.js
index f16810db02..31e45703ad 100644
--- a/assets/tailwind.config.js
+++ b/assets/tailwind.config.js
@@ -5,6 +5,11 @@ module.exports = {
'./js/**/*.js',
'../lib/plausible_web/templates/**/*.html.eex',
],
+ safelist: [
+ // PlausibleWeb.StatsView.stats_container_class/1 uses this class
+ // it's not used anywhere else in the templates or scripts
+ "max-w-screen-lg"
+ ],
darkMode: 'class',
theme: {
container: {
diff --git a/lib/plausible_web/views/stats_view.ex b/lib/plausible_web/views/stats_view.ex
index faf6515834..fff724621e 100644
--- a/lib/plausible_web/views/stats_view.ex
+++ b/lib/plausible_web/views/stats_view.ex
@@ -52,7 +52,7 @@ defmodule PlausibleWeb.StatsView do
def stats_container_class(conn) do
cond do
conn.assigns[:embedded] && conn.assigns[:width] == "manual" -> ""
- conn.assigns[:embedded] -> "max-width-screen-lg mx-auto"
+ conn.assigns[:embedded] -> "max-w-screen-lg mx-auto"
!conn.assigns[:embedded] -> "container"
end
end