GithubHelp home page GithubHelp logo

juicyjuice's Introduction



CRAN status R build status Linting

Monthly Downloads Total Downloads

Contributor Covenant



With the juicyjuice package it’s fairly easy to transform HTML such that all CSS is inlined directly into HTML tags.

So this:

<style>div{color:blue;}</style><div/>

Will turn to this:

<div style="color: blue;"></div>

Why do this? An important use case is HTML email and this is mainly because of Outlook on Windows (it does not support multiple classes on elements). Furthermore CSS inlining can help preserve a decent layout in email clients that do not support embedded CSS (in <style> tags), or, when an email is forwarded. Here's another reason to use this: embedding HTML in 3rd-party websites.

This R package contains a single function, css_inline(), where the only input required is a string of HTML text. It uses the juice JavaScript library (https://github.com/Automattic/juice), which is (1) well-tested, (2) very performant, and (3) has lots of great features. The aformentioned function will return a string of CSS-inlined HTML.

INSTALLATION

The juicyjuice package can be installed from CRAN with:

install.packages("juicyjuice")

You can also choose to install the development version of juicyjuice from GitHub:

devtools::install_github("rstudio/juicyjuice")

If you encounter a bug, have usage questions, or want to share ideas to make this package better, please feel free to file an issue.

Code of Conduct

Please note that the juicyjuice project is released with a contributor code of conduct.
By participating in this project you agree to abide by its terms.

πŸ“„ License

juicyjuice is licensed under the MIT license. See the LICENSE.md file for more details.

Β© Posit Software, PBC.

πŸ›οΈ Governance

This project is primarily maintained by Rich Iannone. Should there also be other authors, they might occasionally assist with some of these duties.

juicyjuice's People

Contributors

olivroy avatar rich-iannone avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

juicyjuice's Issues

Make package juicier overall

The package has one function with no options. Maybe add some options? The juice library has them, this does not. That’s the underlying issue.

Release juicyjuice 0.1.0

First release:

Prepare for release:

  • git pull
  • Check if any deprecation processes should be advanced, as described in Gradual deprecation
  • urlchecker::url_check()
  • devtools::check(remote = TRUE, manual = TRUE)
  • devtools::check_win_devel()
  • rhub::check_for_cran()
  • git push
  • Draft blog post

Submit to CRAN:

  • usethis::use_version('minor')
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted πŸŽ‰
  • git push
  • usethis::use_github_release()
  • usethis::use_dev_version()
  • usethis::use_news_md()
  • git push
  • Finish blog post
  • Tweet
  • Add link to blog post in pkgdown news menu

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.