We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b55d32e + 3002832 commit 8bb6bacCopy full SHA for 8bb6bac
packages/uikit-workshop/src/scripts/lit-components/pl-viewport-size/pl-viewport-size.js
@@ -48,15 +48,15 @@ class ViewportSize extends BaseLitComponent {
48
49
updated() {
50
if (this.viewport && this.viewport.bodySize) {
51
- this.em = Math.floor(this.px - 40 * this.bodySize);
+ this.em = Math.floor(this.px * this.bodySize);
52
}
53
54
55
render() {
56
if (!window.__PRERENDER_INJECTED) {
57
return html`
58
<form class="pl-c-viewport-size" method="post" action="#">
59
- <span class="pl-c-viewport-size__input">${this.px - 40}px</span
+ <span class="pl-c-viewport-size__input">${this.px}px</span
60
> /
61
<span class="pl-c-viewport-size__input">${this.em}em</span>
62
</form>
0 commit comments