0

I have already read several issues about displaying icons in former versions of blueprintjs. Mine concerns blueprint 2.0.0-rc.2 and feel it's an importing problem.

I am using webpack and importing blueprint v2 the following way:

In index.html:

<link href="node_modules/normalize.css/normalize.css" rel="stylesheet" />
<link href="node_modules/@blueprintjs/core/lib/css/blueprint.css" rel="stylesheet" />

In my app.tsx:

require('../../../node_modules/@blueprintjs/core/src/blueprint.scss');
require('../../../node_modules/@blueprintjs/icons/resources/icons/icons-16.ttf');

The overall css loads correctly but fonts remain unreachable; can someone please tell me what I am doing wrong? Cheers!

alexis_thual
  • 324
  • 3
  • 15

1 Answers1

2

You are missing the new blueprint-icons.css file, which imports the font files through CSS @font-face declarations. Add the following line before importing blueprint.css:

<link href="node_modules/@blueprintjs/icons/lib/css/blueprint-icons.css" rel="stylesheet" />

We have updated the docs with latest usage instructions and will be shipping full 2.0 later this week (and updating the site accordingly).

Gilad Gray
  • 451
  • 2
  • 6