Skip to content

Commit 6ce9128

Browse files
committed
fix fontSize change
1 parent b2bd646 commit 6ce9128

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

index.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@
6363
text="{{code}}"
6464
language="{{language}}"
6565
on-tap="selPrettyCode"
66-
class$="[[_computedDestinationClass(theme)]]"
67-
style="overflow:auto"></prettify-element>
66+
class$="[[_computedDestinationClass(theme)]]"></prettify-element>
6867
</div>
6968
</template>
7069

main.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,9 @@ mainContent.ptChange = function(newVal) {
114114
mainContent.fontPx = ptToPx(newVal.detail.value) + 'px';
115115

116116
//AutoGrow Text Area
117-
mainContent.$.agTa.style.fontSize = mainContent.fontPx;
117+
mainContent.$.agTa.style.fontSize = mainContent.fontPx;//Done to avoid errors in Polymer library... TODO:open Issue?
118+
//--paper-input-container-input
119+
mainContent.$.agTa.customStyle['--paper-input-container-input'] = {'font-size': mainContent.fontPx};
118120

119121
//Pre Element
120122
if (mainContent.$.destination.shadowRoot) {

styles.html

+12-10
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,6 @@
1515
color: #000;
1616
}
1717

18-
paper-textarea {
19-
width: 100%;
20-
min-height: 90px;
21-
max-height: 50%;
22-
23-
font-family: Inconsolata;
24-
font-size: 20px;/*= 15pt, more info http://kyleschaeffer.com/development/css-font-size-em-vs-px-vs-pt-vs/*/
25-
}
26-
2718
paper-input.theme-dark {
2819
--paper-input-container-input-color: #fff;
2920
}
@@ -32,6 +23,16 @@
3223
--paper-input-container-input-color: #000;
3324
}
3425

26+
paper-textarea {
27+
width: auto;
28+
min-height: 90px;
29+
max-height: 50%;
30+
--paper-input-container-input: {
31+
font-family: Inconsolata;
32+
font-size: 20px;/*= 15pt, more info http://kyleschaeffer.com/development/css-font-size-em-vs-px-vs-pt-vs/*/
33+
};
34+
}
35+
3536
paper-textarea.theme-dark {
3637
background-color: #300;
3738
--paper-input-container-input-color: #fff;
@@ -52,7 +53,8 @@
5253
}
5354

5455
prettify-element {
55-
--prettify-pre: {
56+
overflow: auto;
57+
--prettify-code-pre: {
5658
font-family: Inconsolata;
5759
font-size: 20px;
5860
background-color:transparent;

0 commit comments

Comments
 (0)