-
Notifications
You must be signed in to change notification settings - Fork 93
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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. | ||
``` | ||
<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> | ||
``` | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? :) There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
There was a problem hiding this comment.
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.