Skip to content

Commit 9d55fe0

Browse files
committed
chore: remove the css file in favor of inline styles
1 parent 4019aff commit 9d55fe0

File tree

8 files changed

+15
-123
lines changed

8 files changed

+15
-123
lines changed

R/tm_a_pca.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,6 @@ ui_a_pca <- function(id, ...) {
229229
}
230230

231231
tagList(
232-
include_css_files("custom"),
233232
teal.widgets::standard_layout(
234233
output = teal.widgets::white_small_well(
235234
uiOutput(ns("all_plots"))

R/tm_file_viewer.R

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,12 @@ ui_viewer <- function(id, ...) {
103103
ns <- NS(id)
104104

105105
tagList(
106-
include_css_files("custom"),
107106
teal.widgets::standard_layout(
108107
output = tags$div(
109108
uiOutput(ns("output"))
110109
),
111110
encoding = tags$div(
112-
class = "file_viewer_encoding",
111+
style = "overflow-y: hidden; overflow-x: auto;",
113112
tags$label("Encodings", class = "text-primary"),
114113
shinyTree::shinyTree(
115114
ns("tree"),
@@ -173,7 +172,7 @@ srv_viewer <- function(id, input_path) {
173172
tags$img(src = con_type$selected_path, alt = "file does not exist")
174173
} else if (file_extension == "pdf") {
175174
tags$embed(
176-
class = "embed_pdf",
175+
style = "height: 600px; width: 100%;",
177176
src = con_type$selected_path
178177
)
179178
} else if (!isFALSE(con_type$output_text[1])) {

R/tm_front_page.R

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,33 +119,32 @@ ui_front_page <- function(id, ...) {
119119
ns <- NS(id)
120120

121121
tagList(
122-
include_css_files("custom"),
123122
tags$div(
124123
id = "front_page_content",
125-
class = "ml-8",
124+
style = "margin-left: 2rem;",
126125
tags$div(
127126
id = "front_page_headers",
128127
get_header_tags(args$header_text)
129128
),
130129
tags$div(
131130
id = "front_page_tables",
132-
class = "ml-4",
131+
style = "margin-left: 2rem;",
133132
get_table_tags(args$tables, ns)
134133
),
135134
tags$div(
136135
id = "front_page_custom_html",
137-
class = "my-4",
136+
style = "margin-left: 2rem;",
138137
args$additional_tags
139138
),
140139
if (length(args$datanames) > 0L) {
141140
tags$div(
142141
id = "front_page_metabutton",
143-
class = "m-4",
142+
style = "margin: 1rem;",
144143
actionButton(ns("metadata_button"), "Show metadata")
145144
)
146145
},
147146
tags$footer(
148-
class = ".small",
147+
class = "small",
149148
get_footer_tags(args$footnotes)
150149
)
151150
)

R/tm_g_scatterplot.R

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -362,11 +362,10 @@ ui_g_scatterplot <- function(id, ...) {
362362
)
363363

364364
tagList(
365-
include_css_files("custom"),
366365
teal.widgets::standard_layout(
367366
output = teal.widgets::white_small_well(
368367
teal.widgets::plot_with_settings_ui(id = ns("scatter_plot")),
369-
tags$h1(tags$strong("Selected points:"), class = "text-center font-150p"),
368+
tags$h1(tags$strong("Selected points:"), style = "text-align: center !important; font-size: 150%;"),
370369
teal.widgets::get_dt_rows(ns("data_table"), ns("data_table_rows")),
371370
DT::dataTableOutput(ns("data_table"), width = "100%")
372371
),
@@ -470,16 +469,16 @@ ui_g_scatterplot <- function(id, ...) {
470469
tags$div(
471470
id = ns("label_pos"),
472471
tags$div(tags$strong("Stats position")),
473-
tags$div(class = "inline-block w-10", helpText("Left")),
472+
tags$div(style = "display: inline-block; width: 70%;", helpText("Left")),
474473
tags$div(
475-
class = "inline-block w-70",
474+
style = "display: inline-block; width: 70%;",
476475
teal.widgets::optionalSliderInput(
477476
ns("pos"),
478477
label = NULL,
479478
min = 0, max = 1, value = .99, ticks = FALSE, step = .01
480479
)
481480
),
482-
tags$div(class = "inline-block w-10", helpText("Right"))
481+
tags$div(style = "display: inline-block; width: 10%;", helpText("Right"))
483482
),
484483
teal.widgets::optionalSliderInput(
485484
ns("label_size"), "Stats font size",

R/tm_missing_data.R

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,6 @@ tm_missing_data <- function(label = "Missing data",
183183
ui_page_missing_data <- function(id, pre_output = NULL, post_output = NULL) {
184184
ns <- NS(id)
185185
tagList(
186-
include_css_files("custom"),
187186
teal.widgets::standard_layout(
188187
output = teal.widgets::white_small_well(
189188
uiOutput(ns("dataset_tabs"))
@@ -372,9 +371,9 @@ encoding_missing_data <- function(id, summary_per_patient = FALSE, ggtheme, data
372371
uiOutput(ns("variables")),
373372
actionButton(
374373
ns("filter_na"),
375-
tags$span("Select only vars with missings", class = "whitespace-normal"),
374+
tags$span("Select only vars with missings", style = "white-space: normal;"),
376375
width = "100%",
377-
class = "mb-4"
376+
style = "margin-bottom: 1rem;"
378377
),
379378
conditionalPanel(
380379
is_tab_active_js(ns("summary_type"), "Summary"),

R/tm_variable_browser.R

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ ui_variable_browser <- function(id,
142142
ns <- NS(id)
143143

144144
tags$div(
145-
include_css_files("custom"),
146145
shinyjs::useShinyjs(),
147146
teal.widgets::standard_layout(
148147
output = tags$div(
@@ -236,11 +235,11 @@ srv_variable_browser <- function(id,
236235
tabPanel(
237236
dataname,
238237
tags$div(
239-
class = "mt-4",
238+
style = "margin-top: 1rem;",
240239
textOutput(ns(paste0("dataset_summary_", dataname)))
241240
),
242241
tags$div(
243-
class = "mt-4",
242+
style = "margin-top: 1rem;",
244243
teal.widgets::get_dt_rows(
245244
ns(paste0("variable_browser_", dataname)),
246245
ns(paste0("variable_browser_", dataname, "_rows"))

R/utils.R

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -234,29 +234,6 @@ variable_type_icons <- function(var_type) {
234234
))
235235
}
236236

237-
#' Include `CSS` files from `/inst/css/` package directory to application header
238-
#'
239-
#' `system.file` should not be used to access files in other packages, it does
240-
#' not work with `devtools`. Therefore, we redefine this method in each package
241-
#' as needed. Thus, we do not export this method
242-
#'
243-
#' @param pattern (`character`) optional, regular expression to match the file names to be included.
244-
#'
245-
#' @return HTML code that includes `CSS` files.
246-
#' @keywords internal
247-
#'
248-
include_css_files <- function(pattern = "*") {
249-
css_files <- list.files(
250-
system.file("css", package = "teal.modules.general", mustWork = TRUE),
251-
pattern = pattern, full.names = TRUE
252-
)
253-
if (length(css_files) == 0) {
254-
return(NULL)
255-
}
256-
singleton(tags$head(lapply(css_files, includeCSS)))
257-
}
258-
259-
#' JavaScript condition to check if a specific tab is active
260237
#'
261238
#' @param id (`character(1)`) the id of the tab panel with tabs.
262239
#' @param name (`character(1)`) the name of the tab.

inst/css/custom.css

Lines changed: 0 additions & 79 deletions
This file was deleted.

0 commit comments

Comments
 (0)