Giter Site home page Giter Site logo

postcss-webfont's People

Contributors

dependabot[bot] avatar kkoudev avatar okamoai avatar yutaihara avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

postcss-webfont's Issues

要望:font-src の cachebuster がビルドの度に差分がでないようにしたい

ビルドをすると以下のようにキャッシュ回避のための cachebuster が追加されますが、

src: url('../font/icon.woff2?1686377cc55')

getTime() を使っているため、ビルドの度に cachebuster が変化して、
差分が計上されます。 ビルドファイルを Git に含める環境だと
Web フォントに修正がなくても Git で差分が出てしまうので
cachebuster の値をコントロールする方法として以下2点ができると助かります。

  • 現状、 fixedHash オプションで cachebuster に固定値を入れられますが、固定値か getTime() の2択なので、cachebuster そのものを無効にする手段(例えば false 指定など)があると嬉しいいです
  • cachebuster の生成を src の SVG ファイルを基に CRC で生成するというのはどうでしょうか。src ファイルが変更されない限りは cachebuster の値が変更されず、CSSの差分が発生しなくなります

要望:Options で class の Prefix を指定したい

適用するプロジェクトによっては CSS 設計方針でクラス名をコントロールしたいこともあるので、
出力されるクラス名をオプションである程度コントロールできると嬉しいです。
従来の class フォーマットをデフォルトとすると、例えば以下のような内容です。

postcss([webfont({
  classNamePrefix: 'iconfont', 
  classNameBeforePrefix: 'iconfont-before', 
  classNameAfterPrefix: 'iconfont-after', 
})])

classNameBeforePrefix classNameAfterPrefix は false 指定で
class の出力をスキップできるとなお良いです。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.