Skip to content

Emojis in CSS broken since 2.0.0 #880

Closed
@chrisEff

Description

@chrisEff
  • Operating System: macOS 10.14.2 (Mojave)
  • Node Version: 10.14.2 (yes! it's by coincidence actually the same as the OS version 😄)
  • NPM Version: 6.5.0
  • webpack Version: 4.28.2
  • css-loader Version: 2.0.0, 2.0.1, 2.1.0

Expected Behavior

In my CSS I have a section with a :before selector and a content property. The content property contains a light bulb emoji. With css-loader 1.01 the emoji is converted into \1F4A1, which Chrome then in turn nicely renders as a lightbulb.

Actual Behavior

With every version since 2.0.0 the emoji becomes �, which does not get rendered as an emoji.

Code

.light.on .bulb:before{
	content: '💡';
}
require('style-loader!css-loader!./style.css')

How Do We Reproduce?

Use an emoji in a CSS content property and require the CSS file via css-loader + style-loader, like shown in the code snippets above. My webpack config doesn't contain anything that seems relevant for this.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions