-
Notifications
You must be signed in to change notification settings - Fork 94
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
Build single level files #69
Comments
This or the ability to choose which level you want to see by checking something in a control box. This would certainly require some Javascript but I think it could be amazing and more simple/fast to use. |
Great 👍 |
Yup, I'd love to do this without requiring Javascript, but any solution would be great :) Please note that this is note the most important issue at this moment, but will be in a few weeks ;) |
You can do it with radio buttons or checkboxes and CSS pseudo-classes but it would require adding HTML. Do you think of any other way to do it @hugogiraudel ? |
Na. The Sass Way™. |
You already can do it pretty easily but it requires a few actions. I was thinking about simply add some files, like "a11y-en_errors.scss" that would compile when running Sass. Easy, but needs to duplicate files. I'm quite sure Hugo has his own way in mind already :D |
Okay, so I have an idea to make it work with nothing more than a Sass configuration mixin, exactly the same as we did for the language. The ideaI went with the following idea, inspired by PHP/Apache logs:
You would define which level you want in the main file, aside with the language: @charset "UTF-8";
@import "utils/all";
@include set-locale("fr");
@include set-minimum-level("advice"); // Display everything
@import "base/base";
@import "themes/all"; Building the
|
This is perfect, it will only require to set the right level and job's done :) I'd love a PR for this ! |
Mind blowing, nice job :) |
Done in #70. Please review, test and document before merging. |
Added level handler as discussed in #69
PR merged, only waiting for the SassDoc to close this issue :) Thanks ! |
Having a single file for each level may be very useful for some users, in order to display only errors for example.
Should not be complicated.
The text was updated successfully, but these errors were encountered: