Open mfherman opened 3 years ago
Hi there!
I have a hypothesis 😄 I believe filter_select()
introduces bootstrap, since the docs state:
https://rdrr.io/cran/crosstalk/man/filter_select.html
"Creates a select box or list of checkboxes"
I believe crosstalk
will bring in bootstrap if you use:
But not:
Yes, that makes sense! I'm not seeing the issue just using filter_slider()
:
---
title: "Crosstalk Distill"
output: distill::distill_article
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
library(crosstalk)
shared_iris <- SharedData$new(iris)
filter_slider(
id = "sepal",
label = "Sepal Lenth",
sharedData = shared_iris,
column = ~Sepal.Length
)
Distill is a publication format for scientific and technical writing, native to the web.
Learn more about using Distill for R Markdown at https://rstudio.github.io/distill.
![image](https://user-images.githubusercontent.com/24945757/103368508-ac865780-4a95-11eb-95cb-285e700641c4.png)
So given that bootstrap appears to be the culprit, is there a way to have it not interfere with the distill formatting or do bootstrap and distill just not play well together?
Bootstrap in general clobbers all site-level styling. It happens with every blogdown site (not based on bootstrap) as well. I suspect an immediate workaround involves iframes.
Got it! I'll poke around and see what I can make work for now.
Got it! I'll poke around and see what I can make work for now.
I ran into a similar issue and this helped me: https://github.com/rstudio/crosstalk/issues/26
The unstrap()
function from govdown can help. Worked for me. 👍🏽
Hii @mfherman and others in this thread: we have worked to remove the Bootstrap dependency of crosstalk
- please give it a try again in distill!
https://github.com/rstudio/crosstalk/blob/master/NEWS.md#crosstalk-1119000
remotes::install_github("rstudio/crosstalk")
Hii @mfherman and others in this thread: we have worked to remove the Bootstrap dependency of
crosstalk
- please give it a try again in distill!https://github.com/rstudio/crosstalk/blob/master/NEWS.md#crosstalk-1119000
remotes::install_github("rstudio/crosstalk")
I've tried it (locally) and it was very neat. Thanks!
I noticed this issue when trying to use crosstalk with Leaflet and DT in a distill article. I'm not savvy enough to figure out where in the HTML or CSS the problem is introduced, but it appears that when using a
filter_*
function from crosstalk, the formatting (font, text size, in particular) in the rest of distill article changes. I'm not sure if this issue belongs here or in crosstalk, but I haven't had the same issue when using crosstalk filters with other R Markdown templates.Here are two sample Rmds that exhibit the behavior. The first is the default distill output:
Distill is a publication format for scientific and technical writing, native to the web.
Learn more about using Distill for R Markdown at https://rstudio.github.io/distill.
title: "Crosstalk Distill" output: distill::distill_article
Distill is a publication format for scientific and technical writing, native to the web.
Learn more about using Distill for R Markdown at https://rstudio.github.io/distill.