Skip to content
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 docs pertaining to creating your own theme #150

Closed
wants to merge 3 commits into from

Conversation

rjcorwin
Copy link

@rjcorwin rjcorwin commented Nov 3, 2017

I'm not sure if this is the right place to start this documentation but it would have saved me couple of hours of searching around issue queues and guessing if it had been here. Creating your own custom theme, at least overriding primary and accent colors, seems like a common use case when also using paper-styles.

@rjcorwin rjcorwin mentioned this pull request Nov 3, 2017
@jsilvermist
Copy link

@rjsteinert :root is deprecated, you would be better using something like :host, html.

@rjcorwin
Copy link
Author

rjcorwin commented Nov 3, 2017

Aha, html as a selector also works, but only in this custom-style tag.

</style>
</custom-style>
```

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind adding a line about what "importing it in your index.html" actually means, since we're adding extra docs? :)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, that wording was wonky. How does it look now?

@@ -30,6 +30,20 @@
We recommend importing each of these individual files, and using the style mixins
available in each ones, rather than the aggregated `paper-styles.html` as a whole.

Create your own global theme to override components that use paper-styles by creating a component file as follows and
then import it into your index.html or app component using html imports like you do with other web components.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sooo the app-component isn't really right. For that, you would want a shared module (https://www.polymer-project.org/1.0/docs/devguide/styling#style-modules), so that your styles are actually scoped.

@notwaldorf
Copy link
Contributor

Closing, since this is a very old PR with unaddressed requested changes. LMK if you want to open it for another review.

@notwaldorf notwaldorf closed this Mar 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants