Constructed Sylesheets / Edge cases

Đang mở
#153 2 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@quarkus đang làm issue này rồi.

Từ ngày 19/8/2025.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

bug help wanted question

I came across an Edge Case where styles were not applied to an element properly.

This is likely due to an issue with CSSStylesheets itself.

This produces a stylesheet that has no value vor background-color / nor background-image
const sheet = new CSSStyleSheet() sheet.replaceSync('my-button {background: var(--button-bg, white);\n background-repeat: no-repeat;\n}')
It only happens when the same rule contains a shorthand (and a css var) plus a long-hand with a certain value.

Example:
https://codepen.io/quarkus/pen/WbQzvGg

Problem:

Since ejs@1 we put all Styles from JS includes (or the styles getter) through a CSSStylesheets instance per prototype.

Maybe there is a way to deal with this .. maybe its just a limitation.

Ngôn ngữ chính
JavaScript
Star
30
Fork
5
Merge trung bình
1 giờ 57 phút
Pull request đã merge (30 ngày)
10

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của webtides/element-js

Tất cả issue của webtides/element-js

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.