2024-02-27 DOMDOMトークス #1
Search Works with all frameworks 🧩 Works with CDNs 🚛 Fully customizable with CSS 🎨 Includes a dark theme 🌛 Built with accessibility in mind ♿️ First-class React support ⚛️ Built-in localization 💬 Open source 😸 More awesome than ever Quick Start Add the following code to your page. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.20.1/cdn/themes/light.css"
以下のコードで HTML 全体の CSS を取得して Shadow DOM に適用することができます。 最近まで replaceSync() と adoptedStyleSheets() の存在を知らなかったのですが、 この 2つを使うと毎回 style タグを書き出すより効率的に処理できるらしい。 これまで Shadow DOM の中に link タグを書くような方法を使っていたのですが、link タグだと最適化がしにくい問題があります。 CSS はインライン化したほうが高速なので、その時にも同じように使える方法が欲しかったのですが、この方法でいけるとわかりました。 document.styleSheets も知らなかった…。 function getGlobalCSS() { let cssText = ""; for (const stylesheet of document.sty
The introduction of ES6 JavaScript Modules has provided several benefits for web developers including more componentized code and better dependency management. However, solutions for including CSS in component definitions are lacking. Current practices all have one or more of the following rough edges: Side effects like appending <style> elements to the document. If this is done in the top-level s
lit-html が v0.9.0 で ShadyCSS をサポートするようになったということなので、いろいろと調べてみた。 TL;DR 現時点では、Shadow DOM のスタイルカプセル化に対応するには ShadyCSS を使う必要がある。 lit-html 経由で ShadyCSS を使うと便利。 Shadow DOM の Polyfill 2018 年 2 月現在、各ブラウザの Shadow DOM v1 のサポート状況は次のようになっている。 Chrome と Opera は済み 🙆 Safari と iOS Safari は一部バグあり 🤔 Firefox と Edge はまだ 🙅 (参考:https://caniuse.com/#feat=shadowdomv1 ) したがって、幅広いブラウザに対応するには、 現段階では Web Components の Polyf
Updated May 18, 2020 (get it? :: ? I made a funny) Shadow DOM is a spec that gives you DOM and style encapsulation. This is great for reusable web components, as it reduces the ability of these components’ styles getting accidentally stomped over (the old “I have a class called “button” and you have a class called “button”, now we both look busted” problem), but it adds a barrier for styling and t
Intro Chrome が予定している <link rel=stylesheet> の挙動の変更について、 Google Chrome チームの Jake が、興味深いブログを上げている。 The future of loading CSS この内容は、単に Chrome に対する変更だけではなく、 HTTP2 によって変化する最適化手法と、それを最も活かすための HTML, CSS の構成についてのヒントがある。 今回は、この内容を意訳+補足解説し、本サイトに適用していく。 HTTP/1.1 時代の CSS HTML 自体がコンポーネントを意識した作りになっている場合は、自然と CSS も class などを使いコンポーネント単位に作ることができるだろう。 しかし、 HTTP/1.1 では、リクエストの数を減らすために全ての CSS を 1 つ(もしくは少数個)に結合する最適化が主流だ
style要素のscoped属性を使うと、ページの一部分だけにスタイルを適用させることができますが、仕様と実装の両面に最近動きがあったのでまとめてみます。 scoped属性自体の解説や記述の仕方などはA New Experimental Feature: scoped stylesheets - HTML5Rocks Updates(updates.html5rocks.com)や特定の範囲内にのみスタイルを適用できる scoped 属性 | WWW WATCH(hyper-text.org)などを参照ください。 2008年の最初のHTML5仕様書から定義されていましたが、CRになった2012年12月17日版で at risk 扱いになり、2014年4月29日版で削除されました。 2014年6月11日現在、 HTML 5.1 と WHATWG の Living Standard には残って
Author's Note: This post was originally written in April 2014 and since then a lot has changed with Shadow DOM CSS. I've updated the post to reflect the current state of things as of March 2016. This guide is my attempt to track the progress of all the new CSS selectors which affect the Shadow DOM. I've written this from the perspective of someone who uses Polymer so in a few places I point out po
Last updated: Friday, January 10 2025 A fun added aspect of Persona 5 Royal edition is the card game "Tycoon", which you can play against the AI. It's also a perfectly reasonable real-life card game, playable with a 52 or 54 card deck. The precise rules aren't very well written anywhere, tho, and I'm regularly forgetting small details, so I'll compile here the complete Tycoon rules as I know them.
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く