This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//svg 的 `preserveAspectRatio` 和 `viewBox` 属性无法用 css 设定,下面是 `jsx`辅助 | |
const svg = ( | |
width: 100, $height: 100, // 元素区尺寸 w h | |
adaption: contain, // 适配方式 contain cover fill | |
src: src, | |
) => ( | |
<svg preserveAspectRatio={{ | |
"contain":"xMinYMin meet", | |
"cover":"xMinYMin slice", | |
"fill":"none", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//background(0, 0, 100, 100, contain, 50%, 50%) | |
@mixin background( | |
$x: 0, $y: 0, // 元素区坐标 x y | |
$width: 100, $height: 100, // 元素区尺寸 w h | |
$adaption: contain, // 适配方式 contain cover fill | |
$horizontal: 50%, $vertical: 50% // 适配区对齐 m n | |
) { | |
$v: 1080; // 适配区宽 v | |
$g: 1920; // 适配区高 g |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//img(0, 0, 100, 100, contain, 50%, 50%) | |
@mixin img( | |
$x: 0, $y: 0, // 元素区坐标 x y | |
$width: 100, $height: 100, // 元素区尺寸 w h | |
$adaption: contain, // 适配方式 contain cover fill | |
$horizontal: 50%, $vertical: 50% // 适配区对齐 m n | |
) { | |
$v: 1080; // 适配区宽 v | |
$g: 1920; // 适配区高 g |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
MIT license | |
what: | |
selected frames svg smil path data generator by Def ([email protected]) | |
why: | |
[Flash2Svg](https://github.com/TomByrne/Flash2Svg) and [SnapSVG-Animator](http://cjgammon.github.io/SnapSVG-Animator/) are awesome. | |
but both of them generate shape tween svg code in frame by frame way. | |
this script generate svg path code in the keyframe way flash used. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Canvas Polyline", | |
"description": "Draw a polyline on a Canvas", | |
"keywords": [ "canvas", "line", "draw", "polyline" ], | |
"version": "0.1.0" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "CSS 3 Transitions Detector", | |
"description": "Detects CSS 3 transitions support on many browsers", | |
"keywords": [ "CSS 3", "transitions", "detect", "crossbrowser", "animation" ], | |
"version": "0.1.0" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "getElementsByClassName", | |
"description": "Prototype methods for Internet Explorer <9.0 and other old web browsers that do not support HTML5.", | |
"keywords": [ "class", "dom", "ie", "prototype" ], | |
"version": "0.1.0" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "HSVHSLConverter", | |
"description": "Converts back and forth between HSV and HSL.", | |
"keywords": [ "color", "hsl" "hsv" ], | |
"version": "0.1.0" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "hsl2rgb", | |
"description": "Converts hue-saturation-lightness to red-green-blue color value.", | |
"version": "0.1.0", | |
"contributors": [ | |
{ | |
"name" : "Martin Kleppe", | |
"url" : "https://github.com/aemkei" | |
}, | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "hsvToRgb", | |
"description": "Converts colors from HSV to RGB.", | |
"keywords": [ "color", "rgb", "hsv" ], | |
"version": "0.1.0" | |
} |
NewerOlder