kkoudev / postcss-webfont Goto Github PK
View Code? Open in Web Editor NEWPostCSS plugin to generate iconfonts from stylesheets.
License: MIT License
PostCSS plugin to generate iconfonts from stylesheets.
License: MIT License
ビルドをすると以下のようにキャッシュ回避のための cachebuster が追加されますが、
src: url('../font/icon.woff2?1686377cc55')
getTime() を使っているため、ビルドの度に cachebuster が変化して、
差分が計上されます。 ビルドファイルを Git に含める環境だと
Web フォントに修正がなくても Git で差分が出てしまうので
cachebuster の値をコントロールする方法として以下2点ができると助かります。
fixedHash
オプションで cachebuster に固定値を入れられますが、固定値か getTime() の2択なので、cachebuster そのものを無効にする手段(例えば false 指定など)があると嬉しいいです適用するプロジェクトによっては CSS 設計方針でクラス名をコントロールしたいこともあるので、
出力されるクラス名をオプションである程度コントロールできると嬉しいです。
従来の class フォーマットをデフォルトとすると、例えば以下のような内容です。
postcss([webfont({
classNamePrefix: 'iconfont',
classNameBeforePrefix: 'iconfont-before',
classNameAfterPrefix: 'iconfont-after',
})])
classNameBeforePrefix
classNameAfterPrefix
は false 指定で
class の出力をスキップできるとなお良いです。
svgicons2svgfont に渡せるオプションに prependUnicode
を追加いただけけませんでしょうか。
https://github.com/nfroidure/svgicons2svgfont#new-svgicons2svgfontstreamoptions
Webフォントに追加がある際に CSS 側の unicode 値が都度変化しなくなります。
postcss-iconfont や postcss-sprites のように、
hooks.onUpdateRule
で出力 CSS をカスタムできるオプションがあると嬉しいです。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.