linne makes basic CSS easier for R users. It is intended as a stepping stone to actually writing CSS and Sass.
Linne is old Gaelic for cascade
Install the stable version from CRAN.
install.packages("linne")
Or install the development version from Github.
# install.packages("remotes")
remotes::install_github("JohnCoene/linne")
Using linne to place a floating logo in the top right of a shiny app.
library(shiny)
library(linne)
linne <- Linne$
new()$
rule(
sel_id("logo"), # select id = logo
position = "absolute",
top = 20,
right = 20,
maxHeight = 75,
zIndex = 9999
)
ui <- fluidPage(
linne$include(),
h2("Basic usage of {linne}"),
img(src = "https://www.r-project.org/logo/Rlogo.png", id = "logo"),
plotOutput("plot")
)
server <- function(input, output){
output$plot <- renderPlot(plot(cars))
}
shinyApp(ui, server)