-
Notifications
You must be signed in to change notification settings - Fork 43
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
Add a "@context-class" or whatever for the preview of elements #39
Comments
If there were some rather generic use cases for this could something like the |
Flag could be a good entry. And maybe add few common use-case can be good. But:
Use "css class" let anyone define each case he want for each website. |
I generally agree, I'm a bit unsure of the original idea of @Flag as one use changes the preview of the component ( could argue that is context ), the other is to annotate deprecated patterns. I think having a css class to provide the context does give the most flexibility but means I have to write css in my application for the pattern library which seems at a bit of a crossed purpose. I guess 'context' is quite broad, substitutions can be used to give an element context if that context is another molecule or structure. Perhaps the configuration of Nucleus could take a css partial with some classnames that can be used for context. Main thing for me is I don't want to be writing styles that are only used to configure Nucleus previews within my applications styles. This is a good discussion though as it's a shortcoming in a fair few pattern library / style guide generators |
But on the nucleus config you can add multiples css files. Are you confortable to create a special file for the styleguide? |
It will be usefull to have a context option for atoms (and molecules, structures), to set a parent class around the markup for the preview mode.
Exemple:
The preview html will be:
I'm not sure that
@contextClass
is the best name.This feature let us re-use a 'clean' markup atom on a molecules or structures with an
include
.And let "site-editor" use "copy markup" button with a clean markup, without not needed markup (like the
Button
atom on nucleus demo)The text was updated successfully, but these errors were encountered: