I create a lot of R Markdown files using the shiny runtime that have multiple interactive components, usually each one is wrapped in shinyUI(). I would like to be able to style the different interactive sections separately, but haven't been able to figure out how. I have tried using includeCSS() in different fluidPage() components, but the first one is always loaded and the rest ignored. Can this be done easily?
I've never tried having multiple shinyUI() on the same page, but here's what I can think of:
Wrap each shiny app in an html tag with a different id, load all the css in one script, and in the css rules just specify which id the rule should fall under
Related
I'm currently working on a DASH\Plotly app. I am using dash-bootstrap-components with a custom CSS file.
My current problem is, that my plots aren't styled from the CSS file. So they don't perfectly match with the rest of the theme. From what I found this functionality is not possible.
https://plotly.com/python/templates
Is there maybe a possibility to generate a custom plotly.io Template for the plots which is generated from the CSS file? So that the colors, fonts, fontsizes inside the plots match to the rest of the app.
Meteor template are great for different data in the same style.
What if thousands of pages have to have their own style? I assume this will require all pages to have their own template.
For example, how could I store and fetch javascript animations?
Is there any easy way to do this or do they have to be individual template files?
I've been able to customize the style of pages dynamically (using JS) by using the package ccorcos:reactive-css. It lets you create CSS style sheets using JavaScript and using that you can adjust it depending on what page is being shown, or what data is coming from the DB.
You could even generate JS animations on the fly.
Is it possible to apply customize css file to change appearance of dataTable in R Shiny? I tried applying
shinyUI(fluidPage(theme = "bootstrap.css",
at the beginning but it does not effect the row colour of the table.
You need to first create a 'www' directory inside your app directory. Download "bootstrap.css" and put it in there.
Compile and run!
It must work.
I have generated a pdf file using third party now I want apply my own style to the content in pdf.
Can I insert an External CSS File into a generate PDF.
I have tried many ways but all is not working.
Thanks,
You cannot style an already generated PDF with CSS. It is not made out of selectable elements and there is no way to link the CSS to the PDF.
You will have to do the styling before the PDF is created. It's like trying to add more sugar to an already baked cake, there is no way to do it.
I see that the jquery UI distribution contains 15 css files. The jquery.ui.all.css file contains two #import statements -- one for jquery.ui.base.css and another for jquery.ui.theme.css.
The jquery.ui.base.css itself contains 11 import statements for jquery.ui.core.css and then each of the widgets.
I also see a single (larger than others in the folder) file called jquery-ui.css.
Am I off in thinking that if I want all the CSS for a given theme then linking the single jquery-ui.css works but if I want to customize the pieces that I download then importing jquery.ui.all.css and customizing jquery.ui.base.css is the way to go?
Am I not understanding something?
You should use the jquery-ui.css. If you don't need certain widgets, you can uncheck them when making your (custom) jQuery UI and they won't be included.