Semantic-UI-LESS icon indicating copy to clipboard operation
Semantic-UI-LESS copied to clipboard

Request: please add 'css' Less 'Import Option' to font imports

Open lfurzewaddock opened this issue 6 years ago • 5 comments

Webpack 4 builds failed which included Semantic-UI less files that featured a web font:

Can't resolve './https://fonts.googleapis.com/css?family=Roboto' in '/MY_PROJECT_DIR/node_modules/semantic-ui-less/themes/material/elements'

The following comment on another repo answered my problem; Import url tries to resolve directory #67

To assist Webpack to load Semantic-UI less files, which include web fonts downloaded from a CDN such as Google, please add Less Import Option css.

For example; themes/material/elements/button.overrides would change from;

@import url(https://fonts.googleapis.com/css?family=Roboto);

.ui.primary.button:hover {
  box-shadow:
    0px 0px 0px 1px rgba(0, 0, 0, 0.3) inset,
    0px 2px 3px 0px rgba(0, 0, 0, 0.35) !important
  ;
}

.ui.secondary.button:hover {
  box-shadow:
    0px 0px 0px 1px rgba(0, 0, 0, 0.2) inset,
    0px 2px 3px 0px rgba(0, 0, 0, 0.3) !important
  ;
}

to;

@import (css) url(https://fonts.googleapis.com/css?family=Roboto);

.ui.primary.button:hover {
  box-shadow:
    0px 0px 0px 1px rgba(0, 0, 0, 0.3) inset,
    0px 2px 3px 0px rgba(0, 0, 0, 0.35) !important
  ;
}

.ui.secondary.button:hover {
  box-shadow:
    0px 0px 0px 1px rgba(0, 0, 0, 0.2) inset,
    0px 2px 3px 0px rgba(0, 0, 0, 0.3) !important
  ;
}

lfurzewaddock avatar Nov 14 '18 16:11 lfurzewaddock

+1

thefallentree avatar Dec 26 '18 22:12 thefallentree

+1

terrancesnyder avatar Jan 05 '19 06:01 terrancesnyder

+1

AGontcharov avatar Mar 05 '20 16:03 AGontcharov

Looks like this was resolved in PR: https://github.com/Semantic-Org/Semantic-UI-LESS/pull/58

Could we have this merged?

gentb avatar May 02 '20 11:05 gentb

We prepared that in the active community fork Fomantic-UI by https://github.com/fomantic/Fomantic-UI/pull/2184

lubber-de avatar Dec 19 '21 17:12 lubber-de