Trying to incorporate a zoom
feature into my ShinyDashboard
to enhance the layout aesthetics at 80% zoom level on web browsers.
Came across an SO article for a Shiny
app, but unfortunately, it doesn't translate well to Shinydashboard
. Applying the CSS code results in excessive white space.
Link to SO Article: Zoom out shiny app at default in browser
Here's a simple example of the code:
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)