I am trying to implement zoom
on my ShinyDashboard
as the layout looks better when it is at 80% zoom for the web browser.
I found an article on SO for a Shiny
app, however, it doesn't work for Shinydashboard
. When I implement the CSS, I get a lot of dead white space.
Article to SO: Zoom out shiny app at default in browser
Simple Code Example:
library(shiny)
library(shinydashboard)
header <- dashboardHeader()
sidebar <- dashboardSidebar()
body <- dashboardBody(
tags$style("
body {
-moz-transform: scale(0.8, 0.8); /* Moz-browsers */
zoom: 0.8; /* Other non-webkit browsers */
zoom: 80%; /* Webkit browsers */
}
"),
"test")
ui <- dashboardPage(header, sidebar, body)
server <- function(input, output, session) {}
shinyApp(ui, server)