From 0cadab8b51da62c1a5419dfe743b92857f5f4b8e Mon Sep 17 00:00:00 2001 From: pvictor Date: Thu, 3 Dec 2020 10:15:00 +0100 Subject: [PATCH] facet: css for grid responsive --- R/facets.R | 1 + inst/htmlwidgets/apexcharter.css | 3 +++ 2 files changed, 4 insertions(+) diff --git a/R/facets.R b/R/facets.R index 27d2ca0..6f1cb41 100644 --- a/R/facets.R +++ b/R/facets.R @@ -53,6 +53,7 @@ build_grid <- function(content, nrow = NULL, ncol = NULL, col_gap = "0px", row_g } } htmltools::tags$div( + class = "apexcharter-facet-container", style = "display: grid;", style = sprintf("grid-template-columns: repeat(%s, 1fr);", ncol), style = sprintf("grid-template-rows: repeat(%s, 1fr);", nrow), diff --git a/inst/htmlwidgets/apexcharter.css b/inst/htmlwidgets/apexcharter.css index 3c31d52..7eb29b2 100644 --- a/inst/htmlwidgets/apexcharter.css +++ b/inst/htmlwidgets/apexcharter.css @@ -6,3 +6,6 @@ box-shadow: 0 1px 28px -12px #3B4252; } +.apexcharter-facet-container > div { + min-width: 0; +}