Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Replace CSSOM so new CSS features are supported

オープン
#318 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
リファクタリング
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
css, javascript
領域
frontend, web-dev

調査の方向性

issue の parseHTML 例から始め、linkedom が CSSOM をどのように統合しているかを調べます。ソースファイルやテストは指定されていません。現在の CSSOM の動作を、リンクされた benchmark の候補パーサーと比較します。ネストされた CSS やその他の最新の CSS ルールが例外なくパースされ、必要な CSS 機能とパフォーマンスが許容範囲に収まれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Hi,

I noticed that currently linkedom fails to parse styles with nested CSS rules. Here's a sample code:

import {parseHTML} from "linkedom";

const doc = parseHTML(`
<style>
	.parent { .child { color: red; }}
</style>
`).document;
console.log(doc.children[0].sheet);

Looking into it, it seems like this is an issue with CSSOM, which makes sense considering that project stopped receiving updates 5 years ago and is marked as unmaintained. Although I didn't check, I assume other kinds of 'modern' CSS rules will also raise an exception when parsed.

I would like to know if there is interest in replacing it with an up-to-date CSS parser implementation.

Looking online, I found a benchmark that shows that a few other CSS parsers more or less match the performance of CSSOM, which I know is an important factor for this project.

If this is desired I can take a look into changing the backing implementation, probably trying the projects in the order they appear in that benchmark (I don't know which of those provides the functionalities linkedom requires).

主要言語
HTML
スター
2.1k
フォーク
104
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

WebReflection/linkedom のほかの issue

WebReflection/linkedom の issue をすべて見る

似ている issue

Web Dev の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。