Skip to content

Consider allowing string values in CSSResults? #451

Closed
@43081j

Description

@43081j

Currently css only accepts CSSResult values (other css calls) which means we can no longer do something like this:

static get styles() {
  return [css`
    :host {
      background-image: url('${rootPath}images/foo.png');
    }
  `];
}

This is a common pattern I have throughout my project to handle usages of import.meta so assets can have absolute paths.

If you can suggest a better way to handle passing in a path, fair enough, but otherwise it would be handy to be able to interpolate string values here.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions