Skip to content

Conversation

@rsanchez
Copy link
Owner

Fixes #7.

const selectorVariables = {};

root.walkDecls(function(decl) {
// @ts-ignore
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why ts-ignore is here? Can't we do it some other way?

);
});

it('should read :root color variables', function(done) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As i see this won't work if we gave variables in body. Example test that doesn't work:

  it('should read body color variables', function(done) {
    test(
      'body { --test-color: #0000FF; } p { color: var(--test-color); }',
      ['#0000FF'],
      null,
      done,
    );
  });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Variables

2 participants