NoDivide / astrum

A lightweight pattern library designed to be included with any web project.
http://astrum.nodividestudio.com
1.54k stars 98 forks source link

new type icon for new components #119

Open ghost opened 7 years ago

ghost commented 7 years ago

What behaviour would you expect?

I would like to have a new type. In addition to the colors there is also in each styleguide the icons, which are included as image or font, and must be displayed in the pattern lib.

Your environment

Platform: macOS OS Version: 10.12 Node Version: NPM Version: 4.5.0 Astrum Version: 1.9.3

RyanHavoc commented 7 years ago

@NicoMai It's a good idea. We just need to think of how best to define the icons to be rendered. For example the colour component has an array of hex values in the data.json and these are used to generate the colour swatch component. With icons there are lots of variables. It could be images, it could be an icon font with classes to define the individual icons, it could be an svg sprite. We don't want to make assumptions about how someone should define there icons so we need a flexible way do it. Will have to have a think. Open to ideas?

tigerclaw-az commented 7 years ago

👍 I'm also in need of this as well. Another idea (for quickest solution) is to just allow another array property on the assets for fonts and accept a wildcard:

assets: {
    fonts: ["../assets/fonts/*"],
    css: ["../assets/css/main.css"],
    js: ["../assets/js/main.js"]
}

If the wildcard is too complicated, then I would at least like the ability to list out all of the files that should be included as a "font". This would solve my immediate need because the icons are defined by the font-face in the CSS.

Andy-set-studio commented 7 years ago

Just dropping in to mention that a discussion is ongoing in #144 which very much relates to this 👍