darbybrown / shade Goto Github PK
View Code? Open in Web Editor NEWShade - The ultimate shadow mixin
Shade - The ultimate shadow mixin
It was brought to my attention that sin and cos are functions of Compass not Sass.
So if you don't use Compass here is a an alternative function for sin and cos.
I haven't tested it yet but will report back when I do.
Created by Jelmer Borst - https://twitter.com/japborst
$pi: 3.14159265359;
@function pow($base,$exp){
$value: $base;
@if $exp > 1{
@for $i from 2 through $exp{
$value: $value * $base;
}
}
@if $exp < 1{
@for $i from 0 through -$exp{
$value: $value / $base;
}
}
@return $value;
}
@function fact($val){
$value: 1;
@if $val > 0{
@for $i from 1 through $number{
$value: $value * $i;
}
}
}
@function sin($angle, $degrees: false){
$sin: 0
@if $degrees{
$degrees: $degrees / 180 * $pi;
}
@for $n from 1 through 10{
$sin: $sin + ( pow(-1,n) / fact(2n+1) ) * pow($angle,(2n+1));
}
@return $sin;
}
@function cos($angle, $degrees: false){
$cos: 0
@if $degrees{
$degrees: $degrees / 180 * $pi;
}
@for $n from 1 through 10{
$cos: $cos + ( pow(-1,n) / fact(2n) ) * pow($angle,2n);
}
@return $cos;
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.