From 50149f3190dfd6c5a018a10bedde3f0bcbb7441e Mon Sep 17 00:00:00 2001 From: yuanchuan Date: Wed, 24 Jan 2024 22:22:43 +0800 Subject: [PATCH] Use contain:strict --- src/component.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/component.js b/src/component.js index a27d33e..b2f84ef 100644 --- a/src/component.js +++ b/src/component.js @@ -552,7 +552,7 @@ export function define(name, element) { function get_basic_styles(grid) { let { x, y } = grid || {}; return ` - *,*::after,*::before { + *,*::after,*::before,:host,.host { box-sizing: border-box; } :host,.host { @@ -560,8 +560,7 @@ function get_basic_styles(grid) { visibility: visible; width: auto; height: auto; - contain: content; - box-sizing: border-box; + contain: strict; --${utime.name}: 0 } :host([hidden]),[hidden] {