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

Support for the sass/scss syntax #310

Closed
3 tasks done
abichat opened this issue Apr 28, 2021 · 1 comment · Fixed by #311
Closed
3 tasks done

Support for the sass/scss syntax #310

abichat opened this issue Apr 28, 2021 · 1 comment · Fixed by #311

Comments

@abichat
Copy link

abichat commented Apr 28, 2021

With the latest version of rmarkdown, it is now possible to use the sass and scss syntax to have more intelligible and elaborate style sheets.

However, using this type of files with xaringan (0.20.2) leads to the following error:

Erreur : "theme.scss" is not a valid xaringan theme. Use `xaringan:::list_css()` to view all built-in themes.
Exécution arrêtée

It would be a great enhancement to support sass and scss syntax too :)

Thanks!


By filing an issue to this repo, I promise that

  • I have fully read the issue guide at https://yihui.org/issue/.
  • I have provided the necessary information about my issue.
    • If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
    • If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included xfun::session_info('xaringan'). I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: remotes::install_github('yihui/xaringan').
    • If I have posted the same issue elsewhere, I have also mentioned it in this issue.
  • I have learned the Github Markdown syntax, and formatted my issue correctly.

I understand that my issue may be closed if I don't fulfill my promises.

@cderv
Copy link
Collaborator

cderv commented Apr 29, 2021

After looking into it, moon_reader() is using html_document() as base format and css argument is passed to it. So as the latter support .scss, the former should be able to benefit from that.

Currently it does not work only because a check is done: if css argument contained another thing that a filename ending with .css, it is considered as a built in theme.

theme = grep('[.]css$', css, value = TRUE, invert = TRUE)

I think if we just relax this check, this would work.

We plan to latter offer better support for theming built in xaringan in other tools, but this would be only a way to benefit from new rmarkdown support for now.

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

Successfully merging a pull request may close this issue.

3 participants