Coder Social home page Coder Social logo

ink's Introduction

ink

ink 参考了 bootstrap 与 Puerh,根据个人工作需要,基于 Sass 与 Grunt 构建的一套前端 UI 库。

ink 使用到的开源代码:

ink 包括 Typography、Grid、常用的 UI 组件、JS 组件(bootstrap)

文档类型(统一使用 HTML5 标准)

<!DOCTYPE html>
<html lang="zh-CN">
  ...
</html>

编码规范

AlloyTeam

百度

前端规范

仅供参考

重置样式与排版

为了增强跨浏览器表现的一致性,ink 使用 typo.css,这是由 sofish 维护的 CSS 重置样式库(包括排版样式)。详见 http://typo.sofi.sh/

字体

font: 14px/1.8 Microsoft Yahei,tahoma,arial,'Hiragino Sans GB',\5b8b\4f53,sans-serif;

常用功能类

  • clearfix 清除浮动
  • pull-left 左浮动
  • pull-right 右浮动
  • hide-text 隐藏文字
  • 详见 utilities.scss

兼容性

兼容 IE6+ / Chrome / Firefox / Safari,以及国产常用浏览器

ink 遵循渐进增强设计,在保证低端浏览器最基础的功能前提下,再针对搞基浏览器对页面的效果进行改进。

iconfont(字体图标)

  • 什么是 iconfont ?
    简单粗暴的理解:就是表现形式为图标的自定义字体,使用方式跟普通字体没有区别。更多关于 iconfont 的资料请自行 google。

  • 为什么要用 iconfont ?
    字体图标具有良好的兼容性,矢量,规范等特点。

ink 已涵盖网站常用图标 84 枚(可根据各网站实际情况调整),兼容 ie6+ 在内的各主流浏览器。

更多图标资源请访问 http://iconfont.cn/

iconfont 制作教程 字体图标制作详解

栅格布局

ink 的布局是 980px 宽,分 20 个栅格,一个栅格的宽度为 30px,栅格之间的间隙为 20px。所有栅格必须包含在 .container 内。

更多关于栅格系统的介绍 栅格设计网页的栅格系统设计

布局 2.0

根据业务实际情况,无法直接使用栅格布局。于是就有了布局2.0 。具体使用方法请阅读源码_layout.scss

UI 组件

页面上的每个 UI 组件都应该像一个盒模型,不和页面的其他元素相互影响。使用统一的命名注释规范。

ink 的组件开发最重要的一点是每个组件都拥有各自的命名空间,避免全局类名过多导致冲突。

JavaScript 组件

目前 ink 的所有组件都使用 Twitter Bootstrap 库的自定义 Javascript 插件(增加了IE6/IE7支持)。

使用 Sass

ink 的 CSS 文件是通过 Sass 源码编译而来的。Sass 是一门预处理语言,支持变量、mixin、函数等功能。更多关于 Sass 的资料请访问 Sass 官网 或者 Sass **

编译

ink 虽然提供了已编译好的 CSS 文件,但建议根据实际需求编译 Sass 源码文件。 ink 使用 Grunt 作为构建工具。如果您未使用过 Grunt 或者其他类似(gulpfis)的构建工具,墙裂推荐使用。

包含内容

文件 描述
_setting.scss 包括基础脚手架以及 UI 组件的配置信息
_base.scss 入口文件
ink.css 按需选择自己需要的版块
ext/**.scss 一些 mixins
base/**.scss 基础脚手架
ui/**.scss ui 组件

ink's People

Contributors

shunjinchan avatar

Watchers

 avatar

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.