Skip to content

Commit c792a25

Browse files
committed
Enhance CSS styles for responsive design in data availability plot
1 parent 1f63a78 commit c792a25

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tools/generate_data_availability_plot.R

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,16 +422,20 @@ if (requireNamespace("ggiraph", quietly = TRUE) && requireNamespace("htmlwidgets
422422
# Inject CSS styles in head
423423
css_styles <- paste0(
424424
"<head>\n<style>\n",
425-
" html, body {\n",
425+
" html, body, #htmlwidget_container, .htmlwidget, .girafe, .html-fill-item, .html-fill-container {\n",
426426
" margin: 0 !important;\n",
427427
" padding: 0 !important;\n",
428428
" width: 100% !important;\n",
429429
" height: 100% !important;\n",
430+
" max-width: 100% !important;\n",
431+
" max-height: 100% !important;\n",
430432
" overflow: hidden !important;\n",
431433
" }\n",
432434
" svg {\n",
433435
" width: 100% !important;\n",
434436
" height: 100% !important;\n",
437+
" max-width: 100% !important;\n",
438+
" max-height: 100% !important;\n",
435439
" }\n",
436440
"</style>"
437441
)

0 commit comments

Comments
 (0)