定制 websharks/sharkicons 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

websharks/sharkicons

最新稳定版本:160620

Composer 安装命令:

composer require websharks/sharkicons

包简介

Font containing WebSharks logos/icons & more.

README 文档

README

Font containing WebSharks logos/icons + many others; including FontAwesome! See: DEMO

Contains over 750 icons. Total file size: 212kb (compare to stand-alone FontAwesome @ 136kb).

Using Icons in HTML Markup

<link rel="stylesheet" type="text/css" href="/path/to/sharkicons/src/long-classes.min.css" />
<i class="sharkicon sharkicon-broom"></i>

Short Classes (si- instead of sharkicon-)

<link rel="stylesheet" type="text/css" href="/path/to/sharkicons/src/short-classes.min.css" />
<i class="si si-broom"></i>

Including Classes via SCSS

Note: Bourbon is a required dependency. See: http://bourbon.io/ for details.

@import '/path/to/bourbon';
@import '/path/to/sharkicons/src/sharkicons';
@include sharkicons-font('/path/to/sharkicons/src');
@include sharkicon-short-classes;

Custom Classes via SCSS (prefix instead of si)

@import '/path/to/bourbon';
@import '/path/to/sharkicons/src/sharkicons';
@include sharkicons-font('/path/to/sharkicons/src');
@include sharkicon-custom-classes(prefix);

Scoping Classes via SCSS

@import '/path/to/bourbon';
@import '/path/to/sharkicons/src/sharkicons';
@include sharkicons-font('/path/to/sharkicons/src');

.my-product {
  @include sharkicon-short-classes;
}

Creating an Icon via SCSS

Note: you can do this without including the sharkicon-[long|short]-classes if you like.

@import '/path/to/bourbon';
@import '/path/to/sharkicons/src/sharkicons';
@include sharkicons-font('/path/to/sharkicons/src');
// @include sharkicon-short-classes;

.my-product .my-icon {
  @include sharkicon(broom);
}

Equivalent to:

.my-product .my-icon::before {
  content:                    '\e000';
  font:                       normal normal normal 14px/1 sharkicons;
  text-rendering:             optimizeLegibility;
  -webkit-font-smoothing:     antialiased;
  font-smoothing:             antialiased;
  display:                    inline-block;
  font-size:                  inherit;
  text-decoration:            inherit;
  text-transform:             none;
}

Alternatively, you can pass a second argument to sharkicon() to set the before/after specification. The default value is before. You might want to change it to after in some special case.

@import '/path/to/bourbon';
@import '/path/to/sharkicons/src/sharkicons';
@include sharkicons-font('/path/to/sharkicons/src');
// @include sharkicon-short-classes;

.my-product .my-icon {
  @include sharkicon(broom, after);
}

Equivalent to:

.my-product .my-icon::after {
  content:                    '\e000';
  font:                       normal normal normal 14px/1 sharkicons;
  text-rendering:             optimizeLegibility;
  -webkit-font-smoothing:     antialiased;
  font-smoothing:             antialiased;
  display:                    inline-block;
  font-size:                  inherit;
  text-decoration:            inherit;
  text-transform:             none;
}

Mapping An Icon Char via SCSS

.my-product .my-icon:hover::after {
  content:                    map-get($sharkicons, broom);
}

统计信息

  • 总下载量: 9.61k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: CSS

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2015-04-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固