fix v1.15.3: center device icon badge on its anchor (box-sizing: border-box; 1px border no longer shifts it down-right). +demo/smoke_icon_center. Docs in same commit.

This commit is contained in:
Matysh
2026-07-08 17:05:51 +03:00
parent dc8cf3070d
commit 927e7d7054
12 changed files with 45 additions and 9 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ import './editor';
import { cardStyles } from './styles';
import { langOf, t, type I18nKey } from './i18n';
const CARD_VERSION = '1.15.2';
const CARD_VERSION = '1.15.3';
const LS_KEY = 'houseplan_card_layout_v1';
const LS_CFG = 'houseplan_card_cfg_v1'; // cache of the server config+layout for instant rendering
const LS_ZOOM = 'houseplan_card_zoom_v1';
+1
View File
@@ -312,6 +312,7 @@ export const cardStyles = css`
}
.dev {
position: absolute;
box-sizing: border-box; /* рамка 1px не должна смещать центр значка от точки привязки */
width: var(--icon-size, 2.5cqw);
height: var(--icon-size, 2.5cqw);
margin: calc(var(--icon-size, 2.5cqw) / -2) 0 0 calc(var(--icon-size, 2.5cqw) / -2);