Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] feat(ext/css): implement CSSOM #14225

Closed
wants to merge 1 commit into from

Conversation

lucacasonato
Copy link
Member

Very much WIP! Just testing around.

The extent to which it works is that running

const sheet = new CSSStyleSheet();
sheet.insertRule("body { background-color: currentColor; }");
console.log(sheet);
const rule = sheet.cssRules.item(0);
console.log(rule);

logs

CSSStyleSheet { cssRules: CSSRuleList { length: 1 }, disabled: false }
CSSStyleRule { selectorText: "body" }

Closes #13898

@deckchairlabs
Copy link

Would this mean potentially/eventually importing css with assert?

import sheet from './styles.css' assert { type: 'css' }
console.log(sheet)

@lucacasonato
Copy link
Member Author

@deckchairlabs Yup!

@deckchairlabs
Copy link

@deckchairlabs Yup!

Amazing!

@stale
Copy link

stale bot commented Jun 18, 2022

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 18, 2022
@stale stale bot closed this Jun 27, 2022
@timreichen
Copy link
Contributor

Is this PR supposed to be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement CSSStyleSheet API
3 participants