Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit e8d3564

Browse files
fix: use selector instead of constant
Signed-off-by: peterpeterparker <[email protected]>
1 parent d93bfbe commit e8d3564

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

studio/src/app/components/editor/styles/element/app-font-size/app-font-size.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export class AppFontSize {
3535
return;
3636
}
3737

38-
const property: string = this.selectedElement.style.getPropertyValue('--deckgo-highlight-code-font-size');
38+
const property: string = this.selectedElement.style.getPropertyValue(this.selector);
3939

4040
if (property === '50%') {
4141
resolve(FontSize.VERY_SMALL);
@@ -65,16 +65,16 @@ export class AppFontSize {
6565
return;
6666
}
6767

68-
this.selectedElement.style.removeProperty('--deckgo-highlight-code-font-size');
68+
this.selectedElement.style.removeProperty(this.selector);
6969

7070
if (this.currentFontSize === FontSize.VERY_SMALL) {
71-
this.selectedElement.style.setProperty('--deckgo-highlight-code-font-size', '50%');
71+
this.selectedElement.style.setProperty(this.selector, '50%');
7272
} else if (this.currentFontSize === FontSize.SMALL) {
73-
this.selectedElement.style.setProperty('--deckgo-highlight-code-font-size', '75%');
73+
this.selectedElement.style.setProperty(this.selector, '75%');
7474
} else if (this.currentFontSize === FontSize.BIG) {
75-
this.selectedElement.style.setProperty('--deckgo-highlight-code-font-size', '150%');
75+
this.selectedElement.style.setProperty(this.selector, '150%');
7676
} else if (this.currentFontSize === FontSize.VERY_BIG) {
77-
this.selectedElement.style.setProperty('--deckgo-highlight-code-font-size', '200%');
77+
this.selectedElement.style.setProperty(this.selector, '200%');
7878
}
7979

8080
this.codeDidChange.emit();

0 commit comments

Comments
 (0)