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
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions paper-styles.html
Original file line number Diff line number Diff line change
Expand Up @@ -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.

```
<link rel="import" href="bower_components/polymer/lib/elements/custom-style.html">
<custom-style>
<style is="custom-style">
html {
--primary-color: var(--paper-green-500);
--accent-color: var(--paper-deep-orange-500);
}
</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?

@group Paper Elements
@pseudoElement paper-styles
@demo demo/index.html
Expand Down