-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Switch from Stylus to CSS #636
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
Conversation
I doubt this will be very hard. We need to figure out what themes are available anyway (probably via some |
And fix some small errors from Stylus -> CSS conversion.
Looks like I pushed e300d48 to the wrong branch... but it's fine being here. There aren't any changes since elasticlunr-rs 0.2.2, I'm just following the semver guide:
|
I looked into implementing theme support with this. It gets a bit more complicated since themes will want to be able to set the theme used by |
I should cc @sorin-davidoi @azerupi @budziq for your opinions. |
I agree. There are definitely ways we can hack in setting the theme used by Either way, that probably comes under the larger umbrella of defining some sort of public interface so people can tweak themes. It's kinda related, but I'd say that issue is orthogonal to whether we use CSS or Stylus or whatever. |
This is a big change in direction, so it deserves some consensus. I'm pretty happy with the end result, though, so I decided to just submit a PR.
Moving from Stylus has been discussed before, but to summarize:
book.css
isn't the real source for styling, or who don't understand Stylus syntax.That last point is really cool because by just using CSS+variables, it's really easy to add custom theme support. The only change we'd need to make is add a config option for themes (just to make it easy to add the theme to the theme menu), and then include their CSS file which defines the same variables that the other themes do.
Here's what this PR does:
Having lots of small files is annoying to deal with in our current theme implementation (fixing that is
another discussion), and it's bad for page load times. While we could use a build step to concatenate
it's much simpler to not, and we don't actually have enough CSS to need many files. We could easily
just have one stylesheet, but I liked having a little bit of organization.
Closes #616.