@@ -298,18 +298,21 @@ function e(e,t,r,s){var i,a=arguments.length,o=a<3?t:null===s?s=Object.getOwnPro
/* === KEG EMOJI GRID === */
.emoji-grid {
display: grid;
- gap: 2px;
justify-items: center;
align-items: center;
+ align-content: stretch;
width: 100%;
+ height: 100%;
flex: 1;
- align-content: center;
padding: 0;
- font-size: min(4.5vw, 3.5em);
}
.glass {
- line-height: 1;
- text-align: center;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 100%;
+ height: 100%;
+ font-size: min(7vw, 5em);
}
.glass.empty {
opacity: 0.15;
diff --git a/src/editor.ts b/src/editor.ts
index 044af6c..eddacb7 100644
--- a/src/editor.ts
+++ b/src/editor.ts
@@ -5,7 +5,7 @@ import type { PerfectDraftCardConfig } from "./types.js";
import { GLASS_SIZES, DEFAULT_GLASS_SIZE, DOMAIN } from "./const.js";
import { getAllBeers } from "./beer-catalog.js";
-const EDITOR_VERSION = "0.1.3";
+const EDITOR_VERSION = "0.1.4";
interface DiscoveredDevice {
deviceId: string;
diff --git a/src/perfectdraft-card.ts b/src/perfectdraft-card.ts
index 1628ebd..284bb38 100644
--- a/src/perfectdraft-card.ts
+++ b/src/perfectdraft-card.ts
@@ -226,6 +226,7 @@ export class PerfectDraftCard extends LitElement {
private _renderEmojiGrid(count: number): TemplateResult {
const maxGlasses = Math.floor(KEG_TOTAL_VOLUME_ML / this._glassSize);
const cols = maxGlasses <= 10 ? 5 : 6;
+ const rows = Math.ceil(maxGlasses / cols);
const slots = [];
for (let i = 0; i < maxGlasses; i++) {
slots.push(i < count
@@ -234,7 +235,7 @@ export class PerfectDraftCard extends LitElement {
);
}
return html`
-
+
${slots}
`;
@@ -458,18 +459,21 @@ export class PerfectDraftCard extends LitElement {
/* === KEG EMOJI GRID === */
.emoji-grid {
display: grid;
- gap: 2px;
justify-items: center;
align-items: center;
+ align-content: stretch;
width: 100%;
+ height: 100%;
flex: 1;
- align-content: center;
padding: 0;
- font-size: min(4.5vw, 3.5em);
}
.glass {
- line-height: 1;
- text-align: center;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 100%;
+ height: 100%;
+ font-size: min(7vw, 5em);
}
.glass.empty {
opacity: 0.15;