DragonsInn / fontgen-loader

Automated webfont generation from SVG icons. Use with WebPack!
125 stars 42 forks source link

Allow empty classPrefix #13

Closed SleepWalker closed 8 years ago

SleepWalker commented 8 years ago

This commit adds ability to generate icon classes without any prefixes (useful for css-modules).

IngwiePhoenix commented 8 years ago

CSS Modules are a thing, huh? :)

Reviewing the PR now.

IngwiePhoenix commented 8 years ago

How is the aproach in your commit different than using the OR operator? o.o

SleepWalker commented 8 years ago

if I specify any falsy value I'll get icon- prefix instead of no prefix:

(null || 'icon-') === 'icon-'
('' || 'icon-') === 'icon-'
(undefined || 'icon-') === 'icon-'

so I can't disable prefixing

CSS Modules are a thing, huh? :)

The first time I've read about them they were looked a little bit weird, but they actually not :) The ability to compose styles and referencing object keys instead of writing class name strings makes code more flexible and human friendly.

IngwiePhoenix commented 8 years ago

Oh! Okay, that makes sense.

Allright, merging! :) Expect a minor version bump in a few minutes. My internet works like as if it had had too much beer...

SleepWalker commented 8 years ago

thanks :)