Skip to content

Instantly share code, notes, and snippets.

Avatar

一丝 yisibl

View GitHub Profile
@yisibl
yisibl / prefix.css
Last active Aug 29, 2015
Autoprefixer 测试用例
View prefix.css
/**
* Autoprefixer 测试用例
* @author: 一丝
* @update: 2014-2-21 11:26:44;
*/
/* ==========================================================================
常用属性测试
========================================================================== */
@yisibl
yisibl / Git-Command.md
Last active Aug 29, 2015
Git 常用命令
View Git-Command.md
  1. 打开 Gitbash
  2. 使用 cd 命令用于切换到对应仓库的目录,cd .. 用于切换到上级目录,ls 用于查看当前目录下面的文件/夹
  3. 当修改了一段代码后,使用 git status 查看当前改动
  4. 如果需要把所有改动提交上去,使用 git add . 提交到缓冲区(此时文件并没有提交到远程仓库)
  5. 填写提交说明,使用 git commit -m '此处填写修改的内容' 命令
  6. 使用 git pull origin master 获取远程仓库master分支的最新改动。(如果远程仓库有更新,没有执行此步骤,无法进行下一步)
  7. 使用 git push origin master 提交改动到远程仓库
  8. github 的 Demo 默认使用 gh-pages 分支,Demo 地址是:http://用户名.github.io/仓库名/ 可以使用 git checkout gh-pages 切换到该分支(默认没有这个分支,需要使用git checkout -b gh-pages创建该分支)。

至此一次提交操作完成

View webkit-pseudo-elements.md

An ongoing project to catalogue all of these sneaky, hidden, bleeding edge selectors as I prepare my JSConf EU 2012 talk.

Everything is broken up by tag, but within each the selectors aren't particularly ordered.

I have not tested/verified all of these. Have I missed some or got it wrong? Let me know. - A

A friendly reminder that you may need to set this property on your target/selected element to get the styling results you want:

-webkit-appearance:none;

View cssgrace.js
/**
cssgrace.pack(css)
*/
var path = require('path');
var http = require('http');
var url = require('url');
var postcss = require('postcss');
var sizeOf = require('image-size');
@yisibl
yisibl / cssgrace-syntax.css
Last active Aug 29, 2015
CSS Grace syntax design
View cssgrace-syntax.css
/**
* extend 全局继承
* extend 会合并选择器,不会生成冗余代码。
* 1. extend: select() [ , select() ]* 继承选择器与其中的声明 http://tabatkins.github.io/specs/css-toggle-states/#toggle-group-property
* 2. extend: <custom-ident> [ , <custom-ident> ]* 作为 Placeholder,只继承声明,default 为保留关键字
* inherit(property [ , property ]*) 局部继承
*/
/* input */
View gist:ccb7ad7c6ff9483ca50e

List of Suggested Extensions to CSS

This is a breakdown of "List of Suggested Extensions to CSS", produced by the CSSWG back in 1998. It goes through each feature and either lists where the feature has been defined in the intervening 16 years, or notes that it has yet to be addressed.

Out of the 67 suggested extensions, 30 have been added, 10 have been partially added or been added but with uncertain implementor interest, and 27 have not been added.

  1. Columns: http://dev.w3.org/csswg/css-multicol/
  2. Swash letters and other glyph substitutions: http://dev.w3.org/csswg/css-fonts/#font-rend-props
  3. ~ Running headers and footers: http://dev.w3.org/csswg/css-gcpm/#running-elements, but unproven so
@yisibl
yisibl / num2fraction.js
Last active Aug 29, 2015
Number to fraction
View num2fraction.js
//最大公约数
function gcd(a, b) {
if (b === 0) return a
return gcd(b, a % b)
}
function num2fraction(num) {
if (num === 0) return 0
if (typeof num === "string") {
@yisibl
yisibl / SassMeister-input.scss
Created Apr 3, 2015
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
$colors-list: width height border margin;
.foo {
@each $current-color in $colors-list {
$i: index($colors-list, $current-color) * .5s;
transition: $current-color $i;
@yisibl
yisibl / SassMeister-input.scss
Created Apr 7, 2015
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
@for $i from 1 through 8 {
.main .line:nth-child(#{$i}){
transform: rotate3d(0, 0, 1, 22.5deg * $i);
}
}
You can’t perform that action at this time.