Skip to content

Erroneous Icon Font URL  #4174

@srissel

Description

@srissel

Hi,

we just upgraded to the latest Semantic UI release.
Thanks for this long-awaited release! :-)

Currently we are experiencing an issue with the URL to the icon font being generated.
In semantic.css and icon.css, icon font-face declaration gets compiled to this bit:

@font-face {
  font-family: 'Icons';
  src: url(".\../themes/default/assets/fonts/icons.eot");
  src: url(".\../themes/default/assets/fonts/icons.eot?#iefix") format('embedded-opentype'), url(".\../themes/default/assets/fonts/icons.woff2") format('woff2'), url(".\../themes/default/assets/fonts/icons.woff") format('woff'), url(".\../themes/default/assets/fonts/icons.ttf") format('truetype'), url(".\../themes/default/assets/fonts/icons.svg#icons") format('svg');
  ...
}

As you can see, the URL to the icon font is starting with ".../themes/...", it should just be "themes/...".
This still worked fine in version 2.1.18 of Semantic UI, our local paths haven't changed since that.

The respective part in icon.variables is:

@fontName: 'icons';
@fallbackSRC: url("@{fontPath}/@{fontName}.eot");
@src:
  url("@{fontPath}/@{fontName}.eot?#iefix") format('embedded-opentype'),
  url("@{fontPath}/@{fontName}.woff2") format('woff2'),
  url("@{fontPath}/@{fontName}.woff") format('woff'),
  url("@{fontPath}/@{fontName}.ttf") format('truetype'),
  url("@{fontPath}/@{fontName}.svg#icons") format('svg')
;

An @fontPath is defined in site.variables as follows:
@fontPath : '../../themes/default/assets/fonts';

Paths in semantic.json are set as follow:

  "base": "./",
  "paths": {
    "source": {
      "config": "src/theme.config",
      "definitions": "src/definitions/",
      "site": "src/site/",
      "themes": "src/themes/"
    },
    "output": {
      "packaged": "dist/",
      "uncompressed": "dist/components/",
      "compressed": "dist/components/",
      "themes": "dist/themes/"
    },
    "clean": "dist/"
  }

We are working on Windows 10 environments, running NPM 3.10.2

Could you please help us solve this issue?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions