feat: resolve #7 theme_civilytics(): default to a transparent background, opt-in for Civilytics cream
This commit is contained in:
@@ -133,9 +133,10 @@ test_that("theme_civilytics uses brand ink color for text", {
|
||||
expect_equal(th$text$colour, unname(civilytics_colors["ink"]))
|
||||
})
|
||||
|
||||
test_that("theme_civilytics uses brand paper color for plot background", {
|
||||
test_that("theme_civilytics defaults to transparent plot background", {
|
||||
th <- theme_civilytics()
|
||||
expect_equal(th$plot.background$fill, unname(civilytics_colors["paper"]))
|
||||
expect_true(is.na(th$plot.background$fill))
|
||||
expect_true(is.na(th$panel.background$fill))
|
||||
})
|
||||
|
||||
test_that("theme_civilytics uses paper_2 for strip background by default", {
|
||||
@@ -178,10 +179,10 @@ test_that("theme_civilytics grid parameter controls gridlines", {
|
||||
expect_s3_class(th_none$panel.grid.major.y, "element_blank")
|
||||
})
|
||||
|
||||
test_that("theme_civilytics paper_bg=FALSE gives transparent background", {
|
||||
th <- theme_civilytics(paper_bg = FALSE)
|
||||
expect_true(is.na(th$plot.background$fill))
|
||||
expect_true(is.na(th$panel.background$fill))
|
||||
test_that("theme_civilytics paper_bg=TRUE gives cream paper background", {
|
||||
th <- theme_civilytics(paper_bg = TRUE)
|
||||
expect_equal(th$plot.background$fill, unname(civilytics_colors["paper"]))
|
||||
expect_equal(th$panel.background$fill, unname(civilytics_colors["paper"]))
|
||||
})
|
||||
|
||||
test_that("theme_civilytics has plot-aligned title and caption", {
|
||||
|
||||
Reference in New Issue
Block a user