Skip to content

Commit

Permalink
narrow screens now have buttons vertically aligned
Browse files Browse the repository at this point in the history
  • Loading branch information
pingfan-hu committed Sep 25, 2024
1 parent 73e2439 commit ef351ca
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 4 additions & 2 deletions R/ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,8 @@ sd_question <- function(
label = markdown_to_html(label),
choices = list_name_md_to_html(option),
direction = direction,
selected = character(0)
selected = character(0),
class = "narrow-screen-vertical"
)

output <- shiny::tagAppendChild(output, shiny::tags$script(shiny::HTML(sprintf("
Expand All @@ -244,7 +245,8 @@ sd_question <- function(
choices = list_name_md_to_html(option),
direction = direction,
individual = individual,
justified = FALSE
justified = FALSE,
class = "narrow-screen-vertical"
)

output <- shiny::tagAppendChild(output, shiny::tags$script(shiny::HTML(sprintf("
Expand Down
7 changes: 7 additions & 0 deletions inst/css/surveydown.css
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ p, .form-group, .control-label {
z-index: 2;
}

@media screen and (max-width: 767px) {
.radio-group-buttons .btn-group-container-sw,
.checkbox-group-buttons .btn-group-container-sw {
flex-direction: column;
}
}

/* Date range styling*/
.shiny-date-range-input .input-group-addon {
background: none;
Expand Down

0 comments on commit ef351ca

Please sign in to comment.