diff --git a/README.md b/README.md index 5ba9000..9dfd578 100644 --- a/README.md +++ b/README.md @@ -19,3 +19,4 @@ useful-markdown-card Options: - `padding` - Adjust padding of markdown card (default `'16px'`) +- `fontSize` - Adjust font-size of markdown card diff --git a/useful-markdown-card.js b/useful-markdown-card.js index 47ef7e8..78afcbb 100644 --- a/useful-markdown-card.js +++ b/useful-markdown-card.js @@ -54,6 +54,7 @@ class UsefulMarkdownCard extends Polymer.Element { this.title = config.title; this.content = config.content; this.padding = config.padding || null; + this.fontSize = config.fontSize|| null; if(!this.padding){ if(this.title){ this.padding = '0 16px 16px'; @@ -89,6 +90,9 @@ class UsefulMarkdownCard extends Polymer.Element { if(!this.$.md.style.padding){ this.$.md.style.padding = this.padding; } + if(!this.$.md.style.fontSize){ + this.$.md.style.fontSize= this.fontSize; + } } this.renderedContent = this.process(this.content); }