Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style_bootstrap refactor #360

Open
wants to merge 70 commits into
base: main
Choose a base branch
from
Open

Conversation

vincentarelbundock
Copy link
Owner

@vincentarelbundock vincentarelbundock commented Oct 11, 2024

SPANNING CELL TEST SNAPSHOT HAS BAD LAST LINE

TODO:

  • bootstrap_css: controls width
  • bootstrap_css_rule: ??
  • tt(dat) |> style_tt(j = 1:3, align = "lcr")
  • tt(tab) |> style_tt(bootstrap_class = "table-bordered")
  • tt(x, theme = "void") |> style_tt(i = 0, line = "t", line_color = "orange", line_width = 0.4)
  • tt(x) |> group_tt() indentation
  • tt(x) |> style() after groups are not aligned
Q
pkgload::load_all()
# font sizes
fs <- seq(.1, 2, length.out = 20)
# headless table
k <- data.frame(matrix(fs, ncol = 5))
colnames(k) <- NULL
# colors
bg <- hcl.colors(20, "Inferno")
fg <- ifelse(as.matrix(k) < 1.7, tail(bg, 1), head(bg, 1))
# table
tt(k, width = .7, theme = "void") |>
  style_tt(j = 1:5, align = "ccccc") |>
  style_tt(
    i = 1:4,
    j = 1:5,
    color = fg,
    background = bg,
    fontsize = fs) |>
    print("html")

@vincentarelbundock
Copy link
Owner Author

FYI, @J-Moravec This is a proof of concept work in progress. Doesn't support line styling or custom bootstrap classes, but it seems to solve our problem.

timings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant