Color gradient is not showing when mapshot

I created customized legend and it is not showing when I save/mapshot... Please advise

library(leaflet)
library(tidyverse)

html_legend <- "
<div style='display: flex;align-items:center;'>
<span style='padding-right:5px;font-weight:bold;'>0</span>
<grad style='height:10px;width:80px;background:linear-gradient(90deg, #DF0020, #FFE500);'> </grad>
<span style='padding-left:5px;font-weight:bold;'>100</span>
</div>
"
leaflet(options = leafletOptions(minZoom = 0, maxZoom = 18, 
                                      attributionControl=FALSE)) %>% 
  addTiles() %>% 
  addMarkers(lng=174.768, lat=-36.852, popup = "The birthplace of R") %>% 
  addControl(html = html_legend, position = "bottomleft") %>% 
  mapview::mapshot(file = "x.png", remove_controls = NULL)