Closed jeremiahpslewis closed 9 years ago
the {{ID}}
helper (check the function help) doesn't target each
specifically?
On Wed, Aug 12, 2015 at 3:08 PM, jlewis91 notifications@github.com wrote:
When a css rule is added to a single graphic, e.g. tau_add_css_rule(".axis_rooty:not(.facet-axis) .tick:nth-child(2n+2) text {opacity: 0;}"), the rule takes effect for all graphics on the .Rmd HTML page. It's probably a good idea to nest all rules within a chart id, so that different themes can be applied to different graphics.
— Reply to this email directly or view it on GitHub https://github.com/hrbrmstr/taucharts/issues/39.
Thanks. Sorry, missed that in the documentation. What do you think about throwing a message when {{ID}} is not part of a css rule? It doesn't seem like a great idea to use a html widget to inject page-wide css.
if(!grepl(css_grep, css)) {message("CSS Rules without {{ID}} are applied to entire document.")}
I think that could be arranged :-)
On Wed, Aug 12, 2015 at 3:32 PM, jlewis91 notifications@github.com wrote:
if(!grepl(css_grep, css)) {message("CSS Rules without {{ID}} are applied to entire document.")}
— Reply to this email directly or view it on GitHub https://github.com/hrbrmstr/taucharts/issues/39#issuecomment-130420626.
Thanks! Looks great.
When a css rule is added to a single graphic, e.g.
tau_add_css_rule(".axis_rooty:not(.facet-axis) .tick:nth-child(2n+2) text {opacity: 0;}")
, the rule takes effect for all graphics on the .Rmd HTML page. It's probably a good idea to nest all rules within a chart id, so that different themes can be applied to different graphics.