-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Default theme override structure #571
Comments
Maybe you can use |
Ofcourse I can, both |
Can anyone confirm 2f53f2f fixed this issue? If so, it can be closed. |
@FistMeNaruto Yes, it has been fixed in f998802 |
Feature request
What problem does this feature solve?
Currently, the override.styl is unable to override style declarations properly, only variable overrides work as they should. This is due to
config.styl
being required at the top of most.styl
files. This preventsoverride.styl
declarations from working, since they are outputted before the default theme styles. This structure also has a side effect of repeating the style declarations (because they are required multiple times)Here is an example:
Output for
.content code
elementHow should this be implemented in your opinion?
I would suggest implementing 2 override files (styleOverride and variableOverride ? ). Keep
variableOverride
import at the bottom ofconfig.styl
and addstyleOverride
import at the bottom oftheme.styl
file. This would allow to override both variable and style declarations. To prevent breaking changes,variableOverride
could be kept namedoverride.styl
While webpack does a good job of stripping the repeated styles in production build, I don't see a reason to
@require './config.styl'
in all the files. Requiring it once at the top oftheme.styl
should be sufficient, right?EDIT: After inspecting this a bit more, the repeated style declarations apparently come from theme components, as most of them
@require
theconfig.styl
Are you willing to work on this yourself?**
Yes, after getting a permission.
The text was updated successfully, but these errors were encountered: