feat: resolve #7 theme_civilytics(): default to a transparent background, opt-in for Civilytics cream

This commit is contained in:
2026-07-04 23:03:42 -04:00
parent 761a72da18
commit fc9383555d
2 changed files with 18 additions and 12 deletions
+8 -1
View File
@@ -133,9 +133,16 @@ 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 has transparent background by default", {
th <- theme_civilytics()
expect_true(is.na(th$plot.background$fill))
expect_true(is.na(th$panel.background$fill))
})
test_that("theme_civilytics paper_bg=TRUE opt-in fills with cream", {
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 uses paper_2 for strip background by default", {