그리드 컨테이너 요소 또는 그리드 인스턴스
The grid container element, or a grid instance
グリッドのコンテナ要素、またはグリッドインスタンス
表格容器元素,或表格实例
프리셋 id('default' 는 축 해제)
Preset id ('default' clears the axis)
プリセット id('default' は軸の解除)
预设 id('default' 为解除该轴)
적용 경로 + 정직 고지
The path taken plus honest notices
適用した経路 + 正直な注意書き
采用的路径 + 如实告知
프리셋을 적용한다. 코어 무수정 경로.
두 경로가 있고, 능력이 다르다. 정직하게 밝힌다.
target이 HTMLElement(그리드 컨테이너 =.og-container)이면data-og-typography속성을 붙인다.typography.css의 프리셋 블록·밀도 복합 셀렉터(광학 크기)·:lang()한자 분기까지 전부 살아난다. 이 경로가 완전판이며,open-grid-typography.css로드가 전제다 (값을 인라인하지 않는 이유: 인라인은 복합 셀렉터 보정을 덮어버린다).target이 그리드 인스턴스이면 공개setThemeVar()로 9개 토큰을 인라인 주입한다.OpenGrid는 컨테이너 요소를 반환하는 공개 접근자를 제공하지 않으므로(2026-08 조사 결과:_container는 private, 공개 표면에 getter 없음) 속성을 붙일 방법이 없다. 따라서[data-og-typography="dense-scan"][data-og-density="compact"]같은 속성 조건부 규칙과cjk-doc의:lang()분기는 작동하지 않는다. 그 사실을 경고로 반환한다.완전 적용이 필요하면 컨테이너 요소를 직접 넘겨라(
document.querySelector('#myGrid')).Apply a preset. Requires no core modification.
There are two paths and they are not equally capable — stated plainly.
.og-container) gets thedata-og-typographyattribute, so every CSS rule works, including density compound selectors (optical sizing) and the:lang()Han-unification split. This is the full path.setThemeVar().OpenGridexposes no public accessor for its container element (verified 2026-08:_containeris private with no public getter), so the attribute cannot be set. Attribute-conditional rules therefore do not apply; this is returned as a warning.プリセットを適用します。コアの修正は要りません。
経路は2つあり、能力が違います。正直に明かします。
targetが HTMLElement(グリッドのコンテナ =.og-container)ならdata-og-typography属性を付けます。typography.cssのプリセットブロック・密度の複合セレクター(オプティカルサイズ)・:lang()の漢字の分岐まですべて生きます。この経路が完全版であり、open-grid-typography.cssの読み込みが前提です(値をインライン化しない理由: インラインは 複合セレクターの補正を上書きしてしまいます)。targetが グリッドインスタンスなら、公開 API のsetThemeVar()で9個のトークンを インライン注入します。OpenGridはコンテナ要素を返す公開アクセサーを提供しないため (2026-08 の調査結果:_containerは private で、公開表面に getter はありません)、 属性を付ける手段がありません。 したがって[data-og-typography="dense-scan"][data-og-density="compact"]のような属性条件付き規則と、cjk-docの:lang()の分岐は働きません。 その事実を警告として返します。完全に適用したいときは、コンテナ要素を直接渡してください(
document.querySelector('#myGrid'))。应用预设。不需要修改核心。
有两条路径,能力并不相同。这里如实说明。
target是 HTMLElement(表格容器 =.og-container)时,加上data-og-typography属性。typography.css的预设块、密度复合选择器(光学尺寸)、:lang()的汉字分支全部生效。 这条路径才是完整版,前提是加载了open-grid-typography.css(不把值内联的理由: 内联会 覆盖复合选择器的修正)。target是表格实例时,通过公开的setThemeVar()内联注入9个令牌。OpenGrid不提供返回 容器元素的公开访问器(2026-08 核实:_container是 private,公开表面上没有 getter),因此 没有办法加上属性。于是[data-og-typography="dense-scan"][data-og-density="compact"]这类 属性条件规则,以及cjk-doc的:lang()分支都不起作用。这个事实会作为警告返回。需要完全应用时,请直接传入容器元素(
document.querySelector('#myGrid'))。