Font size of table caption won't be changed
diff --git a/R/kable_styling.R b/R/kable_styling.R
index 05a95cc..05ede9c 100644
--- a/R/kable_styling.R
+++ b/R/kable_styling.R
@@ -122,6 +122,10 @@
if (!is.null(font_size)) {
kable_xml_style <- c(kable_xml_style,
paste0("font-size: ", font_size, "px;"))
+ kable_caption_node <- xml_tpart(kable_xml, "caption")
+ if (!is.null(kable_caption_node)) {
+ xml_attr(kable_caption_node, "style") <- "font-size: initial !important;"
+ }
}
if (!full_width) {
kable_xml_style <- c(kable_xml_style, "width: auto !important;")