├── .bowerrc
├── .gitignore
├── .jshintignore
├── .jshintrc
├── CHANGELOG.md
├── Gruntfile.js
├── README.md
├── TODO.md
├── bower.json
├── component.json
├── doc
├── less.md
├── sass.md
└── styl.md
├── fragment
├── foot.html
└── head.html
├── images
├── 1x.png
├── 2x.png
├── bg.jpg
├── grayscale.jpeg
├── icon.png
└── taobao.png
├── index.less
├── index.scss
├── index.styl
├── package.json
├── src
├── x-animation
│ ├── example.html
│ ├── example.style
│ ├── mixin.less
│ ├── mixin.scss
│ ├── mixin.styl
│ └── readme.template
├── x-appearance
│ ├── example.html
│ ├── example.style
│ ├── mixin.less
│ ├── mixin.scss
│ ├── mixin.styl
│ └── readme.template
├── x-backface-visibility
│ ├── example.html
│ ├── example.style
│ ├── mixin.less
│ ├── mixin.scss
│ ├── mixin.styl
│ └── readme.template
├── x-background-clip
│ ├── example.html
│ ├── example.style
│ ├── mixin.less
│ ├── mixin.scss
│ ├── mixin.styl
│ └── readme.template
├── x-background-origin
│ ├── example.html
│ ├── example.style
│ ├── mixin.less
│ ├── mixin.scss
│ ├── mixin.styl
│ └── readme.template
├── x-background-retina
│ ├── example.html
│ ├── example.style
│ ├── mixin.less
│ ├── mixin.scss
│ ├── mixin.styl
│ └── readme.template
├── x-background-size
│ ├── example.html
│ ├── example.style
│ ├── mixin.less
│ ├── mixin.scss
│ ├── mixin.styl
│ └── readme.template
├── x-border-radius
│ ├── example.html
│ ├── example.style
│ ├── mixin.less
│ ├── mixin.scss
│ ├── mixin.styl
│ └── readme.template
├── x-border-triangle
│ ├── example.html
│ ├── example.style
│ ├── mixin.less
│ ├── mixin.scss
│ ├── mixin.styl
│ └── readme.template
├── x-box-shadow
│ ├── example.html
│ ├── example.style
│ ├── mixin.less
│ ├── mixin.scss
│ ├── mixin.styl
│ └── readme.template
├── x-box-sizing
│ ├── example.html
│ ├── example.style
│ ├── mixin.less
│ ├── mixin.scss
│ ├── mixin.styl
│ └── readme.template
├── x-clearfix
│ ├── example.html
│ ├── example.style
│ ├── mixin.less
│ ├── mixin.scss
│ ├── mixin.styl
│ └── readme.template
├── x-font-face
│ ├── example.html
│ ├── example.style
│ ├── mixin.less
│ ├── mixin.scss
│ ├── mixin.styl
│ └── readme.template
├── x-grayscale
│ ├── example.html
│ ├── example.style
│ ├── gray.svg
│ ├── mixin.less
│ ├── mixin.scss
│ ├── mixin.styl
│ └── readme.template
├── x-hyphens
│ ├── example.html
│ ├── example.style
│ ├── mixin.less
│ ├── mixin.scss
│ ├── mixin.styl
│ └── readme.template
├── x-inline-block
│ ├── example.html
│ ├── example.style
│ ├── mixin.less
│ ├── mixin.scss
│ ├── mixin.styl
│ └── readme.template
├── x-linear-gradient
│ ├── example.html
│ ├── example.style
│ ├── mixin.less
│ ├── mixin.scss
│ ├── mixin.styl
│ └── readme.template
├── x-min-height
│ ├── example.html
│ ├── example.style
│ ├── mixin.less
│ ├── mixin.scss
│ ├── mixin.styl
│ └── readme.template
├── x-opacity
│ ├── example.html
│ ├── example.style
│ ├── mixin.less
│ ├── mixin.scss
│ ├── mixin.styl
│ └── readme.template
├── x-perspective-origin
│ ├── example.html
│ ├── example.style
│ ├── mixin.less
│ ├── mixin.scss
│ ├── mixin.styl
│ └── readme.template
├── x-perspective
│ ├── example.html
│ ├── example.style
│ ├── mixin.less
│ ├── mixin.scss
│ ├── mixin.styl
│ └── readme.template
├── x-placeholder
│ ├── example.html
│ ├── example.style
│ ├── mixin.less
│ ├── mixin.scss
│ ├── mixin.styl
│ └── readme.template
├── x-radial-gradient
│ ├── example.html
│ ├── example.style
│ ├── mixin.less
│ ├── mixin.scss
│ ├── mixin.styl
│ └── readme.template
├── x-text-overflow
│ ├── example.html
│ ├── example.style
│ ├── mixin.less
│ ├── mixin.scss
│ ├── mixin.styl
│ └── readme.template
├── x-transform-origin
│ ├── example.html
│ ├── example.style
│ ├── mixin.less
│ ├── mixin.scss
│ ├── mixin.styl
│ └── readme.template
├── x-transform-style
│ ├── example.html
│ ├── example.style
│ ├── mixin.less
│ ├── mixin.scss
│ ├── mixin.styl
│ └── readme.template
├── x-transform
│ ├── example.html
│ ├── example.style
│ ├── mixin.less
│ ├── mixin.scss
│ ├── mixin.styl
│ └── readme.template
├── x-transition
│ ├── example.html
│ ├── example.style
│ ├── mixin.less
│ ├── mixin.scss
│ ├── mixin.styl
│ └── readme.template
└── x-user-select
│ ├── example.html
│ ├── example.style
│ ├── mixin.less
│ ├── mixin.scss
│ ├── mixin.styl
│ └── readme.template
├── tasks
├── add
│ ├── example.html.handlebars
│ ├── example.style.handlebars
│ ├── index.js
│ ├── mixin.handlebars
│ └── readme.handlebars
├── generate
│ └── index.js
└── version
│ └── index.js
└── test
├── less
├── demo.css
└── demo.html
├── sass
├── demo.css
└── demo.html
└── styl
├── demo.css
└── demo.html
/.bowerrc:
--------------------------------------------------------------------------------
1 | {
2 | "analytics": true
3 | }
4 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .sass-cache
3 | npm-debug.log
4 | *.swp
--------------------------------------------------------------------------------
/.jshintignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "asi": false,
3 | "curly": true,
4 | "es3": true,
5 | "latedef": "nofunc",
6 | "eqeqeq": false,
7 | "noarg": true,
8 | "noempty": true,
9 | "undef": true,
10 | "unused": true,
11 | "debug": false,
12 | "evil": false,
13 | "globalstrict": false,
14 | "loopfunc": false,
15 | "proto": false,
16 | "scripturl": true,
17 | "supernew": false,
18 | "freeze": true,
19 | "indent": 4,
20 | "camelcase": true,
21 | "multistr": true,
22 | "sub": true,
23 | "expr": true,
24 | "maxdepth": 3,
25 | "browser": true,
26 | "devel": false,
27 | "node": true,
28 | "globals": {
29 | "KISSY": true,
30 | "JSTracker": true,
31 | "TB": true,
32 | "goldlog": true,
33 | "alert": true
34 | },
35 | "-W044": true
36 | }
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ### v0.5.0
2 |
3 | | mixin name | IE | Chrome | Safari | Firefox | Opera | IOS
4 | |:----:|:----:|:----:|:----:|:----:|:----:|:----:|
5 | |x-backface-visibility | 10+ | √ | √ | √ | √ | X |
6 | |x-perspective | 10+ | √ | √ | √ | √ | √ |
7 | |x-perspective-origin | 10+ | √ | √ | √ | √ | √ |
8 | |x-transform-origin | 9+ | √ | √ | √ | √ | √ |
9 | |x-transform-style | X | √ | √ | √ | √ | √ |
10 | |x-radial-gradient | 10+ | √ | √ | √ | √ | √ |
11 |
12 |
13 |
14 | ### v0.4.0
15 |
16 | | mixin name | IE | Chrome | Safari | Firefox | Opera | IOS
17 | |:----:|:----:|:----:|:----:|:----:|:----:|:----:|
18 | |x-appearance | X | √ | √ | √ | √ | √ |
19 | |x-background-retina | 6+ | √ | √ | √ | √ | √ |
20 | |x-background-clip | 9+ | √ | √ | √ | √ | √ |
21 | |x-background-origin | 9+ | √ | √ | √ | √ | √ |
22 | |x-background-size | 9+ | √ | √ | √ | √ | √ |
23 | |x-hyphens | 6+ | √ | √ | √ | √ | √ |
24 | |x-placeholder | 10+ | √ | √ | √ | √ | √ |
25 | |x-user-select | 10+ | √ | √ | √ | √ | √ |
26 |
27 |
28 |
29 | ### v0.3.0
30 |
31 | | mixin name | IE | Chrome | Safari | Firefox | Opera | IOS
32 | |:----:|:----:|:----:|:----:|:----:|:----:|:----:|
33 | |x-transform | 9+ | √ | √ | √ | √ | √ |
34 | |x-transition | 10+ | √ | √ | √ | √ | √ |
35 | |x-animation | 10+ | √ | √ | √ | √ | √ |
36 |
37 |
38 |
39 | ### v0.2.1
40 |
41 | > note:bugfix for x-linear-gradient mixin in IE6~9
42 |
43 |
44 |
45 | ### v0.2.0
46 |
47 | | mixin name | IE | Chrome | Safari | Firefox | Opera | IOS
48 | |:----:|:----:|:----:|:----:|:----:|:----:|:----:|
49 | |x-grayscale | 6~9 | √ | √ | √ | √ | √ |
50 |
51 |
52 |
53 | ### v0.1.0
54 |
55 | | mixin name | IE | Chrome | Safari | Firefox | Opera | IOS
56 | |:----:|:----:|:----:|:----:|:----:|:----:|:----:|
57 | |x-border-radius | 9+ | √ | √ | √ | √ | √ |
58 | |x-border-triangle | 6+ | √ | √ | √ | √ | √ |
59 | |x-box-shadow | 9+ | √ | √ | √ | √ | √ |
60 | |x-box-sizing | 9+ | √ | √ | √ | √ | √ |
61 | |x-text-overflow | 6+ | √ | √ | √ | √ | √ |
62 | |x-clearfix | 6+ | √ | √ | √ | √ | √ |
63 | |x-min-height | 6+ | √ | √ | √ | √ | √ |
64 | |x-opacity | 6+ | √ | √ | √ | √ | √ |
65 | |x-inline-block | 6+ | √ | √ | √ | √ | √ |
66 | |x-font-face | 6+ | √ | √ | √ | √ | √ |
67 | |x-linear-gradient | 6+ | √ | √ | √ | √ | √ |
68 |
69 |
--------------------------------------------------------------------------------
/Gruntfile.js:
--------------------------------------------------------------------------------
1 | module.exports = function(grunt) {
2 |
3 | 'use strict';
4 |
5 | var address = require('ip').address();
6 |
7 | grunt.initConfig({
8 | srcDir: 'src',
9 | docDir: 'doc',
10 | testDir: 'test',
11 | fragmentDir: 'fragment',
12 |
13 | outputFileName: 'index',
14 | outputLessFile: '<%= outputFileName %>.less',
15 | outputSassFile: '<%= outputFileName %>.scss',
16 | outputStylFile: '<%= outputFileName %>.styl',
17 |
18 | headFilePath: '<%= fragmentDir %>/head.html',
19 | footFilePath: '<%= fragmentDir %>/foot.html',
20 | exampleFilePath: '<%= srcDir %>/**/example',
21 | mixinDocFilePath: '<%= srcDir %>/**/readme',
22 | mixinSrcFilePath: '<%= srcDir %>/**/mixin',
23 |
24 | concat: {
25 | // generate doc
26 | doc: {
27 | options: {
28 | separator: '\r\n\r\n
\r\n\r\n'
29 | },
30 | files: {
31 | '<%= docDir %>/less.md': ['<%= mixinDocFilePath %>.less.tmp'],
32 | '<%= docDir %>/sass.md': ['<%= mixinDocFilePath %>.scss.tmp'],
33 | '<%= docDir %>/styl.md': ['<%= mixinDocFilePath %>.styl.tmp']
34 | }
35 | },
36 | // generate the entrance files
37 | mixin: {
38 | options: {
39 | stripBanners: true
40 | },
41 | files: {
42 | '<%= outputLessFile %>': ['<%= mixinSrcFilePath %>.less'],
43 | '<%= outputSassFile %>': ['<%= mixinSrcFilePath %>.scss'],
44 | '<%= outputStylFile %>': ['<%= mixinSrcFilePath %>.styl']
45 | }
46 | },
47 | // generate demo html
48 | demoHtml: {
49 | files: {
50 | '<%= testDir %>/less/demo.html': [
51 | '<%= headFilePath %>',
52 | '<%= exampleFilePath %>.html',
53 | '<%= footFilePath %>'
54 | ],
55 | '<%= testDir %>/sass/demo.html': [
56 | '<%= headFilePath %>',
57 | '<%= exampleFilePath %>.html',
58 | '<%= footFilePath %>'
59 | ],
60 | '<%= testDir %>/styl/demo.html': [
61 | '<%= headFilePath %>',
62 | '<%= exampleFilePath %>.html',
63 | '<%= footFilePath %>'
64 | ]
65 | }
66 | },
67 | // generate demo style
68 | demoStyle: {
69 | files: {
70 | '<%= testDir %>/less/demo.less': [
71 | '<%= outputLessFile %>',
72 | '<%= exampleFilePath %>.less.tmp'
73 | ],
74 | '<%= testDir %>/sass/demo.scss': [
75 | '<%= outputSassFile %>',
76 | '<%= exampleFilePath %>.scss.tmp'
77 | ],
78 | '<%= testDir %>/styl/demo.styl': [
79 | '<%= outputStylFile %>',
80 | '<%= exampleFilePath %>.styl.tmp'
81 | ]
82 | }
83 | }
84 | },
85 | less: {
86 | all: {
87 | src: ['<%= testDir %>/less/demo.less'],
88 | dest: '<%= testDir %>/less/demo.css'
89 | }
90 | },
91 | sass: {
92 | all: {
93 | src: ['<%= testDir %>/sass/demo.scss'],
94 | dest: '<%= testDir %>/sass/demo.css'
95 | }
96 | },
97 | stylus: {
98 | all: {
99 | options: {
100 | compress: false
101 | },
102 | files: {
103 | '<%= testDir %>/styl/demo.css': ['<%= testDir %>/styl/demo.styl']
104 | }
105 | }
106 | },
107 | clean: {
108 | tmpFiles: [
109 | '<%= testDir %>/less/demo.less',
110 | '<%= testDir %>/sass/demo.scss',
111 | '<%= testDir %>/styl/demo.styl',
112 | '<%= exampleFilePath %>.*.tmp',
113 | '<%= mixinDocFilePath %>.*.tmp'
114 | ]
115 | },
116 | concurrent: {
117 | dev: {
118 | tasks: ['connect', 'watch'],
119 | options: {
120 | logConcurrentOutput: true
121 | }
122 | }
123 | },
124 | connect: {
125 | demo: {
126 | options: {
127 | hostname: address,
128 | directory: 'test',
129 | port: '8001',
130 | debug: true,
131 | open: 'http://' + address + ':8001/test/less/demo.html',
132 | keepalive: true
133 | }
134 | }
135 | },
136 | watch: {
137 | all: {
138 | files: [
139 | '<%= srcDir %>/**/*',
140 | '!<%= srcDir %>/**/*.tmp',
141 | '<%= fragmentDir %>/*.html',
142 | 'tasks/*.js'
143 | ],
144 | tasks: ['default']
145 | }
146 | },
147 | jshint: {
148 | options: {
149 | jshintrc: true,
150 | reporter: require('jshint-stylish') // beauty jshint output
151 | },
152 | all: ['tasks/**/*.js']
153 | }
154 | });
155 |
156 | require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
157 |
158 | // generate readme and example for mixin module
159 | grunt.task.loadTasks('./tasks/generate');
160 |
161 | /**
162 | * add module
163 | * @usage grunt add:modName
164 | */
165 | grunt.task.loadTasks('./tasks/add');
166 |
167 | /**
168 | * set package version
169 | * @usage grunt version:x.x.x
170 | */
171 | grunt.task.loadTasks('./tasks/version');
172 |
173 | grunt.registerTask('default', [
174 | 'generate',
175 | 'concat',
176 | 'less',
177 | 'sass',
178 | 'stylus',
179 | 'clean'
180 | ]);
181 |
182 | grunt.registerTask('demo', ['concurrent:dev']);
183 |
184 | };
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | # XMixins 
4 |
5 | XMixins is a super CSS mixin library, it has five features:
6 |
7 | 1. Compatible major CSS preprocessor (LESS, SASS and Stylus) .
8 |
9 | 2. Provide the same mixin for different CSS preprocessor .
10 |
11 | 3. Full compliance with CSS3 specification (CSS3 mixins) .
12 |
13 | 4. Compatible with many terminals (desktop, tablet and mobile) .
14 |
15 | 5. Installation is very easy (compared to Compass) .
16 |
17 |
18 |
19 | ### 1. Usage
20 |
21 | (1) install: `bower install xmixins`
22 |
23 | // After installed, can generate the following files in the current directory
24 | bower_components
25 | -- xmixins
26 | -- index.less
27 | -- index.scss
28 | -- index.styl
29 |
30 | (2) import xmixins to your style file
31 |
32 | @import "bower_components/xmixins/index";
33 |
34 |
35 |
36 | ### 2. Example
37 |
38 | Add linear gradient to the target element:
39 |
40 | // for less
41 | div {
42 | .x-linear-gradient(to bottom, #fff, #666);
43 | }
44 |
45 | // for sass
46 | div {
47 | @include x-linear-gradient(to bottom, #fff, #666);
48 | }
49 |
50 | // for stylus
51 | div {
52 | x-linear-gradient(to bottom, #fff, #666);
53 | }
54 |
55 |
56 |
57 | ### 3. Doc for mixins
58 |
59 | * [doc for less](./doc/less.md)
60 | * [doc for sass](./doc/sass.md)
61 | * [doc for stylus](./doc/styl.md)
62 |
63 |
64 |
65 | ### 4. Released mixins
66 |
67 | **(1) CSS3**
68 |
69 | | mixin name | IE | Chrome | Safari | Firefox | Opera | IOS | Android |
70 | |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|
71 | |x-appearance | X | √ | √ | √ | √ | √ | ? |
72 | |x-animation | 10+ | √ | √ | √ | √ | √ | ? |
73 | |x-background-clip | 9+ | √ | √ | √ | √ | √ | ? |
74 | |x-background-origin | 9+ | √ | √ | √ | √ | √ | ? |
75 | |x-background-size | 9+ | √ | √ | √ | √ | √ | ? |
76 | |x-backface-visibility | 10+ | √ | √ | √ | √ | X | ? |
77 | |x-border-radius | 9+ | √ | √ | √ | √ | √ | ? |
78 | |x-box-shadow | 9+ | √ | √ | √ | √ | √ | ? |
79 | |x-box-sizing | 9+ | √ | √ | √ | √ | √ | ? |
80 | |x-text-overflow | 6+ | √ | √ | √ | √ | √ | ? |
81 | |x-min-height | 6+ | √ | √ | √ | √ | √ | ? |
82 | |x-opacity | 6+ | √ | √ | √ | √ | √ | ? |
83 | |x-inline-block | 6+ | √ | √ | √ | √ | √ | ? |
84 | |x-font-face | 6+ | √ | √ | √ | √ | √ | ? |
85 | |x-linear-gradient | 6+ | √ | √ | √ | √ | √ | ? |
86 | |x-radial-gradient | 10+ | √ | √ | √ | √ | √ | ? |
87 | |x-transform | 9+ | √ | √ | √ | √ | √ | ? |
88 | |x-transform-origin | 9+ | √ | √ | √ | √ | √ | ? |
89 | |x-transform-style | X | √ | √ | √ | √ | √ | ? |
90 | |x-transition | 10+ | √ | √ | √ | √ | √ | ? |
91 | |x-hyphens | 6+ | √ | √ | √ | √ | √ | ? |
92 | |x-perspective | 10+ | √ | √ | √ | √ | √ | ? |
93 | |x-perspective-origin | 10+ | √ | √ | √ | √ | √ | ? |
94 | |x-user-select | 10+ | √ | √ | √ | √ | √ | ? |
95 |
96 |
97 | **(2) Utilities**
98 |
99 | | mixin name | IE | Chrome | Safari | Firefox | Opera | IOS | Android |
100 | |:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|
101 | |x-background-retina | 6+ | √ | √ | √ | √ | √ | ? |
102 | |x-border-triangle | 6+ | √ | √ | √ | √ | √ | ? |
103 | |x-clearfix | 6+ | √ | √ | √ | √ | √ | ? |
104 | |x-grayscale | 6~9 | √ | √ | √ | √ | √ | ? |
105 | |x-placeholder | 10+ | √ | √ | √ | √ | √ | ? |
106 |
107 |
--------------------------------------------------------------------------------
/TODO.md:
--------------------------------------------------------------------------------
1 | ### 0.6.0
2 |
3 | * repeating-linear-gradient
4 | * repeating-radial-gradient
5 | * display-box
6 | * box-orient
7 | * box-pack
8 | * box-align
9 | * box-flex
10 | * columns
11 |
--------------------------------------------------------------------------------
/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "xmixins",
3 | "version": "0.5.0",
4 | "homepage": "https://github.com/mytcer/xmixins",
5 | "authors": [
6 | "mytcer"
7 | ],
8 | "description": "A css mixin library,which compatible with less, sass and stylus !",
9 | "main": "index.[less|scss|styl]",
10 | "keywords": [
11 | "stylus",
12 | "less",
13 | "sass",
14 | "mixin",
15 | "css3",
16 | "css",
17 | "compass",
18 | "bower",
19 | "component"
20 | ],
21 | "license": "MIT",
22 | "ignore": [
23 | "**/.*",
24 | "node_modules",
25 | "bower_components",
26 | "test",
27 | "tests",
28 | "tmp",
29 | "src",
30 | "doc",
31 | "tasks",
32 | "fragment",
33 | "images",
34 | ".bowerrc",
35 | ".jshintrc",
36 | ".jshintignore",
37 | ".gitignore",
38 | ".sass-cache",
39 | "bower.json",
40 | ".bower.json",
41 | "component.json",
42 | "package.json",
43 | "npm-debug.log",
44 | "Gruntfile.js",
45 | "CHANGELOG.md",
46 | "README.md",
47 | "TODO.md"
48 | ]
49 | }
50 |
--------------------------------------------------------------------------------
/component.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "xmixins",
3 | "repo": "mytcer/xmixins",
4 | "version": "0.5.0",
5 | "styles": [
6 | "index.less",
7 | "index.scss",
8 | "index.styl"
9 | ],
10 | "keywords": [
11 | "stylus",
12 | "less",
13 | "sass",
14 | "mixin",
15 | "css3",
16 | "css",
17 | "compass",
18 | "bower",
19 | "component"
20 | ],
21 | "author": "mytcer",
22 | "license": "MIT"
23 | }
24 |
--------------------------------------------------------------------------------
/doc/less.md:
--------------------------------------------------------------------------------
1 | ### **x-animation**
2 |
3 | > Description:css3 animation
4 |
5 | **1. usage**
6 |
7 | syntax:.x-animation(@value);
8 |
9 | params:
10 |
11 | * @value --- the composition of the value:
12 |
13 | * animation-name
14 |
15 | * animation-duration
16 |
17 | * animation-timing-function
18 |
19 | * animation-delay
20 |
21 | * animation-iteration-count
22 |
23 | * animation-direction
24 |
25 | note:the default value is "none 0 ease 0 1 normal"
26 |
27 | **2. example**
28 |
29 | div {
30 | .x-animation(test 3s ease);
31 | }
32 |
33 | **3. source**
34 |
35 | * [http://css-tricks.com/almanac/properties/a/animation/](http://css-tricks.com/almanac/properties/a/animation/)
36 |
37 |
38 |
39 |
40 | ### **x-appearance**
41 |
42 | > Description:css3 appearance
43 |
44 | **1. usage**
45 |
46 | syntax:.x-appearance(@value);
47 |
48 | params:
49 |
50 | * @value --- The available value:http://css-tricks.com/almanac/properties/a/appearance/
51 |
52 | **2. example**
53 |
54 | div {
55 | .x-appearance(button);
56 | }
57 |
58 | **3. source**
59 |
60 | * [http://css-tricks.com/almanac/properties/a/appearance/](http://css-tricks.com/almanac/properties/a/appearance/)
61 |
62 |
63 |
64 |
65 | ### **x-backface-visibility**
66 |
67 | > Description:Hidden the back of the rotating element .
68 |
69 | **1. usage**
70 |
71 | syntax:.x-backface-visibility(@value);
72 |
73 | params:
74 |
75 | * @value --- visible(default value)| hidden
76 |
77 | note:This is useful to avoid flicker when doing 3D effects .
78 |
79 | **2. example**
80 |
81 | div {
82 | .x-backface-visibility(hidden);
83 | }
84 |
85 | **3. source**
86 |
87 | * [http://css-tricks.com/almanac/properties/b/backface-visibility/](http://css-tricks.com/almanac/properties/b/backface-visibility/)
88 | * [http://www.w3school.com.cn/cssref/pr_backface-visibility.asp](http://www.w3school.com.cn/cssref/pr_backface-visibility.asp)
89 |
90 |
91 |
92 |
93 |
94 | ### **x-background-clip**
95 |
96 | > Description:css3 background-clip
97 |
98 | **1. usage**
99 |
100 | syntax:.x-background-clip(@mode);
101 |
102 | params:
103 |
104 | * @mode --- border-box(default value) | padding-box | content-box
105 |
106 | **2. example**
107 |
108 | div {
109 | .x-background-clip(content-box);
110 | }
111 |
112 | **3. source**
113 |
114 | * [http://www.w3school.com.cn/cssref/pr_background-clip.asp](http://www.w3school.com.cn/cssref/pr_background-clip.asp)
115 | * [http://css-tricks.com/transparent-borders-with-background-clip/](http://css-tricks.com/transparent-borders-with-background-clip/)
116 |
117 |
118 |
119 |
120 | ### **x-background-origin**
121 |
122 | > Description:css3 background-origin
123 |
124 | **1. usage**
125 |
126 | syntax:.x-background-origin(@mode);
127 |
128 | params:
129 |
130 | * @mode --- border-box(default value) | padding-box | content-box
131 |
132 | **2. example**
133 |
134 | div {
135 | .x-background-origin(content-box);
136 | }
137 |
138 | **3. source**
139 |
140 | * [http://www.w3school.com.cn/cssref/pr_background-origin.asp](http://www.w3school.com.cn/cssref/pr_background-origin.asp)
141 |
142 |
143 |
144 |
145 | ### **x-background-retina**
146 |
147 | > Description:background image support retina screen .
148 |
149 | **1. usage**
150 |
151 | syntax:.x-background-retina(@img_1x, @img_2x, @width_1x, @height_1x);
152 |
153 | params:
154 |
155 | * @img_1x --- 1x background image url,
156 |
157 | * @img_2x --- 2x background image url,
158 |
159 | * @width_1x --- 1x background image width
160 |
161 | * @height_1x --- 1x background image height
162 |
163 | **2. example**
164 |
165 | div {
166 | .x-background-retina("1x.png", "2x.png", 24px, 24px);
167 | }
168 |
169 |
170 |
171 |
172 | ### **x-background-size**
173 |
174 | > Description:css3 background-size
175 |
176 | **1. usage**
177 |
178 | syntax:.x-background-size(@size);
179 |
180 | params:
181 |
182 | * @size --- auto(default value)| length | percentage | cover | contain
183 |
184 | **2. example**
185 |
186 | div {
187 | .x-background-size(50% 50%);
188 | }
189 |
190 | **3. source**
191 |
192 | * [http://www.css3.info/preview/background-size/](http://www.css3.info/preview/background-size/)
193 | * [http://www.w3school.com.cn/cssref/pr_background-size.asp](http://www.w3school.com.cn/cssref/pr_background-size.asp)
194 |
195 |
196 |
197 |
198 | ### **x-border-radius**
199 |
200 | > Description:css3 border-radius
201 |
202 | **1. usage**
203 |
204 | syntax:.x-border-radius(@radius, @direction);
205 |
206 | params:
207 |
208 | * @direction --- all (default value) | top | left | bottom | left
209 |
210 | **2. example**
211 |
212 | div {
213 | .x-border-radius(3px); // set all corners
214 | }
215 |
216 | div {
217 | .x-border-radius(3px, top); // set topleft and topright corners
218 | }
219 |
220 | div {
221 | .x-border-radius(3px, right); // set topright and bottomright corners
222 | }
223 |
224 | div {
225 | .x-border-radius(3px, bottom); // set bottomleft and bottomright corners
226 | }
227 |
228 | div {
229 | .x-border-radius(3px, left); // set topleft and bottomleft corners
230 | }
231 |
232 | **3. source**
233 |
234 | * [http://css-tricks.com/almanac/properties/b/border-radius/](http://css-tricks.com/almanac/properties/b/border-radius/)
235 |
236 |
237 |
238 |
239 | ### **x-border-triangle**
240 |
241 | > Description:border triangle
242 |
243 | **1. usage**
244 |
245 | syntax:.x-border-triangle(@borderWidth, @borderColor, @direction);
246 |
247 | params:
248 |
249 | * @borderWidth --- etc, 5px
250 |
251 | * @borderColor --- etc, #666
252 |
253 | * @direction --- top | right | bottom | left | topleft | topright | bottomleft | bottomright
254 |
255 | **2. example**
256 |
257 | div {
258 | .x-border-triangle(5px, #666, top);
259 | }
260 |
261 | **3. source**
262 |
263 | * [http://css-tricks.com/examples/ShapesOfCSS/](http://css-tricks.com/examples/ShapesOfCSS/)
264 |
265 |
266 |
267 |
268 | ### **x-box-shadow**
269 |
270 | > Description:css3 box-shadow
271 |
272 | **1. usage**
273 |
274 | syntax:.x-box-shadow(@params);
275 |
276 | **2. example**
277 |
278 | div {
279 | .x-box-shadow(5px 5px 3px #000);
280 | }
281 |
282 | **3. source**
283 |
284 | * [http://css-tricks.com/snippets/css/css-box-shadow/](http://css-tricks.com/snippets/css/css-box-shadow/)
285 |
286 |
287 |
288 |
289 | ### **x-box-sizing**
290 |
291 | > Description:css3 box-sizing
292 |
293 | **1. usage**
294 |
295 | syntax:.x-box-sizing(@model);
296 |
297 | params:
298 |
299 | * @model --- content-box | border-box | inherit
300 |
301 | **2. example**
302 |
303 | div {
304 | .x-box-sizing(border-box);
305 | }
306 |
307 | **3. source**
308 |
309 | * [http://css-tricks.com/box-sizing/](http://css-tricks.com/box-sizing/)
310 |
311 |
312 |
313 |
314 | ### **x-clearfix**
315 |
316 | > Description:clear float
317 |
318 | **1. usage**
319 |
320 | syntax:.x-clearfix();
321 |
322 | **2. example**
323 |
324 | div {
325 | .x-clearfix();
326 | }
327 |
328 | **3. source**
329 |
330 | * [http://css-tricks.com/snippets/css/clear-fix/](http://css-tricks.com/snippets/css/clear-fix/)
331 |
332 |
333 |
334 |
335 | ### **x-font-face**
336 |
337 | > Description:css3 @font-face
338 |
339 | **1. usage**
340 |
341 | syntax:.x-font-face(@fontName, @fontUrl); // note:font url without a file extension
342 |
343 | **2. example**
344 |
345 | .x-font-face('iconfont', 'http://x.cdn.com/iconfont');
346 |
347 | div {
348 | font-family: 'iconfont';
349 | }
350 |
351 | **3. source**
352 |
353 | * [http://css-tricks.com/snippets/css/using-font-face/](http://css-tricks.com/snippets/css/using-font-face/)
354 |
355 |
356 |
357 |
358 |
359 | ### **x-grayscale**
360 |
361 | > Description:turn colour image into gray .
362 |
363 | **1. usage**
364 |
365 | syntax:.x-grayscale();
366 |
367 | **2. example**
368 |
369 | img {
370 | .x-grayscale(); // colour image into a gray image
371 | }
372 |
373 | **3. source**
374 |
375 | * [http://css-tricks.com/snippets/css/forcing-grayscale-printing/](http://css-tricks.com/snippets/css/forcing-grayscale-printing/)
376 |
377 |
378 |
379 |
380 | ### **x-hyphens**
381 |
382 | > Description:css3 hyphens
383 |
384 | **1. usage**
385 |
386 | syntax:.x-hyphens(@mode);
387 |
388 | params:
389 |
390 | * @mode --- none | manual | auto(default value)
391 |
392 | **2. example**
393 |
394 | div {
395 | .x-hyphens();
396 | }
397 |
398 | **3. source**
399 |
400 | * [http://css-tricks.com/almanac/properties/h/hyphenate/](http://css-tricks.com/almanac/properties/h/hyphenate/)
401 |
402 |
403 |
404 |
405 | ### **x-inline-block**
406 |
407 | > Description:inline-block
408 |
409 | **1. usage**
410 |
411 | syntax:.x-inline-block();
412 |
413 | **2. example**
414 |
415 | div {
416 | .x-inline-block();
417 | }
418 |
419 | **3. source**
420 |
421 | * [http://css-tricks.com/snippets/css/cross-browser-inline-block/](http://css-tricks.com/snippets/css/cross-browser-inline-block/)
422 |
423 |
424 |
425 |
426 | ### **x-linear-gradient**
427 |
428 | > Description:CSS3 linear-gradient
429 |
430 | **1. usage**
431 |
432 | syntax:.x-linear-gradient(...);
433 |
434 | params:
435 |
436 | * ... --- [ | to ]?,
437 |
438 | * :such as 45deg
439 |
440 | > Note: The IE6~9 only support "0deg, 90deg, 180deg, 270deg" .
441 |
442 | * to :to [left | right] || [top | bottom], default is "to bottom"
443 |
444 | > Note:The IE6~9 noly support "to top, to right, to bottom, to left" .
445 |
446 | * :color [length | %]? [, color [length | %]?]*
447 |
448 | > Note: The IE6~9 only support set two color value .
449 |
450 | **2. example**
451 |
452 | div {
453 | .x-linear-gradient(to bottom, #000, #fff);
454 | }
455 | div {
456 | .x-linear-gradient(90deg, #000 30%, #fff 60%);
457 | }
458 |
459 | **3. source**
460 |
461 | * [http://css-tricks.com/css3-gradients/](http://css-tricks.com/css3-gradients/)
462 | * [https://developer.mozilla.org/zh-CN/docs/Web/CSS/linear-gradient](https://developer.mozilla.org/zh-CN/docs/Web/CSS/linear-gradient)
463 | * [http://dev.w3.org/csswg/css-images-3/#funcdef-linear-gradient](http://dev.w3.org/csswg/css-images-3/#funcdef-linear-gradient)
464 |
465 |
466 |
467 |
468 | ### **x-min-height**
469 |
470 | > Description:min-height
471 |
472 | **1. usage**
473 |
474 | syntax:.x-min-height(@height);
475 |
476 | **2. example**
477 |
478 | div {
479 | .x-min-height(100px);
480 | }
481 |
482 | **3. source**
483 |
484 | * [http://css-tricks.com/snippets/css/cross-browser-min-height/#comment-100802](http://css-tricks.com/snippets/css/cross-browser-min-height/#comment-100802)
485 |
486 |
487 |
488 |
489 | ### **x-opacity**
490 |
491 | > Description:opacity
492 |
493 | **1. usage**
494 |
495 | syntax:.x-opacity(@opacity);
496 |
497 | **2. example**
498 |
499 | div {
500 | .x-opacity(0.5);
501 | }
502 |
503 | **3. source**
504 |
505 | * [http://css-tricks.com/almanac/properties/o/opacity/](http://css-tricks.com/almanac/properties/o/opacity/)
506 |
507 |
508 |
509 |
510 | ### **x-perspective-origin**
511 |
512 | > Description:Determines the origin for the perspective property(Actually set the X axis and Y axis position).
513 |
514 | **1. usage**
515 |
516 | syntax:.x-perspective-origin(@origin);
517 |
518 | params:
519 |
520 | * @origin --- left|center|right|length|% top|center|bottom|length|%
521 |
522 | note:
523 |
524 | * The default value is "50% 50%" .
525 |
526 | * Must use with the perspective property .
527 |
528 | **2. example**
529 |
530 | div {
531 | .x-perspective(100px);
532 | .x-perspective-origin(top left);
533 | }
534 |
535 | **3. source**
536 |
537 | * [http://css-tricks.com/almanac/properties/p/perspective-origin/](http://css-tricks.com/almanac/properties/p/perspective-origin/)
538 | * [http://www.w3cplus.com/css3/transform-basic-property.html](http://www.w3cplus.com/css3/transform-basic-property.html)
539 |
540 |
541 |
542 |
543 |
544 | ### **x-perspective**
545 |
546 | > Description:Gives an element a 3D-space by affecting the distance between the Z plane and the user.
547 |
548 | **1. usage**
549 |
550 | syntax:.x-perspective(@value);
551 |
552 | params:
553 |
554 | * @value --- none(default value)| length
555 |
556 | **2. example**
557 |
558 | div {
559 | .x-perspective(500px);
560 | }
561 |
562 | **3. source**
563 |
564 | * [http://www.zhangxinxu.com/wordpress/2012/09/css3-3d-transform-perspective-animate-transition/](http://www.zhangxinxu.com/wordpress/2012/09/css3-3d-transform-perspective-animate-transition/)
565 | * [http://css-tricks.com/almanac/properties/p/perspective/](http://css-tricks.com/almanac/properties/p/perspective/)
566 | * [http://www.w3cplus.com/css3/transform-basic-property.html](http://www.w3cplus.com/css3/transform-basic-property.html)
567 |
568 |
569 |
570 |
571 |
572 | ### **x-placeholder**
573 |
574 | > Description:set placeholder text color .
575 |
576 | **1. usage**
577 |
578 | syntax:.x-placeholder(@color);
579 |
580 | params:
581 |
582 | * @color --- The placeholder text's color
583 |
584 | **2. example**
585 |
586 | input {
587 | .x-placeholder(red);
588 | }
589 |
590 | **3. source**
591 |
592 | * [http://css-tricks.com/almanac/selectors/p/placeholder/](http://css-tricks.com/almanac/selectors/p/placeholder/)
593 | * [https://github.com/twbs/bootstrap/pull/11526](https://github.com/twbs/bootstrap/pull/11526)
594 |
595 |
596 |
597 |
598 | ### **x-radial-gradient**
599 |
600 | > Description:CSS3 radial gradient
601 |
602 | **1. usage**
603 |
604 | syntax:.x-radial-gradient(...);
605 |
606 | params:
607 |
608 | * ... --- [ | ]? [at ]?,
609 |
610 | * :circle | ellipse | [length | %]{1,2} ,default to circle
611 |
612 | * :closest-side | closest-corner | farthest-side | farthest-corner | length | [length | %]{2},default to farthest-corner
613 |
614 | * : [length | % | left | center | right ]? [length> | % | top | center | bottom ]?,default to center
615 |
616 | * [color-stop-list]:color [length | %]? [, color [length | %]?]*
617 |
618 | **2. example**
619 |
620 | div {
621 | .x-radial-gradient(circle, red, green);
622 | }
623 |
624 | **3. source**
625 |
626 | * [http://www.w3cplus.com/css3/new-css3-radial-gradient.html](http://www.w3cplus.com/css3/new-css3-radial-gradient.html)
627 | * [http://dev.w3.org/csswg/css-images-3/#radial-gradients](http://dev.w3.org/csswg/css-images-3/#radial-gradients)
628 |
629 |
630 |
631 |
632 |
633 | ### **x-text-overflow**
634 |
635 | > Description:text-overflow
636 |
637 | **1. usage**
638 |
639 | syntax:.x-text-overflow(@cutway);
640 |
641 | params:
642 |
643 | * @cutway --- ellipsis | clip (default value)
644 |
645 | **2. example**
646 |
647 | div {
648 | .x-text-overflow(ellipsis);
649 | }
650 |
651 | **3. source**
652 |
653 | * [http://css-tricks.com/almanac/properties/t/text-overflow/](http://css-tricks.com/almanac/properties/t/text-overflow/)
654 |
655 |
656 |
657 |
658 | ### **x-transform-origin**
659 |
660 | > Description:lets you modify the origin for transformations of an element.
661 |
662 | **1. usage**
663 |
664 | syntax:.x-transform-origin(@value);
665 |
666 | params:
667 |
668 | * @value --- x-offset y-offset z-offset
669 |
670 | * x-offset --- left|center|right|length|%
671 |
672 | * y-offset --- top|center|bottom|length|%
673 |
674 | * z-offset --- length
675 |
676 | The default value is:50% 50% 0
677 |
678 | **2. example**
679 |
680 | div {
681 | .x-transform-origin(top left);
682 | }
683 |
684 | **3. source**
685 |
686 | * [http://www.w3school.com.cn/cssref/pr_transform-origin.asp](http://www.w3school.com.cn/cssref/pr_transform-origin.asp)
687 | * [http://css-tricks.com/almanac/properties/t/transform-origin/](http://css-tricks.com/almanac/properties/t/transform-origin/)
688 |
689 |
690 |
691 |
692 |
693 | ### **x-transform-style**
694 |
695 | > Description:determines the element's children are positioned in 3D space, or flattened.
696 |
697 | **1. usage**
698 |
699 | syntax:.x-transform-style(@value);
700 |
701 | params:
702 |
703 | * @value --- flat | preserve-3d,
704 |
705 | **2. example**
706 |
707 | div {
708 | .x-transform-style(preserve-3d);
709 | }
710 |
711 | **3. source**
712 |
713 | * [http://www.w3school.com.cn/cssref/pr_transform-style.asp](http://www.w3school.com.cn/cssref/pr_transform-style.asp)
714 | * [http://css-tricks.com/almanac/properties/t/transform-style/](http://css-tricks.com/almanac/properties/t/transform-style/)
715 |
716 |
717 |
718 |
719 |
720 | ### **x-transform**
721 |
722 | > Description:css3 transform
723 |
724 | **1. usage**
725 |
726 | syntax:.x-transform(@value);
727 |
728 | params:
729 |
730 | * @value --- transform-functions | none(default value)
731 |
732 | **2. example**
733 |
734 | div {
735 | .x-transform(rotate(20deg));
736 | }
737 |
738 | **3. source**
739 |
740 | * [The available transform functions](http://www.w3school.com.cn/cssref/pr_transform.asp)
741 |
742 |
743 |
744 |
745 |
746 | ### **x-transition**
747 |
748 | > Description:css3 transition
749 |
750 | **1. usage**
751 |
752 | syntax:.x-transition(@value);
753 |
754 | params:
755 |
756 | * @value --- the composition of the value:
757 |
758 | * transition-property
759 |
760 | * transition-duration
761 |
762 | * transition-timing-function
763 |
764 | * transition-delay
765 |
766 | note:the default value is "all 0 ease 0"
767 |
768 | **2. example**
769 |
770 | div {
771 | height: 100px;
772 | .x-transition(height 2s ease);
773 | }
774 | div:hover {
775 | height: 300px;
776 | }
777 |
778 | **3. source**
779 |
780 | * [http://css-tricks.com/almanac/properties/t/transition/](http://css-tricks.com/almanac/properties/t/transition/)
781 |
782 |
783 |
784 |
785 |
786 | ### **x-user-select**
787 |
788 | > Description:css3 user-select
789 |
790 | **1. usage**
791 |
792 | syntax:.x-user-select(@mode);
793 |
794 | params:
795 |
796 | * @mode --- none | text(default value)| toggle | element | elements | all | inherit
797 |
798 | note:
799 |
800 | * In addition to “none" and "text", other value has compatibility problems.
801 |
802 | **2. example**
803 |
804 | div {
805 | .x-user-select();
806 | }
807 |
808 | **3. source**
809 |
810 | * [http://css-tricks.com/almanac/properties/u/user-select/](http://css-tricks.com/almanac/properties/u/user-select/)
811 | * [https://developer.mozilla.org/en-US/docs/Web/CSS/user-select](https://developer.mozilla.org/en-US/docs/Web/CSS/user-select)
812 | * [http://www.w3.org/TR/2000/WD-css3-userint-20000216#user-select](http://www.w3.org/TR/2000/WD-css3-userint-20000216#user-select)
813 |
--------------------------------------------------------------------------------
/doc/sass.md:
--------------------------------------------------------------------------------
1 | ### **x-animation**
2 |
3 | > Description:css3 animation
4 |
5 | **1. usage**
6 |
7 | syntax:@include x-animation($value);
8 |
9 | params:
10 |
11 | * $value --- the composition of the value:
12 |
13 | * animation-name
14 |
15 | * animation-duration
16 |
17 | * animation-timing-function
18 |
19 | * animation-delay
20 |
21 | * animation-iteration-count
22 |
23 | * animation-direction
24 |
25 | note:the default value is "none 0 ease 0 1 normal"
26 |
27 | **2. example**
28 |
29 | div {
30 | @include x-animation(test 3s ease);
31 | }
32 |
33 | **3. source**
34 |
35 | * [http://css-tricks.com/almanac/properties/a/animation/](http://css-tricks.com/almanac/properties/a/animation/)
36 |
37 |
38 |
39 |
40 | ### **x-appearance**
41 |
42 | > Description:css3 appearance
43 |
44 | **1. usage**
45 |
46 | syntax:@include x-appearance($value);
47 |
48 | params:
49 |
50 | * $value --- The available value:http://css-tricks.com/almanac/properties/a/appearance/
51 |
52 | **2. example**
53 |
54 | div {
55 | @include x-appearance(button);
56 | }
57 |
58 | **3. source**
59 |
60 | * [http://css-tricks.com/almanac/properties/a/appearance/](http://css-tricks.com/almanac/properties/a/appearance/)
61 |
62 |
63 |
64 |
65 | ### **x-backface-visibility**
66 |
67 | > Description:Hidden the back of the rotating element .
68 |
69 | **1. usage**
70 |
71 | syntax:@include x-backface-visibility($value);
72 |
73 | params:
74 |
75 | * $value --- visible(default value)| hidden
76 |
77 | note:This is useful to avoid flicker when doing 3D effects .
78 |
79 | **2. example**
80 |
81 | div {
82 | @include x-backface-visibility(hidden);
83 | }
84 |
85 | **3. source**
86 |
87 | * [http://css-tricks.com/almanac/properties/b/backface-visibility/](http://css-tricks.com/almanac/properties/b/backface-visibility/)
88 | * [http://www.w3school.com.cn/cssref/pr_backface-visibility.asp](http://www.w3school.com.cn/cssref/pr_backface-visibility.asp)
89 |
90 |
91 |
92 |
93 |
94 | ### **x-background-clip**
95 |
96 | > Description:css3 background-clip
97 |
98 | **1. usage**
99 |
100 | syntax:@include x-background-clip($mode);
101 |
102 | params:
103 |
104 | * $mode --- border-box(default value) | padding-box | content-box
105 |
106 | **2. example**
107 |
108 | div {
109 | @include x-background-clip(content-box);
110 | }
111 |
112 | **3. source**
113 |
114 | * [http://www.w3school.com.cn/cssref/pr_background-clip.asp](http://www.w3school.com.cn/cssref/pr_background-clip.asp)
115 | * [http://css-tricks.com/transparent-borders-with-background-clip/](http://css-tricks.com/transparent-borders-with-background-clip/)
116 |
117 |
118 |
119 |
120 | ### **x-background-origin**
121 |
122 | > Description:css3 background-origin
123 |
124 | **1. usage**
125 |
126 | syntax:@include x-background-origin($mode);
127 |
128 | params:
129 |
130 | * $mode --- border-box(default value) | padding-box | content-box
131 |
132 | **2. example**
133 |
134 | div {
135 | @include x-background-origin(content-box);
136 | }
137 |
138 | **3. source**
139 |
140 | * [http://www.w3school.com.cn/cssref/pr_background-origin.asp](http://www.w3school.com.cn/cssref/pr_background-origin.asp)
141 |
142 |
143 |
144 |
145 | ### **x-background-retina**
146 |
147 | > Description:background image support retina screen .
148 |
149 | **1. usage**
150 |
151 | syntax:@include x-background-retina($img_1x, $img_2x, $width_1x, $height_1x);
152 |
153 | params:
154 |
155 | * $img_1x --- 1x background image url,
156 |
157 | * $img_2x --- 2x background image url,
158 |
159 | * $width_1x --- 1x background image width
160 |
161 | * $height_1x --- 1x background image height
162 |
163 | **2. example**
164 |
165 | div {
166 | @include x-background-retina("1x.png", "2x.png", 24px, 24px);
167 | }
168 |
169 |
170 |
171 |
172 | ### **x-background-size**
173 |
174 | > Description:css3 background-size
175 |
176 | **1. usage**
177 |
178 | syntax:@include x-background-size($size);
179 |
180 | params:
181 |
182 | * $size --- auto(default value)| length | percentage | cover | contain
183 |
184 | **2. example**
185 |
186 | div {
187 | @include x-background-size(50% 50%);
188 | }
189 |
190 | **3. source**
191 |
192 | * [http://www.css3.info/preview/background-size/](http://www.css3.info/preview/background-size/)
193 | * [http://www.w3school.com.cn/cssref/pr_background-size.asp](http://www.w3school.com.cn/cssref/pr_background-size.asp)
194 |
195 |
196 |
197 |
198 | ### **x-border-radius**
199 |
200 | > Description:css3 border-radius
201 |
202 | **1. usage**
203 |
204 | syntax:@include x-border-radius($radius, $direction);
205 |
206 | params:
207 |
208 | * $direction --- all (default value) | top | left | bottom | left
209 |
210 | **2. example**
211 |
212 | div {
213 | @include x-border-radius(3px); // set all corners
214 | }
215 |
216 | div {
217 | @include x-border-radius(3px, top); // set topleft and topright corners
218 | }
219 |
220 | div {
221 | @include x-border-radius(3px, right); // set topright and bottomright corners
222 | }
223 |
224 | div {
225 | @include x-border-radius(3px, bottom); // set bottomleft and bottomright corners
226 | }
227 |
228 | div {
229 | @include x-border-radius(3px, left); // set topleft and bottomleft corners
230 | }
231 |
232 | **3. source**
233 |
234 | * [http://css-tricks.com/almanac/properties/b/border-radius/](http://css-tricks.com/almanac/properties/b/border-radius/)
235 |
236 |
237 |
238 |
239 | ### **x-border-triangle**
240 |
241 | > Description:border triangle
242 |
243 | **1. usage**
244 |
245 | syntax:@include x-border-triangle($borderWidth, $borderColor, $direction);
246 |
247 | params:
248 |
249 | * $borderWidth --- etc, 5px
250 |
251 | * $borderColor --- etc, #666
252 |
253 | * $direction --- top | right | bottom | left | topleft | topright | bottomleft | bottomright
254 |
255 | **2. example**
256 |
257 | div {
258 | @include x-border-triangle(5px, #666, top);
259 | }
260 |
261 | **3. source**
262 |
263 | * [http://css-tricks.com/examples/ShapesOfCSS/](http://css-tricks.com/examples/ShapesOfCSS/)
264 |
265 |
266 |
267 |
268 | ### **x-box-shadow**
269 |
270 | > Description:css3 box-shadow
271 |
272 | **1. usage**
273 |
274 | syntax:@include x-box-shadow($params);
275 |
276 | **2. example**
277 |
278 | div {
279 | @include x-box-shadow(5px 5px 3px #000);
280 | }
281 |
282 | **3. source**
283 |
284 | * [http://css-tricks.com/snippets/css/css-box-shadow/](http://css-tricks.com/snippets/css/css-box-shadow/)
285 |
286 |
287 |
288 |
289 | ### **x-box-sizing**
290 |
291 | > Description:css3 box-sizing
292 |
293 | **1. usage**
294 |
295 | syntax:@include x-box-sizing($model);
296 |
297 | params:
298 |
299 | * $model --- content-box | border-box | inherit
300 |
301 | **2. example**
302 |
303 | div {
304 | @include x-box-sizing(border-box);
305 | }
306 |
307 | **3. source**
308 |
309 | * [http://css-tricks.com/box-sizing/](http://css-tricks.com/box-sizing/)
310 |
311 |
312 |
313 |
314 | ### **x-clearfix**
315 |
316 | > Description:clear float
317 |
318 | **1. usage**
319 |
320 | syntax:@include x-clearfix();
321 |
322 | **2. example**
323 |
324 | div {
325 | @include x-clearfix();
326 | }
327 |
328 | **3. source**
329 |
330 | * [http://css-tricks.com/snippets/css/clear-fix/](http://css-tricks.com/snippets/css/clear-fix/)
331 |
332 |
333 |
334 |
335 | ### **x-font-face**
336 |
337 | > Description:css3 @font-face
338 |
339 | **1. usage**
340 |
341 | syntax:@include x-font-face($fontName, $fontUrl); // note:font url without a file extension
342 |
343 | **2. example**
344 |
345 | @include x-font-face('iconfont', 'http://x.cdn.com/iconfont');
346 |
347 | div {
348 | font-family: 'iconfont';
349 | }
350 |
351 | **3. source**
352 |
353 | * [http://css-tricks.com/snippets/css/using-font-face/](http://css-tricks.com/snippets/css/using-font-face/)
354 |
355 |
356 |
357 |
358 |
359 | ### **x-grayscale**
360 |
361 | > Description:turn colour image into gray .
362 |
363 | **1. usage**
364 |
365 | syntax:@include x-grayscale();
366 |
367 | **2. example**
368 |
369 | img {
370 | @include x-grayscale(); // colour image into a gray image
371 | }
372 |
373 | **3. source**
374 |
375 | * [http://css-tricks.com/snippets/css/forcing-grayscale-printing/](http://css-tricks.com/snippets/css/forcing-grayscale-printing/)
376 |
377 |
378 |
379 |
380 | ### **x-hyphens**
381 |
382 | > Description:css3 hyphens
383 |
384 | **1. usage**
385 |
386 | syntax:@include x-hyphens($mode);
387 |
388 | params:
389 |
390 | * $mode --- none | manual | auto(default value)
391 |
392 | **2. example**
393 |
394 | div {
395 | @include x-hyphens();
396 | }
397 |
398 | **3. source**
399 |
400 | * [http://css-tricks.com/almanac/properties/h/hyphenate/](http://css-tricks.com/almanac/properties/h/hyphenate/)
401 |
402 |
403 |
404 |
405 | ### **x-inline-block**
406 |
407 | > Description:inline-block
408 |
409 | **1. usage**
410 |
411 | syntax:@include x-inline-block();
412 |
413 | **2. example**
414 |
415 | div {
416 | @include x-inline-block();
417 | }
418 |
419 | **3. source**
420 |
421 | * [http://css-tricks.com/snippets/css/cross-browser-inline-block/](http://css-tricks.com/snippets/css/cross-browser-inline-block/)
422 |
423 |
424 |
425 |
426 | ### **x-linear-gradient**
427 |
428 | > Description:CSS3 linear-gradient
429 |
430 | **1. usage**
431 |
432 | syntax:@include x-linear-gradient(...);
433 |
434 | params:
435 |
436 | * ... --- [ | to ]?,
437 |
438 | * :such as 45deg
439 |
440 | > Note: The IE6~9 only support "0deg, 90deg, 180deg, 270deg" .
441 |
442 | * to :to [left | right] || [top | bottom], default is "to bottom"
443 |
444 | > Note:The IE6~9 noly support "to top, to right, to bottom, to left" .
445 |
446 | * :color [length | %]? [, color [length | %]?]*
447 |
448 | > Note: The IE6~9 only support set two color value .
449 |
450 | **2. example**
451 |
452 | div {
453 | @include x-linear-gradient(to bottom, #000, #fff);
454 | }
455 | div {
456 | @include x-linear-gradient(90deg, #000 30%, #fff 60%);
457 | }
458 |
459 | **3. source**
460 |
461 | * [http://css-tricks.com/css3-gradients/](http://css-tricks.com/css3-gradients/)
462 | * [https://developer.mozilla.org/zh-CN/docs/Web/CSS/linear-gradient](https://developer.mozilla.org/zh-CN/docs/Web/CSS/linear-gradient)
463 | * [http://dev.w3.org/csswg/css-images-3/#funcdef-linear-gradient](http://dev.w3.org/csswg/css-images-3/#funcdef-linear-gradient)
464 |
465 |
466 |
467 |
468 | ### **x-min-height**
469 |
470 | > Description:min-height
471 |
472 | **1. usage**
473 |
474 | syntax:@include x-min-height($height);
475 |
476 | **2. example**
477 |
478 | div {
479 | @include x-min-height(100px);
480 | }
481 |
482 | **3. source**
483 |
484 | * [http://css-tricks.com/snippets/css/cross-browser-min-height/#comment-100802](http://css-tricks.com/snippets/css/cross-browser-min-height/#comment-100802)
485 |
486 |
487 |
488 |
489 | ### **x-opacity**
490 |
491 | > Description:opacity
492 |
493 | **1. usage**
494 |
495 | syntax:@include x-opacity($opacity);
496 |
497 | **2. example**
498 |
499 | div {
500 | @include x-opacity(0.5);
501 | }
502 |
503 | **3. source**
504 |
505 | * [http://css-tricks.com/almanac/properties/o/opacity/](http://css-tricks.com/almanac/properties/o/opacity/)
506 |
507 |
508 |
509 |
510 | ### **x-perspective-origin**
511 |
512 | > Description:Determines the origin for the perspective property(Actually set the X axis and Y axis position).
513 |
514 | **1. usage**
515 |
516 | syntax:@include x-perspective-origin($origin);
517 |
518 | params:
519 |
520 | * $origin --- left|center|right|length|% top|center|bottom|length|%
521 |
522 | note:
523 |
524 | * The default value is "50% 50%" .
525 |
526 | * Must use with the perspective property .
527 |
528 | **2. example**
529 |
530 | div {
531 | @include x-perspective(100px);
532 | @include x-perspective-origin(top left);
533 | }
534 |
535 | **3. source**
536 |
537 | * [http://css-tricks.com/almanac/properties/p/perspective-origin/](http://css-tricks.com/almanac/properties/p/perspective-origin/)
538 | * [http://www.w3cplus.com/css3/transform-basic-property.html](http://www.w3cplus.com/css3/transform-basic-property.html)
539 |
540 |
541 |
542 |
543 |
544 | ### **x-perspective**
545 |
546 | > Description:Gives an element a 3D-space by affecting the distance between the Z plane and the user.
547 |
548 | **1. usage**
549 |
550 | syntax:@include x-perspective($value);
551 |
552 | params:
553 |
554 | * $value --- none(default value)| length
555 |
556 | **2. example**
557 |
558 | div {
559 | @include x-perspective(500px);
560 | }
561 |
562 | **3. source**
563 |
564 | * [http://www.zhangxinxu.com/wordpress/2012/09/css3-3d-transform-perspective-animate-transition/](http://www.zhangxinxu.com/wordpress/2012/09/css3-3d-transform-perspective-animate-transition/)
565 | * [http://css-tricks.com/almanac/properties/p/perspective/](http://css-tricks.com/almanac/properties/p/perspective/)
566 | * [http://www.w3cplus.com/css3/transform-basic-property.html](http://www.w3cplus.com/css3/transform-basic-property.html)
567 |
568 |
569 |
570 |
571 |
572 | ### **x-placeholder**
573 |
574 | > Description:set placeholder text color .
575 |
576 | **1. usage**
577 |
578 | syntax:@include x-placeholder($color);
579 |
580 | params:
581 |
582 | * $color --- The placeholder text's color
583 |
584 | **2. example**
585 |
586 | input {
587 | @include x-placeholder(red);
588 | }
589 |
590 | **3. source**
591 |
592 | * [http://css-tricks.com/almanac/selectors/p/placeholder/](http://css-tricks.com/almanac/selectors/p/placeholder/)
593 | * [https://github.com/twbs/bootstrap/pull/11526](https://github.com/twbs/bootstrap/pull/11526)
594 |
595 |
596 |
597 |
598 | ### **x-radial-gradient**
599 |
600 | > Description:CSS3 radial gradient
601 |
602 | **1. usage**
603 |
604 | syntax:@include x-radial-gradient(...);
605 |
606 | params:
607 |
608 | * ... --- [ | ]? [at ]?,
609 |
610 | * :circle | ellipse | [length | %]{1,2} ,default to circle
611 |
612 | * :closest-side | closest-corner | farthest-side | farthest-corner | length | [length | %]{2},default to farthest-corner
613 |
614 | * : [length | % | left | center | right ]? [length> | % | top | center | bottom ]?,default to center
615 |
616 | * [color-stop-list]:color [length | %]? [, color [length | %]?]*
617 |
618 | **2. example**
619 |
620 | div {
621 | @include x-radial-gradient(circle, red, green);
622 | }
623 |
624 | **3. source**
625 |
626 | * [http://www.w3cplus.com/css3/new-css3-radial-gradient.html](http://www.w3cplus.com/css3/new-css3-radial-gradient.html)
627 | * [http://dev.w3.org/csswg/css-images-3/#radial-gradients](http://dev.w3.org/csswg/css-images-3/#radial-gradients)
628 |
629 |
630 |
631 |
632 |
633 | ### **x-text-overflow**
634 |
635 | > Description:text-overflow
636 |
637 | **1. usage**
638 |
639 | syntax:@include x-text-overflow($cutway);
640 |
641 | params:
642 |
643 | * $cutway --- ellipsis | clip (default value)
644 |
645 | **2. example**
646 |
647 | div {
648 | @include x-text-overflow(ellipsis);
649 | }
650 |
651 | **3. source**
652 |
653 | * [http://css-tricks.com/almanac/properties/t/text-overflow/](http://css-tricks.com/almanac/properties/t/text-overflow/)
654 |
655 |
656 |
657 |
658 | ### **x-transform-origin**
659 |
660 | > Description:lets you modify the origin for transformations of an element.
661 |
662 | **1. usage**
663 |
664 | syntax:@include x-transform-origin($value);
665 |
666 | params:
667 |
668 | * $value --- x-offset y-offset z-offset
669 |
670 | * x-offset --- left|center|right|length|%
671 |
672 | * y-offset --- top|center|bottom|length|%
673 |
674 | * z-offset --- length
675 |
676 | The default value is:50% 50% 0
677 |
678 | **2. example**
679 |
680 | div {
681 | @include x-transform-origin(top left);
682 | }
683 |
684 | **3. source**
685 |
686 | * [http://www.w3school.com.cn/cssref/pr_transform-origin.asp](http://www.w3school.com.cn/cssref/pr_transform-origin.asp)
687 | * [http://css-tricks.com/almanac/properties/t/transform-origin/](http://css-tricks.com/almanac/properties/t/transform-origin/)
688 |
689 |
690 |
691 |
692 |
693 | ### **x-transform-style**
694 |
695 | > Description:determines the element's children are positioned in 3D space, or flattened.
696 |
697 | **1. usage**
698 |
699 | syntax:@include x-transform-style($value);
700 |
701 | params:
702 |
703 | * $value --- flat | preserve-3d,
704 |
705 | **2. example**
706 |
707 | div {
708 | @include x-transform-style(preserve-3d);
709 | }
710 |
711 | **3. source**
712 |
713 | * [http://www.w3school.com.cn/cssref/pr_transform-style.asp](http://www.w3school.com.cn/cssref/pr_transform-style.asp)
714 | * [http://css-tricks.com/almanac/properties/t/transform-style/](http://css-tricks.com/almanac/properties/t/transform-style/)
715 |
716 |
717 |
718 |
719 |
720 | ### **x-transform**
721 |
722 | > Description:css3 transform
723 |
724 | **1. usage**
725 |
726 | syntax:@include x-transform($value);
727 |
728 | params:
729 |
730 | * $value --- transform-functions | none(default value)
731 |
732 | **2. example**
733 |
734 | div {
735 | @include x-transform(rotate(20deg));
736 | }
737 |
738 | **3. source**
739 |
740 | * [The available transform functions](http://www.w3school.com.cn/cssref/pr_transform.asp)
741 |
742 |
743 |
744 |
745 |
746 | ### **x-transition**
747 |
748 | > Description:css3 transition
749 |
750 | **1. usage**
751 |
752 | syntax:@include x-transition($value);
753 |
754 | params:
755 |
756 | * $value --- the composition of the value:
757 |
758 | * transition-property
759 |
760 | * transition-duration
761 |
762 | * transition-timing-function
763 |
764 | * transition-delay
765 |
766 | note:the default value is "all 0 ease 0"
767 |
768 | **2. example**
769 |
770 | div {
771 | height: 100px;
772 | @include x-transition(height 2s ease);
773 | }
774 | div:hover {
775 | height: 300px;
776 | }
777 |
778 | **3. source**
779 |
780 | * [http://css-tricks.com/almanac/properties/t/transition/](http://css-tricks.com/almanac/properties/t/transition/)
781 |
782 |
783 |
784 |
785 |
786 | ### **x-user-select**
787 |
788 | > Description:css3 user-select
789 |
790 | **1. usage**
791 |
792 | syntax:@include x-user-select($mode);
793 |
794 | params:
795 |
796 | * $mode --- none | text(default value)| toggle | element | elements | all | inherit
797 |
798 | note:
799 |
800 | * In addition to “none" and "text", other value has compatibility problems.
801 |
802 | **2. example**
803 |
804 | div {
805 | @include x-user-select();
806 | }
807 |
808 | **3. source**
809 |
810 | * [http://css-tricks.com/almanac/properties/u/user-select/](http://css-tricks.com/almanac/properties/u/user-select/)
811 | * [https://developer.mozilla.org/en-US/docs/Web/CSS/user-select](https://developer.mozilla.org/en-US/docs/Web/CSS/user-select)
812 | * [http://www.w3.org/TR/2000/WD-css3-userint-20000216#user-select](http://www.w3.org/TR/2000/WD-css3-userint-20000216#user-select)
813 |
--------------------------------------------------------------------------------
/doc/styl.md:
--------------------------------------------------------------------------------
1 | ### **x-animation**
2 |
3 | > Description:css3 animation
4 |
5 | **1. usage**
6 |
7 | syntax:x-animation($value);
8 |
9 | params:
10 |
11 | * $value --- the composition of the value:
12 |
13 | * animation-name
14 |
15 | * animation-duration
16 |
17 | * animation-timing-function
18 |
19 | * animation-delay
20 |
21 | * animation-iteration-count
22 |
23 | * animation-direction
24 |
25 | note:the default value is "none 0 ease 0 1 normal"
26 |
27 | **2. example**
28 |
29 | div {
30 | x-animation(test 3s ease);
31 | }
32 |
33 | **3. source**
34 |
35 | * [http://css-tricks.com/almanac/properties/a/animation/](http://css-tricks.com/almanac/properties/a/animation/)
36 |
37 |
38 |
39 |
40 | ### **x-appearance**
41 |
42 | > Description:css3 appearance
43 |
44 | **1. usage**
45 |
46 | syntax:x-appearance($value);
47 |
48 | params:
49 |
50 | * $value --- The available value:http://css-tricks.com/almanac/properties/a/appearance/
51 |
52 | **2. example**
53 |
54 | div {
55 | x-appearance(button);
56 | }
57 |
58 | **3. source**
59 |
60 | * [http://css-tricks.com/almanac/properties/a/appearance/](http://css-tricks.com/almanac/properties/a/appearance/)
61 |
62 |
63 |
64 |
65 | ### **x-backface-visibility**
66 |
67 | > Description:Hidden the back of the rotating element .
68 |
69 | **1. usage**
70 |
71 | syntax:x-backface-visibility($value);
72 |
73 | params:
74 |
75 | * $value --- visible(default value)| hidden
76 |
77 | note:This is useful to avoid flicker when doing 3D effects .
78 |
79 | **2. example**
80 |
81 | div {
82 | x-backface-visibility(hidden);
83 | }
84 |
85 | **3. source**
86 |
87 | * [http://css-tricks.com/almanac/properties/b/backface-visibility/](http://css-tricks.com/almanac/properties/b/backface-visibility/)
88 | * [http://www.w3school.com.cn/cssref/pr_backface-visibility.asp](http://www.w3school.com.cn/cssref/pr_backface-visibility.asp)
89 |
90 |
91 |
92 |
93 |
94 | ### **x-background-clip**
95 |
96 | > Description:css3 background-clip
97 |
98 | **1. usage**
99 |
100 | syntax:x-background-clip($mode);
101 |
102 | params:
103 |
104 | * $mode --- border-box(default value) | padding-box | content-box
105 |
106 | **2. example**
107 |
108 | div {
109 | x-background-clip(content-box);
110 | }
111 |
112 | **3. source**
113 |
114 | * [http://www.w3school.com.cn/cssref/pr_background-clip.asp](http://www.w3school.com.cn/cssref/pr_background-clip.asp)
115 | * [http://css-tricks.com/transparent-borders-with-background-clip/](http://css-tricks.com/transparent-borders-with-background-clip/)
116 |
117 |
118 |
119 |
120 | ### **x-background-origin**
121 |
122 | > Description:css3 background-origin
123 |
124 | **1. usage**
125 |
126 | syntax:x-background-origin($mode);
127 |
128 | params:
129 |
130 | * $mode --- border-box(default value) | padding-box | content-box
131 |
132 | **2. example**
133 |
134 | div {
135 | x-background-origin(content-box);
136 | }
137 |
138 | **3. source**
139 |
140 | * [http://www.w3school.com.cn/cssref/pr_background-origin.asp](http://www.w3school.com.cn/cssref/pr_background-origin.asp)
141 |
142 |
143 |
144 |
145 | ### **x-background-retina**
146 |
147 | > Description:background image support retina screen .
148 |
149 | **1. usage**
150 |
151 | syntax:x-background-retina($img_1x, $img_2x, $width_1x, $height_1x);
152 |
153 | params:
154 |
155 | * $img_1x --- 1x background image url,
156 |
157 | * $img_2x --- 2x background image url,
158 |
159 | * $width_1x --- 1x background image width
160 |
161 | * $height_1x --- 1x background image height
162 |
163 | **2. example**
164 |
165 | div {
166 | x-background-retina("1x.png", "2x.png", 24px, 24px);
167 | }
168 |
169 |
170 |
171 |
172 | ### **x-background-size**
173 |
174 | > Description:css3 background-size
175 |
176 | **1. usage**
177 |
178 | syntax:x-background-size($size);
179 |
180 | params:
181 |
182 | * $size --- auto(default value)| length | percentage | cover | contain
183 |
184 | **2. example**
185 |
186 | div {
187 | x-background-size(50% 50%);
188 | }
189 |
190 | **3. source**
191 |
192 | * [http://www.css3.info/preview/background-size/](http://www.css3.info/preview/background-size/)
193 | * [http://www.w3school.com.cn/cssref/pr_background-size.asp](http://www.w3school.com.cn/cssref/pr_background-size.asp)
194 |
195 |
196 |
197 |
198 | ### **x-border-radius**
199 |
200 | > Description:css3 border-radius
201 |
202 | **1. usage**
203 |
204 | syntax:x-border-radius($radius, $direction);
205 |
206 | params:
207 |
208 | * $direction --- all (default value) | top | left | bottom | left
209 |
210 | **2. example**
211 |
212 | div {
213 | x-border-radius(3px); // set all corners
214 | }
215 |
216 | div {
217 | x-border-radius(3px, top); // set topleft and topright corners
218 | }
219 |
220 | div {
221 | x-border-radius(3px, right); // set topright and bottomright corners
222 | }
223 |
224 | div {
225 | x-border-radius(3px, bottom); // set bottomleft and bottomright corners
226 | }
227 |
228 | div {
229 | x-border-radius(3px, left); // set topleft and bottomleft corners
230 | }
231 |
232 | **3. source**
233 |
234 | * [http://css-tricks.com/almanac/properties/b/border-radius/](http://css-tricks.com/almanac/properties/b/border-radius/)
235 |
236 |
237 |
238 |
239 | ### **x-border-triangle**
240 |
241 | > Description:border triangle
242 |
243 | **1. usage**
244 |
245 | syntax:x-border-triangle($borderWidth, $borderColor, $direction);
246 |
247 | params:
248 |
249 | * $borderWidth --- etc, 5px
250 |
251 | * $borderColor --- etc, #666
252 |
253 | * $direction --- top | right | bottom | left | topleft | topright | bottomleft | bottomright
254 |
255 | **2. example**
256 |
257 | div {
258 | x-border-triangle(5px, #666, top);
259 | }
260 |
261 | **3. source**
262 |
263 | * [http://css-tricks.com/examples/ShapesOfCSS/](http://css-tricks.com/examples/ShapesOfCSS/)
264 |
265 |
266 |
267 |
268 | ### **x-box-shadow**
269 |
270 | > Description:css3 box-shadow
271 |
272 | **1. usage**
273 |
274 | syntax:x-box-shadow($params);
275 |
276 | **2. example**
277 |
278 | div {
279 | x-box-shadow(5px 5px 3px #000);
280 | }
281 |
282 | **3. source**
283 |
284 | * [http://css-tricks.com/snippets/css/css-box-shadow/](http://css-tricks.com/snippets/css/css-box-shadow/)
285 |
286 |
287 |
288 |
289 | ### **x-box-sizing**
290 |
291 | > Description:css3 box-sizing
292 |
293 | **1. usage**
294 |
295 | syntax:x-box-sizing($model);
296 |
297 | params:
298 |
299 | * $model --- content-box | border-box | inherit
300 |
301 | **2. example**
302 |
303 | div {
304 | x-box-sizing(border-box);
305 | }
306 |
307 | **3. source**
308 |
309 | * [http://css-tricks.com/box-sizing/](http://css-tricks.com/box-sizing/)
310 |
311 |
312 |
313 |
314 | ### **x-clearfix**
315 |
316 | > Description:clear float
317 |
318 | **1. usage**
319 |
320 | syntax:x-clearfix();
321 |
322 | **2. example**
323 |
324 | div {
325 | x-clearfix();
326 | }
327 |
328 | **3. source**
329 |
330 | * [http://css-tricks.com/snippets/css/clear-fix/](http://css-tricks.com/snippets/css/clear-fix/)
331 |
332 |
333 |
334 |
335 | ### **x-font-face**
336 |
337 | > Description:css3 @font-face
338 |
339 | **1. usage**
340 |
341 | syntax:x-font-face($fontName, $fontUrl); // note:font url without a file extension
342 |
343 | **2. example**
344 |
345 | x-font-face('iconfont', 'http://x.cdn.com/iconfont');
346 |
347 | div {
348 | font-family: 'iconfont';
349 | }
350 |
351 | **3. source**
352 |
353 | * [http://css-tricks.com/snippets/css/using-font-face/](http://css-tricks.com/snippets/css/using-font-face/)
354 |
355 |
356 |
357 |
358 |
359 | ### **x-grayscale**
360 |
361 | > Description:turn colour image into gray .
362 |
363 | **1. usage**
364 |
365 | syntax:x-grayscale();
366 |
367 | **2. example**
368 |
369 | img {
370 | x-grayscale(); // colour image into a gray image
371 | }
372 |
373 | **3. source**
374 |
375 | * [http://css-tricks.com/snippets/css/forcing-grayscale-printing/](http://css-tricks.com/snippets/css/forcing-grayscale-printing/)
376 |
377 |
378 |
379 |
380 | ### **x-hyphens**
381 |
382 | > Description:css3 hyphens
383 |
384 | **1. usage**
385 |
386 | syntax:x-hyphens($mode);
387 |
388 | params:
389 |
390 | * $mode --- none | manual | auto(default value)
391 |
392 | **2. example**
393 |
394 | div {
395 | x-hyphens();
396 | }
397 |
398 | **3. source**
399 |
400 | * [http://css-tricks.com/almanac/properties/h/hyphenate/](http://css-tricks.com/almanac/properties/h/hyphenate/)
401 |
402 |
403 |
404 |
405 | ### **x-inline-block**
406 |
407 | > Description:inline-block
408 |
409 | **1. usage**
410 |
411 | syntax:x-inline-block();
412 |
413 | **2. example**
414 |
415 | div {
416 | x-inline-block();
417 | }
418 |
419 | **3. source**
420 |
421 | * [http://css-tricks.com/snippets/css/cross-browser-inline-block/](http://css-tricks.com/snippets/css/cross-browser-inline-block/)
422 |
423 |
424 |
425 |
426 | ### **x-linear-gradient**
427 |
428 | > Description:CSS3 linear-gradient
429 |
430 | **1. usage**
431 |
432 | syntax:x-linear-gradient(...);
433 |
434 | params:
435 |
436 | * ... --- [ | to ]?,
437 |
438 | * :such as 45deg
439 |
440 | > Note: The IE6~9 only support "0deg, 90deg, 180deg, 270deg" .
441 |
442 | * to :to [left | right] || [top | bottom], default is "to bottom"
443 |
444 | > Note:The IE6~9 noly support "to top, to right, to bottom, to left" .
445 |
446 | * :color [length | %]? [, color [length | %]?]*
447 |
448 | > Note: The IE6~9 only support set two color value .
449 |
450 | **2. example**
451 |
452 | div {
453 | x-linear-gradient(to bottom, #000, #fff);
454 | }
455 | div {
456 | x-linear-gradient(90deg, #000 30%, #fff 60%);
457 | }
458 |
459 | **3. source**
460 |
461 | * [http://css-tricks.com/css3-gradients/](http://css-tricks.com/css3-gradients/)
462 | * [https://developer.mozilla.org/zh-CN/docs/Web/CSS/linear-gradient](https://developer.mozilla.org/zh-CN/docs/Web/CSS/linear-gradient)
463 | * [http://dev.w3.org/csswg/css-images-3/#funcdef-linear-gradient](http://dev.w3.org/csswg/css-images-3/#funcdef-linear-gradient)
464 |
465 |
466 |
467 |
468 | ### **x-min-height**
469 |
470 | > Description:min-height
471 |
472 | **1. usage**
473 |
474 | syntax:x-min-height($height);
475 |
476 | **2. example**
477 |
478 | div {
479 | x-min-height(100px);
480 | }
481 |
482 | **3. source**
483 |
484 | * [http://css-tricks.com/snippets/css/cross-browser-min-height/#comment-100802](http://css-tricks.com/snippets/css/cross-browser-min-height/#comment-100802)
485 |
486 |
487 |
488 |
489 | ### **x-opacity**
490 |
491 | > Description:opacity
492 |
493 | **1. usage**
494 |
495 | syntax:x-opacity($opacity);
496 |
497 | **2. example**
498 |
499 | div {
500 | x-opacity(0.5);
501 | }
502 |
503 | **3. source**
504 |
505 | * [http://css-tricks.com/almanac/properties/o/opacity/](http://css-tricks.com/almanac/properties/o/opacity/)
506 |
507 |
508 |
509 |
510 | ### **x-perspective-origin**
511 |
512 | > Description:Determines the origin for the perspective property(Actually set the X axis and Y axis position).
513 |
514 | **1. usage**
515 |
516 | syntax:x-perspective-origin($origin);
517 |
518 | params:
519 |
520 | * $origin --- left|center|right|length|% top|center|bottom|length|%
521 |
522 | note:
523 |
524 | * The default value is "50% 50%" .
525 |
526 | * Must use with the perspective property .
527 |
528 | **2. example**
529 |
530 | div {
531 | x-perspective(100px);
532 | x-perspective-origin(top left);
533 | }
534 |
535 | **3. source**
536 |
537 | * [http://css-tricks.com/almanac/properties/p/perspective-origin/](http://css-tricks.com/almanac/properties/p/perspective-origin/)
538 | * [http://www.w3cplus.com/css3/transform-basic-property.html](http://www.w3cplus.com/css3/transform-basic-property.html)
539 |
540 |
541 |
542 |
543 |
544 | ### **x-perspective**
545 |
546 | > Description:Gives an element a 3D-space by affecting the distance between the Z plane and the user.
547 |
548 | **1. usage**
549 |
550 | syntax:x-perspective($value);
551 |
552 | params:
553 |
554 | * $value --- none(default value)| length
555 |
556 | **2. example**
557 |
558 | div {
559 | x-perspective(500px);
560 | }
561 |
562 | **3. source**
563 |
564 | * [http://www.zhangxinxu.com/wordpress/2012/09/css3-3d-transform-perspective-animate-transition/](http://www.zhangxinxu.com/wordpress/2012/09/css3-3d-transform-perspective-animate-transition/)
565 | * [http://css-tricks.com/almanac/properties/p/perspective/](http://css-tricks.com/almanac/properties/p/perspective/)
566 | * [http://www.w3cplus.com/css3/transform-basic-property.html](http://www.w3cplus.com/css3/transform-basic-property.html)
567 |
568 |
569 |
570 |
571 |
572 | ### **x-placeholder**
573 |
574 | > Description:set placeholder text color .
575 |
576 | **1. usage**
577 |
578 | syntax:x-placeholder($color);
579 |
580 | params:
581 |
582 | * $color --- The placeholder text's color
583 |
584 | **2. example**
585 |
586 | input {
587 | x-placeholder(red);
588 | }
589 |
590 | **3. source**
591 |
592 | * [http://css-tricks.com/almanac/selectors/p/placeholder/](http://css-tricks.com/almanac/selectors/p/placeholder/)
593 | * [https://github.com/twbs/bootstrap/pull/11526](https://github.com/twbs/bootstrap/pull/11526)
594 |
595 |
596 |
597 |
598 | ### **x-radial-gradient**
599 |
600 | > Description:CSS3 radial gradient
601 |
602 | **1. usage**
603 |
604 | syntax:x-radial-gradient(...);
605 |
606 | params:
607 |
608 | * ... --- [ | ]? [at ]?,
609 |
610 | * :circle | ellipse | [length | %]{1,2} ,default to circle
611 |
612 | * :closest-side | closest-corner | farthest-side | farthest-corner | length | [length | %]{2},default to farthest-corner
613 |
614 | * : [length | % | left | center | right ]? [length> | % | top | center | bottom ]?,default to center
615 |
616 | * [color-stop-list]:color [length | %]? [, color [length | %]?]*
617 |
618 | **2. example**
619 |
620 | div {
621 | x-radial-gradient(circle, red, green);
622 | }
623 |
624 | **3. source**
625 |
626 | * [http://www.w3cplus.com/css3/new-css3-radial-gradient.html](http://www.w3cplus.com/css3/new-css3-radial-gradient.html)
627 | * [http://dev.w3.org/csswg/css-images-3/#radial-gradients](http://dev.w3.org/csswg/css-images-3/#radial-gradients)
628 |
629 |
630 |
631 |
632 |
633 | ### **x-text-overflow**
634 |
635 | > Description:text-overflow
636 |
637 | **1. usage**
638 |
639 | syntax:x-text-overflow($cutway);
640 |
641 | params:
642 |
643 | * $cutway --- ellipsis | clip (default value)
644 |
645 | **2. example**
646 |
647 | div {
648 | x-text-overflow(ellipsis);
649 | }
650 |
651 | **3. source**
652 |
653 | * [http://css-tricks.com/almanac/properties/t/text-overflow/](http://css-tricks.com/almanac/properties/t/text-overflow/)
654 |
655 |
656 |
657 |
658 | ### **x-transform-origin**
659 |
660 | > Description:lets you modify the origin for transformations of an element.
661 |
662 | **1. usage**
663 |
664 | syntax:x-transform-origin($value);
665 |
666 | params:
667 |
668 | * $value --- x-offset y-offset z-offset
669 |
670 | * x-offset --- left|center|right|length|%
671 |
672 | * y-offset --- top|center|bottom|length|%
673 |
674 | * z-offset --- length
675 |
676 | The default value is:50% 50% 0
677 |
678 | **2. example**
679 |
680 | div {
681 | x-transform-origin(top left);
682 | }
683 |
684 | **3. source**
685 |
686 | * [http://www.w3school.com.cn/cssref/pr_transform-origin.asp](http://www.w3school.com.cn/cssref/pr_transform-origin.asp)
687 | * [http://css-tricks.com/almanac/properties/t/transform-origin/](http://css-tricks.com/almanac/properties/t/transform-origin/)
688 |
689 |
690 |
691 |
692 |
693 | ### **x-transform-style**
694 |
695 | > Description:determines the element's children are positioned in 3D space, or flattened.
696 |
697 | **1. usage**
698 |
699 | syntax:x-transform-style($value);
700 |
701 | params:
702 |
703 | * $value --- flat | preserve-3d,
704 |
705 | **2. example**
706 |
707 | div {
708 | x-transform-style(preserve-3d);
709 | }
710 |
711 | **3. source**
712 |
713 | * [http://www.w3school.com.cn/cssref/pr_transform-style.asp](http://www.w3school.com.cn/cssref/pr_transform-style.asp)
714 | * [http://css-tricks.com/almanac/properties/t/transform-style/](http://css-tricks.com/almanac/properties/t/transform-style/)
715 |
716 |
717 |
718 |
719 |
720 | ### **x-transform**
721 |
722 | > Description:css3 transform
723 |
724 | **1. usage**
725 |
726 | syntax:x-transform($value);
727 |
728 | params:
729 |
730 | * $value --- transform-functions | none(default value)
731 |
732 | **2. example**
733 |
734 | div {
735 | x-transform(rotate(20deg));
736 | }
737 |
738 | **3. source**
739 |
740 | * [The available transform functions](http://www.w3school.com.cn/cssref/pr_transform.asp)
741 |
742 |
743 |
744 |
745 |
746 | ### **x-transition**
747 |
748 | > Description:css3 transition
749 |
750 | **1. usage**
751 |
752 | syntax:x-transition($value);
753 |
754 | params:
755 |
756 | * $value --- the composition of the value:
757 |
758 | * transition-property
759 |
760 | * transition-duration
761 |
762 | * transition-timing-function
763 |
764 | * transition-delay
765 |
766 | note:the default value is "all 0 ease 0"
767 |
768 | **2. example**
769 |
770 | div {
771 | height: 100px;
772 | x-transition(height 2s ease);
773 | }
774 | div:hover {
775 | height: 300px;
776 | }
777 |
778 | **3. source**
779 |
780 | * [http://css-tricks.com/almanac/properties/t/transition/](http://css-tricks.com/almanac/properties/t/transition/)
781 |
782 |
783 |
784 |
785 |
786 | ### **x-user-select**
787 |
788 | > Description:css3 user-select
789 |
790 | **1. usage**
791 |
792 | syntax:x-user-select($mode);
793 |
794 | params:
795 |
796 | * $mode --- none | text(default value)| toggle | element | elements | all | inherit
797 |
798 | note:
799 |
800 | * In addition to “none" and "text", other value has compatibility problems.
801 |
802 | **2. example**
803 |
804 | div {
805 | x-user-select();
806 | }
807 |
808 | **3. source**
809 |
810 | * [http://css-tricks.com/almanac/properties/u/user-select/](http://css-tricks.com/almanac/properties/u/user-select/)
811 | * [https://developer.mozilla.org/en-US/docs/Web/CSS/user-select](https://developer.mozilla.org/en-US/docs/Web/CSS/user-select)
812 | * [http://www.w3.org/TR/2000/WD-css3-userint-20000216#user-select](http://www.w3.org/TR/2000/WD-css3-userint-20000216#user-select)
813 |
--------------------------------------------------------------------------------
/fragment/foot.html:
--------------------------------------------------------------------------------
1 |