alexanderdavide / slidev-theme-academic

Academic presentations with Slidev made simple 🎓
https://slidev-theme-academic.alexeble.de
MIT License
99 stars 31 forks source link

Theme is installed but cannot run #5

Closed dufourc1 closed 1 year ago

dufourc1 commented 1 year ago

Hi, sorry for my lack of better description: I just installed slidev (globally), and I wanted to try your theme. I followed the instruction on your readme (changed theme: academic) and got hit with:

[postcss] /Users/.../node_modules/slidev-theme-academic/styles/layout.css?v=a6ae9d4a:2:6: Unknown word
13:30:26 [vite] Internal server error: [postcss] /Users/.../node_modules/slidev-theme-academic/styles/layout.css?v=a6ae9d4a:2:6: Unknown word
  Plugin: vite:css
  File: /Users/.../node_modules/slidev-theme-academic/styles/layout.css?v=a6ae9d4a:2:6
  1  |  :root {
  2  |    // default theme color
     |        ^
  3  |    // can be overrided by uses `themeConfig` option
  4  |    --slidev-theme-primary: #5d8392;

Any idea what could be the cause ?

dufourc1 commented 1 year ago

The issue came from using UniCSS, Windi CSS works just fine 👍🏽

alexanderdavide commented 1 year ago

Hey, thanks for using the theme!

The issue came from using Uno CSS, Windi CSS works just fine 👍🏽

Despite you seem to happy with using Windi CSS, can you please elaborate what caused your issue? Did you try to use Uno CSS utilities in your markup? An example would be helpful.

ani-per commented 1 year ago

This issue appears to be because some CSS parsers don't consider // as valid syntax to denote a comment. Switch to the following and the issue is fixed:

:root {
  /* default theme color */
  /* can be overrided by uses `themeConfig` option */
  --slidev-theme-primary: #5d8392;
}