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

Rename themes back to .css from .html #241

Closed
vincerubinetti opened this issue Jul 1, 2019 · 3 comments · Fixed by #409
Closed

Rename themes back to .css from .html #241

vincerubinetti opened this issue Jul 1, 2019 · 3 comments · Fixed by #409

Comments

@vincerubinetti
Copy link
Collaborator

Even though the theme files are technically .html (well, they're really fragments of a valid .html file), I think we should rename them back to .css. For those who know what CSS is, they might be looking around for where to modify the CSS, and would be confused to find it in an HTML file, probably.

@dhimmel
Copy link
Member

dhimmel commented Jul 1, 2019

Hmm but these are not valid .css files due to being wrapped in <style>:

<!-- default theme -->
<style>
/* import google fonts */

Therefore I think just changing the extension would mess up syntax highlighting, linting, and the semantics of inserting this file directly into an HTML document.

Would using a name like default-css.html or default-style.html help with the confusion?

Also are we sure that we'll never need to put other HTML content other than style in the default theme?

@vincerubinetti
Copy link
Collaborator Author

vincerubinetti commented Jul 1, 2019

would mess up syntax highlighting, linting

I think these things can be configured such that the file is just treated like an HTML file. Some linters may even be smart enough to just recognize that it's html automatically.

But also, if we're talking about semantics, this file really truly is a CSS file. And I don't think we'll ever need to add anything else but CSS to it.

Maybe we can get rid of the surrounding <style> tags, and import it into the html export through the pandoc template, similar to how mathjax is currently being included. So the file would end up being only CSS, and the surrounding <style> or <link> tag necessary to import it correctly would reside in the template

@agitter
Copy link
Member

agitter commented Jul 4, 2019

Removing the <style> tags and making this a .css file or renaming the existing file default-css.html both seem like reasonable solutions. I added a reference to this file in #245, which may partly help as well.

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

Successfully merging a pull request may close this issue.

3 participants