-
Notifications
You must be signed in to change notification settings - Fork 82
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
Inlining variants doesn't work #53
Comments
@boydkr Could you share the template where you use variants? The README doesn't document this yet, but {{#freestyle-collection as |collection|}}
{{#freestyle-variant collection=collection key='no-num'}}
{{#freestyle-usage "foo-foo-no-num" title="Information"}}
{{foo-foo title="Information"}}
{{/freestyle-usage}}
{{/freestyle-variant}}
{{#freestyle-variant collection=collection key='with-num'}}
{{#freestyle-usage "foo-foo-people" title="People"}}
{{foo-foo title="People" num=55}}
{{/freestyle-usage}}
{{/freestyle-variant}}
{{#freestyle-variant collection=collection key='with-icon'}}
{{#freestyle-usage "foo-foo-twitter" title="Twitter"}}
{{foo-foo title="Twitter" icon="twitter"}}
{{/freestyle-usage}}
{{/freestyle-variant}}
{{/freestyle-collection}} |
Here is an excerpt {{#freestyle-subsection name="Graphics" section=section}}
{{#freestyle-collection title="Preview Graphics" defaultKey='very good' as |collection|}}
{{#freestyle-variant collection=collection key='very good' class="FreestyleCollection-variant"}}
{{#freestyle-usage 'graphic4' title="Very Good" inline=(eq collection.activeKey 'all')}}
{{graphic foo=4 size="preview"}}
{{/freestyle-usage}}
{{/freestyle-variant}}
{{#freestyle-variant collection=collection key='good' class="FreestyleCollection-variant"}}
{{#freestyle-usage 'graphic3' title="Good" inline=(eq collection.activeKey 'all')}}
{{graphic foo=3 size="preview"}}
{{/freestyle-usage}}
{{/freestyle-variant}}
{{#freestyle-variant collection=collection key='neutral' class="FreestyleCollection-variant"}}
{{#freestyle-usage 'graphic2' title="Neutral" inline=(eq collection.activeKey 'all')}}
{{graphic foo=2
size="preview"}}
{{/freestyle-usage}}
{{/freestyle-variant}}
{{#freestyle-variant collection=collection key='poor' class="FreestyleCollection-variant"}}
{{#freestyle-usage 'graphic1' title="Poor" inline=(eq collection.activeKey 'all')}}
{{graphic foo=1 size="preview"}}
{{/freestyle-usage}}
{{/freestyle-variant}}
{{#freestyle-variant collection=collection key='very poor' class="FreestyleCollection-variant"}}
{{#freestyle-usage 'graphic0' title="Very Poor" inline=(eq collection.activeKey 'all')}}
{{graphic foo=0 size="preview"}}
{{/freestyle-usage}}
{{/freestyle-variant}}
{{/freestyle-collection}}
{{#freestyle-usage 'graphic-incomplete-0' title="Very Poor Incomplete" inline=true}}
{{graphic complete=false
foo=0
size="preview"}}
{{/freestyle-usage}}
{{/freestyle-subsection}} |
Ah, gotcha. Apparently I didn't pull in the inline CSS rule tied to the http://github.com/chrislopresto/ember-freestyle/blob/1af16595bfa452eb91df261e33772003a07b30e2/app/styles/components/freestyle-collection.scss#L55-L57 should be moved into a new .FreestyleVariant {
&--inline {
display: inline;
}
} We should also update the README documentation to include:
Any chance you have time to make a PR? |
This could be another conflicting css issue, but I had to add
class="FreestyleCollection-variant"
to my{{freestyle-variant}}
components to get them to display properly.The text was updated successfully, but these errors were encountered: