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

use dracula theme for prismjs #14

Merged
merged 5 commits into from
Oct 27, 2021
Merged

Conversation

gregone
Copy link
Contributor

@gregone gregone commented Oct 26, 2021

Fixes: #1

So this was a little more involved than I expected. The issue is that the dracula theme is not included in the prismjs node package, so passing that theme as an option didn't work. Additionally, when defining the theme in app.css it would be overriden by the one in vendor.css.

Solution:

  • set theme to 'none', which leaves the default theme in vendor.css
  • use app.import('app/styles/prism-dracula.css') in ember-cli-build.js to import the new theme after that and override the default

This is not the most elegant solution, but it seems to work.

@netlify
Copy link

netlify bot commented Oct 26, 2021

✔️ Deploy Preview for ember-a11y-for ready!

🔨 Explore the source changes: 4841069

🔍 Inspect the deploy log: https://app.netlify.com/sites/ember-a11y-for/deploys/6179584a19e236000a73255d

😎 Browse the preview: https://deploy-preview-14--ember-a11y-for.netlify.app/

@gregone gregone changed the title use dracula [WIP] use dracula Oct 27, 2021
@gregone gregone changed the title [WIP] use dracula use dracula Oct 27, 2021
@gregone
Copy link
Contributor Author

gregone commented Oct 27, 2021

@MelSumner this is ready for review, whenever you have some time.

@gregone gregone changed the title use dracula use dracula theme for prismjs Oct 27, 2021
Copy link
Owner

@MelSumner MelSumner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You did it! This is great! Thank you so much!! 🎉

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

Successfully merging this pull request may close these issues.

Add dracula theme for prism
2 participants