Skip to content

wrap nav and snippet in a div #314

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

Merged
merged 1 commit into from
Jan 31, 2019

Conversation

miguelcobain
Copy link
Collaborator

@miguelcobain miguelcobain commented Jan 31, 2019

This just wraps the nav and snippet in a div.
This way it's very easy to have horizontal demos by just adding the docs-flex docs-flex-row classes to the docs-demo component. Results in something like this:

screen shot 2019-01-31 at 17 39 20

Doesn't affect any existing vertical demos.

If an horizontal=true flag is desired, I can add it. It could add those classes to the container and also apply a left border on the snippet.

@samselikoff samselikoff changed the title wrap nav and snippet in a div Support horizontal snippet demos Jan 31, 2019
@samselikoff
Copy link
Contributor

hm - I'd like to think a little more about this.

In the meantime, docs-flex and other Tailwind utility classes should not be seen as Public API. I think we need to make this more clear.

@miguelcobain
Copy link
Collaborator Author

Yes. I would use those assuming the risk.
But one could easily write css for the class that sets flex direction row.

This can either be seen as a "request to support horizontal demos" or just a "request to add a div that facilitates this hack". :)

@samselikoff
Copy link
Contributor

haha true - but its still public API! and should be tested

@miguelcobain
Copy link
Collaborator Author

When I first created this, I wasn't trying to make ec-addon-docs support horizontal demos.

If such a thing is desired, please let me know and I can do it properly, with tests and proper documentation.
This PR was just a simple way to support it unofficially.

@samselikoff
Copy link
Contributor

Understood. I'm fine with that as long as you are ok with the risk!

@samselikoff samselikoff changed the title Support horizontal snippet demos wrap nav and snippet in a div Jan 31, 2019
@samselikoff samselikoff merged commit 7428e15 into ember-learn:master Jan 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants