Follow

CSS 割り当てるためのクラス名を生成するのハマった。HTML5 的にはなんでもいいが、CSS 的には
「[-]?{nmstart}{nmchar}*」だから、 .0 { color:red; } とかやろうとするとあかんのか。たぶん。

· · Web · 1 · 0 · 0

.a0 { ... } みたいな感じにしたら sheet.insertRule できたわ。

いつも下記文で葛藤するけど。見た目じゃないクラス名にしたいのはやまやまなのだが、推奨なんだよな。
「There are no additional restrictions on the tokens authors can use in the class attribute, but authors are encouraged to use values that describe the nature of the content, rather than values that describe the desired presentation of the content.」

Sign in to participate in the conversation
Mastodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!