├── .gitignore
├── .jshintrc
├── README.md
├── gulpfile.js
├── package.json
└── src
├── images
├── arrow-right.svg
├── logo-ga.svg
└── logo.svg
├── scripts
├── lodash.min.js
└── main.js
├── style
├── _animations.scss
├── _home.scss
├── _layout.scss
├── _mixins.scss
├── _normalize.scss
├── bourbon
│ ├── _bourbon-deprecated-upcoming.scss
│ ├── _bourbon.scss
│ ├── addons
│ │ ├── _button.scss
│ │ ├── _clearfix.scss
│ │ ├── _directional-values.scss
│ │ ├── _ellipsis.scss
│ │ ├── _font-family.scss
│ │ ├── _hide-text.scss
│ │ ├── _html5-input-types.scss
│ │ ├── _position.scss
│ │ ├── _prefixer.scss
│ │ ├── _retina-image.scss
│ │ ├── _size.scss
│ │ ├── _timing-functions.scss
│ │ ├── _triangle.scss
│ │ └── _word-wrap.scss
│ ├── css3
│ │ ├── _animation.scss
│ │ ├── _appearance.scss
│ │ ├── _backface-visibility.scss
│ │ ├── _background-image.scss
│ │ ├── _background.scss
│ │ ├── _border-image.scss
│ │ ├── _border-radius.scss
│ │ ├── _box-sizing.scss
│ │ ├── _calc.scss
│ │ ├── _columns.scss
│ │ ├── _filter.scss
│ │ ├── _flex-box.scss
│ │ ├── _font-face.scss
│ │ ├── _font-feature-settings.scss
│ │ ├── _hidpi-media-query.scss
│ │ ├── _hyphens.scss
│ │ ├── _image-rendering.scss
│ │ ├── _keyframes.scss
│ │ ├── _linear-gradient.scss
│ │ ├── _perspective.scss
│ │ ├── _placeholder.scss
│ │ ├── _radial-gradient.scss
│ │ ├── _transform.scss
│ │ ├── _transition.scss
│ │ └── _user-select.scss
│ ├── functions
│ │ ├── _assign.scss
│ │ ├── _color-lightness.scss
│ │ ├── _flex-grid.scss
│ │ ├── _golden-ratio.scss
│ │ ├── _grid-width.scss
│ │ ├── _modular-scale.scss
│ │ ├── _px-to-em.scss
│ │ ├── _px-to-rem.scss
│ │ ├── _strip-units.scss
│ │ ├── _tint-shade.scss
│ │ ├── _transition-property-name.scss
│ │ └── _unpack.scss
│ ├── helpers
│ │ ├── _convert-units.scss
│ │ ├── _gradient-positions-parser.scss
│ │ ├── _is-num.scss
│ │ ├── _linear-angle-parser.scss
│ │ ├── _linear-gradient-parser.scss
│ │ ├── _linear-positions-parser.scss
│ │ ├── _linear-side-corner-parser.scss
│ │ ├── _radial-arg-parser.scss
│ │ ├── _radial-gradient-parser.scss
│ │ ├── _radial-positions-parser.scss
│ │ ├── _render-gradients.scss
│ │ ├── _shape-size-stripper.scss
│ │ └── _str-to-num.scss
│ └── settings
│ │ ├── _asset-pipeline.scss
│ │ ├── _prefixer.scss
│ │ └── _px-to-em.scss
└── main.scss
└── views
└── index.jade
/.gitignore:
--------------------------------------------------------------------------------
1 | dist
2 | node_modules
--------------------------------------------------------------------------------
/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "node": true,
3 | "esnext": true,
4 | "bitwise": true,
5 | "camelcase": true,
6 | "curly": true,
7 | "immed": true,
8 | "newcap": true,
9 | "noarg": true,
10 | "undef": true,
11 | "unused": "vars",
12 | "strict": true,
13 | "jquery": true,
14 | "globals": {
15 | "_": false,
16 | "document": false
17 | }
18 | }
19 |
20 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ### turn your google analytics code from something like this
2 |
3 |
4 | ```html
5 |
15 | ```
16 |
17 |
18 |
19 | ### to this
20 |
21 |
22 | ```html
23 |
33 | ```
34 |
35 |
36 | # It's a nice touch.
--------------------------------------------------------------------------------
/gulpfile.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var gulp = require('gulp');
4 | var p = require('gulp-load-plugins')();
5 |
6 | var handle = function(err) {
7 | console.log(err); this.emit('end');
8 | };
9 |
10 | gulp.task('server', function() {
11 | return p.connect.server({
12 | root: 'dist',
13 | port: 8000,
14 | livereload: true
15 | });
16 | });
17 |
18 | gulp.task('sass', function() {
19 | return gulp.src('src/style/main.scss')
20 | .pipe(p.sass({outputStyle: 'compressed'}))
21 | .on('error', handle)
22 | .pipe(gulp.dest('dist'))
23 | .pipe(p.connect.reload());
24 | });
25 |
26 | gulp.task('scripts', function() {
27 | return gulp.src('src/scripts/**/*.js')
28 | .pipe(p.uglify())
29 | .on('error', handle)
30 | .pipe(p.concat('main.js'))
31 | .on('error', handle)
32 | .pipe(gulp.dest('dist'))
33 | .pipe(p.connect.reload());
34 | });
35 |
36 | gulp.task('jade', function() {
37 | return gulp.src('src/views/index.jade')
38 | .pipe(p.jade())
39 | .on('error', handle)
40 | .pipe(gulp.dest('dist'))
41 | .pipe(p.connect.reload());
42 | });
43 |
44 | gulp.task('images', function() {
45 | return gulp.src('src/images/**/*')
46 | .pipe(p.imagemin())
47 | .on('error', handle)
48 | .pipe(gulp.dest('dist/images'))
49 | });
50 |
51 | gulp.task('watch', function() {
52 | gulp.watch('src/views/**/*.jade', ['jade']);
53 | gulp.watch('src/style/*.scss', ['sass']);
54 | gulp.watch('src/scripts/*.js', ['scripts']);
55 | });
56 |
57 |
58 | gulp.task('default', ['jade', 'sass', 'scripts', 'images', 'server', 'watch']);
59 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "isogram.co",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "gulpfile.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "devDependencies": {
12 | "gulp": "^3.8.10",
13 | "gulp-concat": "^2.4.3",
14 | "gulp-connect": "^2.2.0",
15 | "gulp-imagemin": "^2.1.0",
16 | "gulp-jade": "*",
17 | "gulp-load-plugins": "^0.8.0",
18 | "gulp-sass": "^1.2.4",
19 | "gulp-uglify": "^1.0.2"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/images/arrow-right.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
38 |
--------------------------------------------------------------------------------
/src/images/logo-ga.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
84 |
--------------------------------------------------------------------------------
/src/images/logo.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
36 |
--------------------------------------------------------------------------------
/src/scripts/lodash.min.js:
--------------------------------------------------------------------------------
1 | ;(function(){function t(t){return"\\"+K[t]}function n(t,n,e){n||(n=0),typeof e=="undefined"&&(e=t?t.length:0);for(var r=-1,o=e-n||0,u=Array(o<0?0:o);++r2?i(t,17,n(arguments,2),null,e):i(t,1,null,null,e)}function v(t){return null==t?"":(t+"").replace(xn,l)}function h(t){return t}function _(){}function d(n,r,o){var u=e.templateSettings;n=(n||"")+"",o=On({},o,u);var a,i=On({},o.imports,u.imports),c=jn(i),l=m(i),p=0,f=o.interpolate||D,s="__p+='",g=RegExp((o.escape||D).source+"|"+f.source+"|"+(f===P?S:D).source+"|"+(o.evaluate||D).source+"|$","g");
6 | n.replace(g,function(e,r,o,u,i,c){return o||(o=u),s+=n.slice(p,c).replace($,t),r&&(s+="'+__e("+r+")+'"),i&&(a=true,s+="';"+i+";\n__p+='"),o&&(s+="'+((__t=("+o+"))==null?'':__t)+'"),p=c+e.length,e}),s+="';";var y=o.variable,b=y;b||(y="obj",s="with("+y+"){"+s+"}"),s=(a?s.replace(w,""):s).replace(x,"$1").replace(O,"$1;"),s="function("+y+"){"+(b?"":y+"||("+y+"={});")+"var __t,__p='',__e=_.escape"+(a?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+s+"return __p}";try{var v=Function(c,"return "+s).apply(j,l)
7 | }catch(h){throw h.source=s,h}return r?v(r):(v.source=s,v)}var j,E={},w=/\b__p\+='';/g,x=/\b(__p\+=)''\+/g,O=/(__e\(.*?\)|\b__t\))\+'';/g,S=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,A=/^\s*function[ \n\r\t]+\w/,P=/<%=([\s\S]+?)%>/g,D=/($^)/,F=/\bthis\b/,$=/['\n\r\t\u2028\u2029\\]/g,C=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],R="[object Arguments]",B="[object Array]",I="[object Boolean]",N="[object Date]",L="[object Error]",T="[object Function]",z="[object Number]",q="[object Object]",G="[object RegExp]",J="[object String]",H={configurable:false,enumerable:false,value:null,writable:false},V={a:"",b:null,c:"",d:"",e:"",v:null,g:"",h:null,support:null,i:"",j:false},W={"boolean":false,"function":true,object:true,number:false,string:false,undefined:false},K={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},M=W[typeof window]&&window||this,Q=W[typeof exports]&&exports&&!exports.nodeType&&exports,U=W[typeof module]&&module&&!module.nodeType&&module,X=U&&U.exports===Q&&Q,Y=W[typeof global]&&global;
8 | !Y||Y.global!==Y&&Y.window!==Y||(M=Y);var Z=[],tn=Error.prototype,nn=Object.prototype,en=String.prototype,rn=nn.toString,on=RegExp("^"+(rn+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),un=Function.prototype.toString,an=nn.hasOwnProperty,cn=Z.push,ln=nn.propertyIsEnumerable,pn=Z.unshift,fn=function(){try{var t={},n=p(n=Object.defineProperty)&&n,e=n(t,t,t)&&n}catch(r){}return e}(),sn=p(sn=Object.create)&&sn,gn=p(gn=Array.isArray)&&gn,yn=p(yn=Object.keys)&&yn,mn={};
9 | mn[B]=mn[N]=mn[z]={constructor:true,toLocaleString:true,toString:true,valueOf:true},mn[I]=mn[J]={constructor:true,toString:true,valueOf:true},mn[L]=mn[T]=mn[G]={constructor:true,toString:true},mn[q]={constructor:true},function(){for(var t=C.length;t--;){var n=C[t];for(var e in mn)an.call(mn,e)&&!an.call(mn[e],n)&&(mn[e][n]=false)}}();var bn=e.support={};!function(){var t=function(){this.x=1},n={0:1,length:1},e=[];t.prototype={valueOf:1,y:1};for(var r in new t)e.push(r);for(r in arguments);bn.argsClass=rn.call(arguments)==R,bn.argsObject=arguments.constructor==Object&&!(arguments instanceof Array),bn.enumErrorProps=ln.call(tn,"message")||ln.call(tn,"name"),bn.enumPrototypes=ln.call(t,"prototype"),bn.funcDecomp=!p(M.WinRTError)&&F.test(function(){return this
10 | }),bn.funcNames=typeof Function.name=="string",bn.nonEnumArgs=0!=r,bn.nonEnumShadows=!/valueOf/.test(e),bn.spliceObjects=(Z.splice.call(n,0,1),!n[0]),bn.unindexedChars="x"[0]+Object("x")[0]!="xx"}(1),e.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:P,variable:"",imports:{_:e}};var vn=function(t){var n="var n,t="+t.d+",E="+t.e+";if(!t)return E;"+t.i+";";t.b?(n+="var u=t.length;n=-1;if("+t.b+"){",bn.unindexedChars&&(n+="if(s(t)){t=t.split('')}"),n+="while(++n":">",'"':""","'":"'"},xn=RegExp("["+jn(wn).join("")+"]","g"),On=c(En);s(/x/)&&(s=function(t){return typeof t=="function"&&rn.call(t)==T}),e.bind=b,e.defaults=On,e.keys=jn,e.values=m,e.escape=v,e.identity=h,e.isArguments=f,e.isArray=_n,e.isFunction=s,e.isObject=g,e.isString=y,e.noop=_,e.template=d,e.VERSION="2.4.1",typeof define=="function"&&typeof define.amd=="object"&&define.amd?(M._=e, define(function(){return e
14 | })):Q&&U?X?(U.exports=e)._=e:Q._=e:M._=e}).call(this);
--------------------------------------------------------------------------------
/src/scripts/main.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | function getTemplate(isogram) {
4 | var template = _.template('<script>
(function(<%=isogram[0]%>,<%=isogram[1]%>,<%=isogram[2]%>,<%=isogram[3]%>,<%=isogram[4]%>,<%=isogram[5]%>,<%=isogram[6]%>){<%=isogram[0]%>['GoogleAnalyticsObject']=<%=isogram[4]%>;<%=isogram[0]%>[<%=isogram[4]%>]=<%=isogram[0]%>[<%=isogram[4]%>]||function(){
(<%=isogram[0]%>[<%=isogram[4]%>].q=<%=isogram[0]%>[<%=isogram[4]%>].q||[]).push(arguments)},<%=isogram[0]%>[<%=isogram[4]%>].l=1*new Date();<%=isogram[5]%>=<%=isogram[1]%>.createElement(<%=isogram[2]%>),
<%=isogram[6]%>=<%=isogram[1]%>.getElementsByTagName(<%=isogram[2]%>)[0];<%=isogram[5]%>.async=1;<%=isogram[5]%>.src=<%=isogram[3]%>;<%=isogram[6]%>.parentNode.insertBefore(<%=isogram[5]%>,<%=isogram[6]%>)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UIDHERE', 'auto');
ga('send', 'pageview');
</script>');
5 |
6 | return template({isogram: isogram});
7 | }
8 |
9 | // thanks --> http://jsperf.com/isisogram/2
10 | function isIsogram(word){
11 | var seen = [];
12 | var letters = word.split('');
13 | var is = true;
14 | var letter;
15 |
16 | for(var i = 0, l = letters.length; i < l; i++){
17 | letter = letters[i];
18 |
19 | // added to check if number
20 | if(seen.indexOf(letter) !== -1 || !isNaN(letter) ){
21 | is = false;
22 | break;
23 | }
24 | else{
25 | seen.push(letter);
26 | }
27 | }
28 | return is;
29 | }
30 |
31 | $(document).on('ready', function() {
32 | var $input = $('.isogram-input');
33 | var $output = $('.output-bottom');
34 | var $warning = $('.warning');
35 | $output.html(getTemplate(['i','s','o','g','r','a','m']));
36 |
37 | $input.on('input', function(e) {
38 | var currChars = $input.val().split('');
39 | var currIndex = currChars.length -1;
40 |
41 | if ( !/^[a-z]+$/.test($input.val()) ) {
42 | $input.val($input.val().substring(0, $input.val().length-1));
43 | $warning.text('Can only have alpha characters.');
44 | }
45 |
46 | else if (!isIsogram($input.val())) {
47 | $input.val($input.val().substring(0, $input.val().length-1));
48 | $warning.text('Cannot have repeat characters, not an isogram.');
49 | }
50 |
51 | else {
52 | $warning.text('');
53 | $output.html(getTemplate(currChars));
54 | $('.output-bottom span.char-'+currIndex).addClass('active');
55 | if (isIsogram($input.val()) && $input.val().length === 7) {
56 | $('.output-bottom span.char-'+currIndex).removeClass('active');
57 | $('.char-highlight').each(function(i, item) {
58 | setTimeout(function(){$(item).addClass('is-valid');}, 20 * i);
59 | });
60 | }
61 | }
62 | });
63 | });
64 |
--------------------------------------------------------------------------------
/src/style/_animations.scss:
--------------------------------------------------------------------------------
1 | @include keyframes(flash) {
2 | 0% {
3 | opacity: 1;
4 | }
5 |
6 | 25% {
7 | opacity: 0;
8 | }
9 |
10 | 50% {
11 | opacity: 1;
12 | }
13 |
14 | 75% {
15 | opacity: 0;
16 | }
17 |
18 | 100% {
19 | opacity: 1;
20 | }
21 | }
22 |
23 | @include keyframes(fadeIn) {
24 | from {
25 | color: red;
26 | }
27 | to {
28 | color: black;
29 | }
30 | }
31 |
32 | @include keyframes(fade) {
33 | from {
34 | opacity: 0;
35 | }
36 | to {
37 | opacity: 1;
38 | }
39 | }
--------------------------------------------------------------------------------
/src/style/_home.scss:
--------------------------------------------------------------------------------
1 | .input {
2 | float: left;
3 | width: 450px;
4 | background: url("images/arrow-right.svg") right 197px no-repeat;
5 |
6 | @include mobile {
7 | float: none;
8 | margin: 0 auto;
9 | width: 100%;
10 | background: none;
11 | }
12 | }
13 |
14 | .headings {
15 | @include clearfix;
16 | margin-bottom: 80px;
17 |
18 | @include mobile() {
19 | text-align: center;
20 | margin-bottom: 0;
21 | }
22 | }
23 |
24 | .isogrammer {
25 | @include hide-text;
26 | @include size(174px 34px);
27 | background: url("images/logo.svg") center center no-repeat;
28 | float: left;
29 | margin: 0 25px 0 0;
30 |
31 | @include mobile {
32 | float: none;
33 | position: absolute;
34 | left: 50%;
35 | margin-left: -87px;
36 | }
37 | }
38 |
39 | .tagline {
40 | font-weight: 100;
41 | float: left;
42 | line-height: 1.9;
43 |
44 | @include mobile {
45 | float: none;
46 | position: absolute;
47 | left: 50%;
48 | margin-left: -150px;
49 | width: 300px;
50 | margin-top: 40px;
51 | }
52 | }
53 |
54 | .isogram-input {
55 | background-color: $red;
56 | border: none;
57 | outline: none;
58 | border-bottom: 2px solid white;
59 | color: white;
60 | padding: 15px 5px;
61 | font-size: 50px;
62 | width: 410px;
63 | @include placeholder {
64 | color: white;
65 | }
66 |
67 | @include mobile {
68 | width: 300px;
69 | position: absolute;
70 | left: 50%;
71 | margin-left: -150px;
72 | text-align: center;
73 | margin-top: 100px;
74 | }
75 | }
76 |
77 | .warning {
78 | margin: 20px auto 180px auto;
79 | height: 20px;
80 | @include animation(flash 4s ease-in-out infinite);
81 |
82 | @include mobile {
83 | position: absolute;
84 | top: 120px;
85 | font-size: 12px;
86 | text-align: center;
87 | width: 100%;
88 | }
89 | }
90 |
91 | .credits {
92 | font-size: 14px;
93 |
94 | @include mobile {
95 | display: none;
96 | }
97 | }
98 |
99 | .credits-mobile {
100 | display: none;
101 |
102 | @include mobile {
103 | display: block;
104 | text-align: center;
105 | margin-top: 30px;
106 | }
107 | }
108 |
109 |
110 | .script-output {
111 | float: right;
112 | margin-top: 100px;
113 | max-width: 570px;
114 | @include size(570px auto);
115 |
116 | @include mobile {
117 | float: none;
118 | margin: 225px auto 0 auto;
119 | width: 80%;
120 | }
121 | }
122 |
123 | .output-top {
124 | border-radius: 3px 3px 0 0;
125 | background-color: #8FA3AD;
126 | height: 50px;
127 | background: url("images/logo-ga.svg") #8FA3AD 20px center no-repeat;
128 | }
129 |
130 | .output-bottom {
131 | border-radius: 0 0 3px 3px;
132 | background-color: #F7F6F4;
133 | height: 100%;
134 | color: #536D79;
135 | font-family: "Ubunutu Mono", monospace;
136 | font-size: 12px;
137 | padding: 20px;
138 | overflow: hidden;
139 | letter-spacing: -0.8px;
140 |
141 | @include mobile {
142 | overflow-x: scroll;
143 | padding: 10px;
144 | font-size: 10px;
145 | letter-spacing: -1.25px;
146 | }
147 | }
148 |
149 | .active {
150 | @include animation(fadeIn 0.75s ease-in-out);
151 | }
152 |
153 | .is-valid {
154 | color: #27FF4D;
155 | }
156 |
157 | .what-is-this {
158 | @include animation(fade 2.0s ease);
159 | }
--------------------------------------------------------------------------------
/src/style/_layout.scss:
--------------------------------------------------------------------------------
1 | .wrapper {
2 | @include clearfix;
3 | @include size(1050px auto);
4 | margin: 100px auto 0 auto;
5 |
6 | @include mobile {
7 | width: 100%;
8 | margin-top: 50px;
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/style/_mixins.scss:
--------------------------------------------------------------------------------
1 | @mixin mobile($size: $mobile) {
2 | @media screen and (max-width: $size) {
3 | @content;
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/src/style/_normalize.scss:
--------------------------------------------------------------------------------
1 | html {
2 | font-family: sans-serif;
3 | -ms-text-size-adjust: 100%;
4 | -webkit-text-size-adjust: 100%;
5 | }
6 | body {
7 | margin: 0;
8 | }
9 |
10 |
11 |
12 | article,
13 | aside,
14 | details,
15 | figcaption,
16 | figure,
17 | footer,
18 | header,
19 | hgroup,
20 | main,
21 | menu,
22 | nav,
23 | section,
24 | summary {
25 | display: block;
26 | }
27 |
28 |
29 |
30 | audio,
31 | canvas,
32 | progress,
33 | video {
34 | display: inline-block;
35 | vertical-align: baseline;
36 | }
37 |
38 |
39 |
40 | audio:not([controls]) {
41 | display: none;
42 | height: 0;
43 | }
44 |
45 |
46 | [hidden],
47 | template {
48 | display: none;
49 | }
50 |
51 | a {
52 | background-color: transparent;
53 | }
54 |
55 | a:active,
56 | a:hover {
57 | outline: 0;
58 | }
59 |
60 |
61 |
62 | abbr[title] {
63 | border-bottom: 1px dotted;
64 | }
65 |
66 |
67 |
68 | b,
69 | strong {
70 | font-weight: bold;
71 | }
72 |
73 |
74 |
75 | dfn {
76 | font-style: italic;
77 | }
78 |
79 |
80 |
81 | h1 {
82 | font-size: 2em;
83 | margin: 0.67em 0;
84 | }
85 |
86 |
87 |
88 | mark {
89 | background: #ff0;
90 | color: #000;
91 | }
92 |
93 |
94 |
95 | small {
96 | font-size: 80%;
97 | }
98 |
99 |
100 |
101 | sub,
102 | sup {
103 | font-size: 75%;
104 | line-height: 0;
105 | position: relative;
106 | vertical-align: baseline;
107 | }
108 |
109 | sup {
110 | top: -0.5em;
111 | }
112 |
113 | sub {
114 | bottom: -0.25em;
115 | }
116 |
117 |
118 | img {
119 | border: 0;
120 | }
121 |
122 |
123 | svg:not(:root) {
124 | overflow: hidden;
125 | }
126 |
127 |
128 | figure {
129 | margin: 1em 40px;
130 | }
131 |
132 |
133 |
134 | hr {
135 | -moz-box-sizing: content-box;
136 | box-sizing: content-box;
137 | height: 0;
138 | }
139 |
140 |
141 |
142 | pre {
143 | overflow: auto;
144 | }
145 |
146 |
147 |
148 | code,
149 | kbd,
150 | pre,
151 | samp {
152 | font-family: monospace, monospace;
153 | font-size: 1em;
154 | }
155 |
156 |
157 | button,
158 | input,
159 | optgroup,
160 | select,
161 | textarea {
162 | color: inherit;
163 | font: inherit;
164 | margin: 0;
165 | }
166 |
167 |
168 | button {
169 | overflow: visible;
170 | }
171 |
172 |
173 | button,
174 | select {
175 | text-transform: none;
176 | }
177 |
178 |
179 | button,
180 | html input[type="button"],
181 | input[type="reset"],
182 | input[type="submit"] {
183 | -webkit-appearance: button;
184 | cursor: pointer; /* 3 */
185 | }
186 |
187 |
188 |
189 | button[disabled],
190 | html input[disabled] {
191 | cursor: default;
192 | }
193 |
194 |
195 | button::-moz-focus-inner,
196 | input::-moz-focus-inner {
197 | border: 0;
198 | padding: 0;
199 | }
200 |
201 |
202 | input {
203 | line-height: normal;
204 | }
205 |
206 |
207 | input[type="checkbox"],
208 | input[type="radio"] {
209 | box-sizing: border-box;
210 | padding: 0;
211 | }
212 |
213 |
214 | input[type="number"]::-webkit-inner-spin-button,
215 | input[type="number"]::-webkit-outer-spin-button {
216 | height: auto;
217 | }
218 |
219 |
220 |
221 | input[type="search"] {
222 | -webkit-appearance: textfield;
223 | -moz-box-sizing: content-box;
224 | -webkit-box-sizing: content-box;
225 | box-sizing: content-box;
226 | }
227 |
228 |
229 | input[type="search"]::-webkit-search-cancel-button,
230 | input[type="search"]::-webkit-search-decoration {
231 | -webkit-appearance: none;
232 | }
233 |
234 |
235 |
236 | fieldset {
237 | border: 1px solid #c0c0c0;
238 | margin: 0 2px;
239 | padding: 0.35em 0.625em 0.75em;
240 | }
241 |
242 |
243 | legend {
244 | border: 0;
245 | padding: 0;
246 | }
247 |
248 |
249 |
250 | textarea {
251 | overflow: auto;
252 | }
253 |
254 |
255 | optgroup {
256 | font-weight: bold;
257 | }
258 |
259 |
260 |
261 | table {
262 | border-collapse: collapse;
263 | border-spacing: 0;
264 | }
265 |
266 | td,
267 | th {
268 | padding: 0;
269 | }
270 | menu {
271 | padding: 0;
272 | }
--------------------------------------------------------------------------------
/src/style/bourbon/_bourbon-deprecated-upcoming.scss:
--------------------------------------------------------------------------------
1 | //************************************************************************//
2 | // These mixins/functions are deprecated
3 | // They will be removed in the next MAJOR version release
4 | //************************************************************************//
5 | @mixin inline-block {
6 | display: inline-block;
7 | @warn "inline-block mixin is deprecated and will be removed in the next major version release";
8 | }
9 |
--------------------------------------------------------------------------------
/src/style/bourbon/_bourbon.scss:
--------------------------------------------------------------------------------
1 | // Settings
2 | @import "settings/prefixer";
3 | @import "settings/px-to-em";
4 | @import "settings/asset-pipeline";
5 |
6 | // Custom Helpers
7 | @import "helpers/convert-units";
8 | @import "helpers/gradient-positions-parser";
9 | @import "helpers/is-num";
10 | @import "helpers/linear-angle-parser";
11 | @import "helpers/linear-gradient-parser";
12 | @import "helpers/linear-positions-parser";
13 | @import "helpers/linear-side-corner-parser";
14 | @import "helpers/radial-arg-parser";
15 | @import "helpers/radial-positions-parser";
16 | @import "helpers/radial-gradient-parser";
17 | @import "helpers/render-gradients";
18 | @import "helpers/shape-size-stripper";
19 | @import "helpers/str-to-num";
20 |
21 | // Custom Functions
22 | @import "functions/assign";
23 | @import "functions/color-lightness";
24 | @import "functions/flex-grid";
25 | @import "functions/golden-ratio";
26 | @import "functions/grid-width";
27 | @import "functions/modular-scale";
28 | @import "functions/px-to-em";
29 | @import "functions/px-to-rem";
30 | @import "functions/strip-units";
31 | @import "functions/tint-shade";
32 | @import "functions/transition-property-name";
33 | @import "functions/unpack";
34 |
35 | // CSS3 Mixins
36 | @import "css3/animation";
37 | @import "css3/appearance";
38 | @import "css3/backface-visibility";
39 | @import "css3/background";
40 | @import "css3/background-image";
41 | @import "css3/border-image";
42 | @import "css3/border-radius";
43 | @import "css3/box-sizing";
44 | @import "css3/calc";
45 | @import "css3/columns";
46 | @import "css3/filter";
47 | @import "css3/flex-box";
48 | @import "css3/font-face";
49 | @import "css3/font-feature-settings";
50 | @import "css3/hyphens";
51 | @import "css3/hidpi-media-query";
52 | @import "css3/image-rendering";
53 | @import "css3/keyframes";
54 | @import "css3/linear-gradient";
55 | @import "css3/perspective";
56 | @import "css3/radial-gradient";
57 | @import "css3/transform";
58 | @import "css3/transition";
59 | @import "css3/user-select";
60 | @import "css3/placeholder";
61 |
62 | // Addons & other mixins
63 | @import "addons/button";
64 | @import "addons/clearfix";
65 | @import "addons/directional-values";
66 | @import "addons/ellipsis";
67 | @import "addons/font-family";
68 | @import "addons/hide-text";
69 | @import "addons/html5-input-types";
70 | @import "addons/position";
71 | @import "addons/prefixer";
72 | @import "addons/retina-image";
73 | @import "addons/size";
74 | @import "addons/timing-functions";
75 | @import "addons/triangle";
76 | @import "addons/word-wrap";
77 |
78 | // Soon to be deprecated Mixins
79 | @import "bourbon-deprecated-upcoming";
80 |
--------------------------------------------------------------------------------
/src/style/bourbon/addons/_button.scss:
--------------------------------------------------------------------------------
1 | @mixin button ($style: simple, $base-color: #4294f0, $text-size: inherit, $padding: 7px 18px) {
2 |
3 | @if type-of($style) == string and type-of($base-color) == color {
4 | @include buttonstyle($style, $base-color, $text-size, $padding);
5 | }
6 |
7 | @if type-of($style) == string and type-of($base-color) == number {
8 | $padding: $text-size;
9 | $text-size: $base-color;
10 | $base-color: #4294f0;
11 |
12 | @if $padding == inherit {
13 | $padding: 7px 18px;
14 | }
15 |
16 | @include buttonstyle($style, $base-color, $text-size, $padding);
17 | }
18 |
19 | @if type-of($style) == color and type-of($base-color) == color {
20 | $base-color: $style;
21 | $style: simple;
22 | @include buttonstyle($style, $base-color, $text-size, $padding);
23 | }
24 |
25 | @if type-of($style) == color and type-of($base-color) == number {
26 | $padding: $text-size;
27 | $text-size: $base-color;
28 | $base-color: $style;
29 | $style: simple;
30 |
31 | @if $padding == inherit {
32 | $padding: 7px 18px;
33 | }
34 |
35 | @include buttonstyle($style, $base-color, $text-size, $padding);
36 | }
37 |
38 | @if type-of($style) == number {
39 | $padding: $base-color;
40 | $text-size: $style;
41 | $base-color: #4294f0;
42 | $style: simple;
43 |
44 | @if $padding == #4294f0 {
45 | $padding: 7px 18px;
46 | }
47 |
48 | @include buttonstyle($style, $base-color, $text-size, $padding);
49 | }
50 |
51 | &:disabled {
52 | opacity: 0.5;
53 | cursor: not-allowed;
54 | }
55 | }
56 |
57 |
58 | // Selector Style Button
59 | //************************************************************************//
60 | @mixin buttonstyle($type, $b-color, $t-size, $pad) {
61 | // Grayscale button
62 | @if $type == simple and $b-color == grayscale($b-color) {
63 | @include simple($b-color, true, $t-size, $pad);
64 | }
65 |
66 | @if $type == shiny and $b-color == grayscale($b-color) {
67 | @include shiny($b-color, true, $t-size, $pad);
68 | }
69 |
70 | @if $type == pill and $b-color == grayscale($b-color) {
71 | @include pill($b-color, true, $t-size, $pad);
72 | }
73 |
74 | @if $type == flat and $b-color == grayscale($b-color) {
75 | @include flat($b-color, true, $t-size, $pad);
76 | }
77 |
78 | // Colored button
79 | @if $type == simple {
80 | @include simple($b-color, false, $t-size, $pad);
81 | }
82 |
83 | @else if $type == shiny {
84 | @include shiny($b-color, false, $t-size, $pad);
85 | }
86 |
87 | @else if $type == pill {
88 | @include pill($b-color, false, $t-size, $pad);
89 | }
90 |
91 | @else if $type == flat {
92 | @include flat($b-color, false, $t-size, $pad);
93 | }
94 | }
95 |
96 |
97 | // Simple Button
98 | //************************************************************************//
99 | @mixin simple($base-color, $grayscale: false, $textsize: inherit, $padding: 7px 18px) {
100 | $color: hsl(0, 0, 100%);
101 | $border: adjust-color($base-color, $saturation: 9%, $lightness: -14%);
102 | $inset-shadow: adjust-color($base-color, $saturation: -8%, $lightness: 15%);
103 | $stop-gradient: adjust-color($base-color, $saturation: 9%, $lightness: -11%);
104 | $text-shadow: adjust-color($base-color, $saturation: 15%, $lightness: -18%);
105 |
106 | @if is-light($base-color) {
107 | $color: hsl(0, 0, 20%);
108 | $text-shadow: adjust-color($base-color, $saturation: 10%, $lightness: 4%);
109 | }
110 |
111 | @if $grayscale == true {
112 | $border: grayscale($border);
113 | $inset-shadow: grayscale($inset-shadow);
114 | $stop-gradient: grayscale($stop-gradient);
115 | $text-shadow: grayscale($text-shadow);
116 | }
117 |
118 | border: 1px solid $border;
119 | border-radius: 3px;
120 | box-shadow: inset 0 1px 0 0 $inset-shadow;
121 | color: $color;
122 | display: inline-block;
123 | font-size: $textsize;
124 | font-weight: bold;
125 | @include linear-gradient ($base-color, $stop-gradient);
126 | padding: $padding;
127 | text-decoration: none;
128 | text-shadow: 0 1px 0 $text-shadow;
129 | background-clip: padding-box;
130 |
131 | &:hover:not(:disabled) {
132 | $base-color-hover: adjust-color($base-color, $saturation: -4%, $lightness: -5%);
133 | $inset-shadow-hover: adjust-color($base-color, $saturation: -7%, $lightness: 5%);
134 | $stop-gradient-hover: adjust-color($base-color, $saturation: 8%, $lightness: -14%);
135 |
136 | @if $grayscale == true {
137 | $base-color-hover: grayscale($base-color-hover);
138 | $inset-shadow-hover: grayscale($inset-shadow-hover);
139 | $stop-gradient-hover: grayscale($stop-gradient-hover);
140 | }
141 |
142 | box-shadow: inset 0 1px 0 0 $inset-shadow-hover;
143 | cursor: pointer;
144 | @include linear-gradient ($base-color-hover, $stop-gradient-hover);
145 | }
146 |
147 | &:active:not(:disabled),
148 | &:focus:not(:disabled) {
149 | $border-active: adjust-color($base-color, $saturation: 9%, $lightness: -14%);
150 | $inset-shadow-active: adjust-color($base-color, $saturation: 7%, $lightness: -17%);
151 |
152 | @if $grayscale == true {
153 | $border-active: grayscale($border-active);
154 | $inset-shadow-active: grayscale($inset-shadow-active);
155 | }
156 |
157 | border: 1px solid $border-active;
158 | box-shadow: inset 0 0 8px 4px $inset-shadow-active, inset 0 0 8px 4px $inset-shadow-active;
159 | }
160 | }
161 |
162 |
163 | // Shiny Button
164 | //************************************************************************//
165 | @mixin shiny($base-color, $grayscale: false, $textsize: inherit, $padding: 7px 18px) {
166 | $color: hsl(0, 0, 100%);
167 | $border: adjust-color($base-color, $red: -117, $green: -111, $blue: -81);
168 | $border-bottom: adjust-color($base-color, $red: -126, $green: -127, $blue: -122);
169 | $fourth-stop: adjust-color($base-color, $red: -79, $green: -70, $blue: -46);
170 | $inset-shadow: adjust-color($base-color, $red: 37, $green: 29, $blue: 12);
171 | $second-stop: adjust-color($base-color, $red: -56, $green: -50, $blue: -33);
172 | $text-shadow: adjust-color($base-color, $red: -140, $green: -141, $blue: -114);
173 | $third-stop: adjust-color($base-color, $red: -86, $green: -75, $blue: -48);
174 |
175 | @if is-light($base-color) {
176 | $color: hsl(0, 0, 20%);
177 | $text-shadow: adjust-color($base-color, $saturation: 10%, $lightness: 4%);
178 | }
179 |
180 | @if $grayscale == true {
181 | $border: grayscale($border);
182 | $border-bottom: grayscale($border-bottom);
183 | $fourth-stop: grayscale($fourth-stop);
184 | $inset-shadow: grayscale($inset-shadow);
185 | $second-stop: grayscale($second-stop);
186 | $text-shadow: grayscale($text-shadow);
187 | $third-stop: grayscale($third-stop);
188 | }
189 |
190 | border: 1px solid $border;
191 | border-bottom: 1px solid $border-bottom;
192 | border-radius: 5px;
193 | box-shadow: inset 0 1px 0 0 $inset-shadow;
194 | color: $color;
195 | display: inline-block;
196 | font-size: $textsize;
197 | font-weight: bold;
198 | @include linear-gradient(top, $base-color 0%, $second-stop 50%, $third-stop 50%, $fourth-stop 100%);
199 | padding: $padding;
200 | text-align: center;
201 | text-decoration: none;
202 | text-shadow: 0 -1px 1px $text-shadow;
203 |
204 | &:hover:not(:disabled) {
205 | $first-stop-hover: adjust-color($base-color, $red: -13, $green: -15, $blue: -18);
206 | $second-stop-hover: adjust-color($base-color, $red: -66, $green: -62, $blue: -51);
207 | $third-stop-hover: adjust-color($base-color, $red: -93, $green: -85, $blue: -66);
208 | $fourth-stop-hover: adjust-color($base-color, $red: -86, $green: -80, $blue: -63);
209 |
210 | @if $grayscale == true {
211 | $first-stop-hover: grayscale($first-stop-hover);
212 | $second-stop-hover: grayscale($second-stop-hover);
213 | $third-stop-hover: grayscale($third-stop-hover);
214 | $fourth-stop-hover: grayscale($fourth-stop-hover);
215 | }
216 |
217 | cursor: pointer;
218 | @include linear-gradient(top, $first-stop-hover 0%,
219 | $second-stop-hover 50%,
220 | $third-stop-hover 50%,
221 | $fourth-stop-hover 100%);
222 | }
223 |
224 | &:active:not(:disabled),
225 | &:focus:not(:disabled) {
226 | $inset-shadow-active: adjust-color($base-color, $red: -111, $green: -116, $blue: -122);
227 |
228 | @if $grayscale == true {
229 | $inset-shadow-active: grayscale($inset-shadow-active);
230 | }
231 |
232 | box-shadow: inset 0 0 20px 0 $inset-shadow-active;
233 | }
234 | }
235 |
236 |
237 | // Pill Button
238 | //************************************************************************//
239 | @mixin pill($base-color, $grayscale: false, $textsize: inherit, $padding: 7px 18px) {
240 | $color: hsl(0, 0, 100%);
241 | $border-bottom: adjust-color($base-color, $hue: 8, $saturation: -11%, $lightness: -26%);
242 | $border-sides: adjust-color($base-color, $hue: 4, $saturation: -21%, $lightness: -21%);
243 | $border-top: adjust-color($base-color, $hue: -1, $saturation: -30%, $lightness: -15%);
244 | $inset-shadow: adjust-color($base-color, $hue: -1, $saturation: -1%, $lightness: 7%);
245 | $stop-gradient: adjust-color($base-color, $hue: 8, $saturation: 14%, $lightness: -10%);
246 | $text-shadow: adjust-color($base-color, $hue: 5, $saturation: -19%, $lightness: -15%);
247 |
248 | @if is-light($base-color) {
249 | $color: hsl(0, 0, 20%);
250 | $text-shadow: adjust-color($base-color, $saturation: 10%, $lightness: 4%);
251 | }
252 |
253 | @if $grayscale == true {
254 | $border-bottom: grayscale($border-bottom);
255 | $border-sides: grayscale($border-sides);
256 | $border-top: grayscale($border-top);
257 | $inset-shadow: grayscale($inset-shadow);
258 | $stop-gradient: grayscale($stop-gradient);
259 | $text-shadow: grayscale($text-shadow);
260 | }
261 |
262 | border: 1px solid $border-top;
263 | border-color: $border-top $border-sides $border-bottom;
264 | border-radius: 16px;
265 | box-shadow: inset 0 1px 0 0 $inset-shadow;
266 | color: $color;
267 | display: inline-block;
268 | font-size: $textsize;
269 | font-weight: normal;
270 | line-height: 1;
271 | @include linear-gradient ($base-color, $stop-gradient);
272 | padding: $padding;
273 | text-align: center;
274 | text-decoration: none;
275 | text-shadow: 0 -1px 1px $text-shadow;
276 | background-clip: padding-box;
277 |
278 | &:hover:not(:disabled) {
279 | $base-color-hover: adjust-color($base-color, $lightness: -4.5%);
280 | $border-bottom: adjust-color($base-color, $hue: 8, $saturation: 13.5%, $lightness: -32%);
281 | $border-sides: adjust-color($base-color, $hue: 4, $saturation: -2%, $lightness: -27%);
282 | $border-top: adjust-color($base-color, $hue: -1, $saturation: -17%, $lightness: -21%);
283 | $inset-shadow-hover: adjust-color($base-color, $saturation: -1%, $lightness: 3%);
284 | $stop-gradient-hover: adjust-color($base-color, $hue: 8, $saturation: -4%, $lightness: -15.5%);
285 | $text-shadow-hover: adjust-color($base-color, $hue: 5, $saturation: -5%, $lightness: -22%);
286 |
287 | @if $grayscale == true {
288 | $base-color-hover: grayscale($base-color-hover);
289 | $border-bottom: grayscale($border-bottom);
290 | $border-sides: grayscale($border-sides);
291 | $border-top: grayscale($border-top);
292 | $inset-shadow-hover: grayscale($inset-shadow-hover);
293 | $stop-gradient-hover: grayscale($stop-gradient-hover);
294 | $text-shadow-hover: grayscale($text-shadow-hover);
295 | }
296 |
297 | border: 1px solid $border-top;
298 | border-color: $border-top $border-sides $border-bottom;
299 | box-shadow: inset 0 1px 0 0 $inset-shadow-hover;
300 | cursor: pointer;
301 | @include linear-gradient ($base-color-hover, $stop-gradient-hover);
302 | text-shadow: 0 -1px 1px $text-shadow-hover;
303 | background-clip: padding-box;
304 | }
305 |
306 | &:active:not(:disabled),
307 | &:focus:not(:disabled) {
308 | $active-color: adjust-color($base-color, $hue: 4, $saturation: -12%, $lightness: -10%);
309 | $border-active: adjust-color($base-color, $hue: 6, $saturation: -2.5%, $lightness: -30%);
310 | $border-bottom-active: adjust-color($base-color, $hue: 11, $saturation: 6%, $lightness: -31%);
311 | $inset-shadow-active: adjust-color($base-color, $hue: 9, $saturation: 2%, $lightness: -21.5%);
312 | $text-shadow-active: adjust-color($base-color, $hue: 5, $saturation: -12%, $lightness: -21.5%);
313 |
314 | @if $grayscale == true {
315 | $active-color: grayscale($active-color);
316 | $border-active: grayscale($border-active);
317 | $border-bottom-active: grayscale($border-bottom-active);
318 | $inset-shadow-active: grayscale($inset-shadow-active);
319 | $text-shadow-active: grayscale($text-shadow-active);
320 | }
321 |
322 | background: $active-color;
323 | border: 1px solid $border-active;
324 | border-bottom: 1px solid $border-bottom-active;
325 | box-shadow: inset 0 0 6px 3px $inset-shadow-active;
326 | text-shadow: 0 -1px 1px $text-shadow-active;
327 | }
328 | }
329 |
330 |
331 |
332 | // Flat Button
333 | //************************************************************************//
334 | @mixin flat($base-color, $grayscale: false, $textsize: inherit, $padding: 7px 18px) {
335 | $color: hsl(0, 0, 100%);
336 |
337 | @if is-light($base-color) {
338 | $color: hsl(0, 0, 20%);
339 | }
340 |
341 | background-color: $base-color;
342 | border-radius: 3px;
343 | border: none;
344 | color: $color;
345 | display: inline-block;
346 | font-size: inherit;
347 | font-weight: bold;
348 | padding: 7px 18px;
349 | text-decoration: none;
350 | background-clip: padding-box;
351 |
352 | &:hover:not(:disabled){
353 | $base-color-hover: adjust-color($base-color, $saturation: 4%, $lightness: 5%);
354 |
355 | @if $grayscale == true {
356 | $base-color-hover: grayscale($base-color-hover);
357 | }
358 |
359 | background-color: $base-color-hover;
360 | cursor: pointer;
361 | }
362 |
363 | &:active:not(:disabled),
364 | &:focus:not(:disabled) {
365 | $base-color-active: adjust-color($base-color, $saturation: -4%, $lightness: -5%);
366 |
367 | @if $grayscale == true {
368 | $base-color-active: grayscale($base-color-active);
369 | }
370 |
371 | background-color: $base-color-active;
372 | cursor: pointer;
373 | }
374 | }
375 |
--------------------------------------------------------------------------------
/src/style/bourbon/addons/_clearfix.scss:
--------------------------------------------------------------------------------
1 | // Modern micro clearfix provides an easy way to contain floats without adding additional markup.
2 | //
3 | // Example usage:
4 | //
5 | // // Contain all floats within .wrapper
6 | // .wrapper {
7 | // @include clearfix;
8 | // .content,
9 | // .sidebar {
10 | // float : left;
11 | // }
12 | // }
13 |
14 | @mixin clearfix {
15 | &:after {
16 | content:"";
17 | display:table;
18 | clear:both;
19 | }
20 | }
21 |
22 | // Acknowledgements
23 | // Beat *that* clearfix: [Thierry Koblentz](http://www.css-101.org/articles/clearfix/latest-new-clearfix-so-far.php)
24 |
--------------------------------------------------------------------------------
/src/style/bourbon/addons/_directional-values.scss:
--------------------------------------------------------------------------------
1 | // directional-property mixins are shorthands
2 | // for writing properties like the following
3 | //
4 | // @include margin(null 0 10px);
5 | // ------
6 | // margin-right: 0;
7 | // margin-bottom: 10px;
8 | // margin-left: 0;
9 | //
10 | // - or -
11 | //
12 | // @include border-style(dotted null);
13 | // ------
14 | // border-top-style: dotted;
15 | // border-bottom-style: dotted;
16 | //
17 | // ------
18 | //
19 | // Note: You can also use false instead of null
20 |
21 | @function collapse-directionals($vals) {
22 | $output: null;
23 |
24 | $A: nth( $vals, 1 );
25 | $B: if( length($vals) < 2, $A, nth($vals, 2));
26 | $C: if( length($vals) < 3, $A, nth($vals, 3));
27 | $D: if( length($vals) < 2, $A, nth($vals, if( length($vals) < 4, 2, 4) ));
28 |
29 | @if $A == 0 { $A: 0 }
30 | @if $B == 0 { $B: 0 }
31 | @if $C == 0 { $C: 0 }
32 | @if $D == 0 { $D: 0 }
33 |
34 | @if $A == $B and $A == $C and $A == $D { $output: $A }
35 | @else if $A == $C and $B == $D { $output: $A $B }
36 | @else if $B == $D { $output: $A $B $C }
37 | @else { $output: $A $B $C $D }
38 |
39 | @return $output;
40 | }
41 |
42 | @function contains-falsy($list) {
43 | @each $item in $list {
44 | @if not $item {
45 | @return true;
46 | }
47 | }
48 |
49 | @return false;
50 | }
51 |
52 | @mixin directional-property($pre, $suf, $vals) {
53 | // Property Names
54 | $top: $pre + "-top" + if($suf, "-#{$suf}", "");
55 | $bottom: $pre + "-bottom" + if($suf, "-#{$suf}", "");
56 | $left: $pre + "-left" + if($suf, "-#{$suf}", "");
57 | $right: $pre + "-right" + if($suf, "-#{$suf}", "");
58 | $all: $pre + if($suf, "-#{$suf}", "");
59 |
60 | $vals: collapse-directionals($vals);
61 |
62 | @if contains-falsy($vals) {
63 | @if nth($vals, 1) { #{$top}: nth($vals, 1); }
64 |
65 | @if length($vals) == 1 {
66 | @if nth($vals, 1) { #{$right}: nth($vals, 1); }
67 | } @else {
68 | @if nth($vals, 2) { #{$right}: nth($vals, 2); }
69 | }
70 |
71 | // prop: top/bottom right/left
72 | @if length($vals) == 2 {
73 | @if nth($vals, 1) { #{$bottom}: nth($vals, 1); }
74 | @if nth($vals, 2) { #{$left}: nth($vals, 2); }
75 |
76 | // prop: top right/left bottom
77 | } @else if length($vals) == 3 {
78 | @if nth($vals, 3) { #{$bottom}: nth($vals, 3); }
79 | @if nth($vals, 2) { #{$left}: nth($vals, 2); }
80 |
81 | // prop: top right bottom left
82 | } @else if length($vals) == 4 {
83 | @if nth($vals, 3) { #{$bottom}: nth($vals, 3); }
84 | @if nth($vals, 4) { #{$left}: nth($vals, 4); }
85 | }
86 |
87 | // prop: top/right/bottom/left
88 | } @else {
89 | #{$all}: $vals;
90 | }
91 | }
92 |
93 | @mixin margin($vals...) {
94 | @include directional-property(margin, false, $vals...);
95 | }
96 |
97 | @mixin padding($vals...) {
98 | @include directional-property(padding, false, $vals...);
99 | }
100 |
101 | @mixin border-style($vals...) {
102 | @include directional-property(border, style, $vals...);
103 | }
104 |
105 | @mixin border-color($vals...) {
106 | @include directional-property(border, color, $vals...);
107 | }
108 |
109 | @mixin border-width($vals...) {
110 | @include directional-property(border, width, $vals...);
111 | }
112 |
--------------------------------------------------------------------------------
/src/style/bourbon/addons/_ellipsis.scss:
--------------------------------------------------------------------------------
1 | @mixin ellipsis($width: 100%) {
2 | display: inline-block;
3 | max-width: $width;
4 | overflow: hidden;
5 | text-overflow: ellipsis;
6 | white-space: nowrap;
7 | }
8 |
--------------------------------------------------------------------------------
/src/style/bourbon/addons/_font-family.scss:
--------------------------------------------------------------------------------
1 | $georgia: Georgia, Cambria, "Times New Roman", Times, serif;
2 | $helvetica: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
3 | $lucida-grande: "Lucida Grande", Tahoma, Verdana, Arial, sans-serif;
4 | $monospace: "Bitstream Vera Sans Mono", Consolas, Courier, monospace;
5 | $verdana: Verdana, Geneva, sans-serif;
6 |
--------------------------------------------------------------------------------
/src/style/bourbon/addons/_hide-text.scss:
--------------------------------------------------------------------------------
1 | @mixin hide-text {
2 | overflow: hidden;
3 |
4 | &:before {
5 | content: "";
6 | display: block;
7 | width: 0;
8 | height: 100%;
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/style/bourbon/addons/_html5-input-types.scss:
--------------------------------------------------------------------------------
1 | //************************************************************************//
2 | // Generate a variable ($all-text-inputs) with a list of all html5
3 | // input types that have a text-based input, excluding textarea.
4 | // http://diveintohtml5.org/forms.html
5 | //************************************************************************//
6 | $inputs-list: 'input[type="email"]',
7 | 'input[type="number"]',
8 | 'input[type="password"]',
9 | 'input[type="search"]',
10 | 'input[type="tel"]',
11 | 'input[type="text"]',
12 | 'input[type="url"]',
13 |
14 | // Webkit & Gecko may change the display of these in the future
15 | 'input[type="color"]',
16 | 'input[type="date"]',
17 | 'input[type="datetime"]',
18 | 'input[type="datetime-local"]',
19 | 'input[type="month"]',
20 | 'input[type="time"]',
21 | 'input[type="week"]';
22 |
23 | // Bare inputs
24 | //************************************************************************//
25 | $all-text-inputs: assign-inputs($inputs-list);
26 |
27 | // Hover Pseudo-class
28 | //************************************************************************//
29 | $all-text-inputs-hover: assign-inputs($inputs-list, hover);
30 |
31 | // Focus Pseudo-class
32 | //************************************************************************//
33 | $all-text-inputs-focus: assign-inputs($inputs-list, focus);
34 |
35 |
36 |
37 | // You must use interpolation on the variable:
38 | // #{$all-text-inputs}
39 | // #{$all-text-inputs-hover}
40 | // #{$all-text-inputs-focus}
41 |
42 | // Example
43 | //************************************************************************//
44 | // #{$all-text-inputs}, textarea {
45 | // border: 1px solid red;
46 | // }
47 |
48 |
49 |
50 | //************************************************************************//
51 | // Generate a variable ($all-button-inputs) with a list of all html5
52 | // input types that have a button-based input, excluding button.
53 | //************************************************************************//
54 | $inputs-button-list: 'input[type="button"]',
55 | 'input[type="reset"]',
56 | 'input[type="submit"]';
57 |
58 | // Bare inputs
59 | //************************************************************************//
60 | $all-button-inputs: assign-inputs($inputs-button-list);
61 |
62 | // Hover Pseudo-class
63 | //************************************************************************//
64 | $all-button-inputs-hover: assign-inputs($inputs-button-list, hover);
65 |
66 | // Focus Pseudo-class
67 | //************************************************************************//
68 | $all-button-inputs-focus: assign-inputs($inputs-button-list, focus);
69 |
70 | // Active Pseudo-class
71 | //************************************************************************//
72 | $all-button-inputs-active: assign-inputs($inputs-button-list, active);
73 |
74 |
75 |
76 | // You must use interpolation on the variable:
77 | // #{$all-button-inputs}
78 | // #{$all-button-inputs-hover}
79 | // #{$all-button-inputs-focus}
80 | // #{$all-button-inputs-active}
81 |
82 | // Example
83 | //************************************************************************//
84 | // #{$all-button-inputs}, button {
85 | // border: 1px solid red;
86 | // }
87 |
--------------------------------------------------------------------------------
/src/style/bourbon/addons/_position.scss:
--------------------------------------------------------------------------------
1 | @mixin position ($position: relative, $coordinates: null null null null) {
2 |
3 | @if type-of($position) == list {
4 | $coordinates: $position;
5 | $position: relative;
6 | }
7 |
8 | $coordinates: unpack($coordinates);
9 |
10 | $top: nth($coordinates, 1);
11 | $right: nth($coordinates, 2);
12 | $bottom: nth($coordinates, 3);
13 | $left: nth($coordinates, 4);
14 |
15 | position: $position;
16 |
17 | @if ($top and $top == auto) or (type-of($top) == number) {
18 | top: $top;
19 | }
20 |
21 | @if ($right and $right == auto) or (type-of($right) == number) {
22 | right: $right;
23 | }
24 |
25 | @if ($bottom and $bottom == auto) or (type-of($bottom) == number) {
26 | bottom: $bottom;
27 | }
28 |
29 | @if ($left and $left == auto) or (type-of($left) == number) {
30 | left: $left;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/style/bourbon/addons/_prefixer.scss:
--------------------------------------------------------------------------------
1 | //************************************************************************//
2 | // Example: @include prefixer(border-radius, $radii, webkit ms spec);
3 | //************************************************************************//
4 | // Variables located in /settings/_prefixer.scss
5 |
6 | @mixin prefixer ($property, $value, $prefixes) {
7 | @each $prefix in $prefixes {
8 | @if $prefix == webkit {
9 | @if $prefix-for-webkit {
10 | -webkit-#{$property}: $value;
11 | }
12 | }
13 | @else if $prefix == moz {
14 | @if $prefix-for-mozilla {
15 | -moz-#{$property}: $value;
16 | }
17 | }
18 | @else if $prefix == ms {
19 | @if $prefix-for-microsoft {
20 | -ms-#{$property}: $value;
21 | }
22 | }
23 | @else if $prefix == o {
24 | @if $prefix-for-opera {
25 | -o-#{$property}: $value;
26 | }
27 | }
28 | @else if $prefix == spec {
29 | @if $prefix-for-spec {
30 | #{$property}: $value;
31 | }
32 | }
33 | @else {
34 | @warn "Unrecognized prefix: #{$prefix}";
35 | }
36 | }
37 | }
38 |
39 | @mixin disable-prefix-for-all() {
40 | $prefix-for-webkit: false !global;
41 | $prefix-for-mozilla: false !global;
42 | $prefix-for-microsoft: false !global;
43 | $prefix-for-opera: false !global;
44 | $prefix-for-spec: false !global;
45 | }
46 |
--------------------------------------------------------------------------------
/src/style/bourbon/addons/_retina-image.scss:
--------------------------------------------------------------------------------
1 | @mixin retina-image($filename, $background-size, $extension: png, $retina-filename: null, $retina-suffix: _2x, $asset-pipeline: $asset-pipeline) {
2 | @if $asset-pipeline {
3 | background-image: image-url("#{$filename}.#{$extension}");
4 | }
5 | @else {
6 | background-image: url("#{$filename}.#{$extension}");
7 | }
8 |
9 | @include hidpi {
10 | @if $asset-pipeline {
11 | @if $retina-filename {
12 | background-image: image-url("#{$retina-filename}.#{$extension}");
13 | }
14 | @else {
15 | background-image: image-url("#{$filename}#{$retina-suffix}.#{$extension}");
16 | }
17 | }
18 |
19 | @else {
20 | @if $retina-filename {
21 | background-image: url("#{$retina-filename}.#{$extension}");
22 | }
23 | @else {
24 | background-image: url("#{$filename}#{$retina-suffix}.#{$extension}");
25 | }
26 | }
27 |
28 | background-size: $background-size;
29 |
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/style/bourbon/addons/_size.scss:
--------------------------------------------------------------------------------
1 | @mixin size($size) {
2 | $height: nth($size, 1);
3 | $width: $height;
4 |
5 | @if length($size) > 1 {
6 | $height: nth($size, 2);
7 | }
8 |
9 | @if $height == auto or (type-of($height) == number and not unitless($height)) {
10 | height: $height;
11 | }
12 |
13 | @if $width == auto or (type-of($width) == number and not unitless($width)) {
14 | width: $width;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/style/bourbon/addons/_timing-functions.scss:
--------------------------------------------------------------------------------
1 | // CSS cubic-bezier timing functions. Timing functions courtesy of jquery.easie (github.com/jaukia/easie)
2 | // Timing functions are the same as demo'ed here: http://jqueryui.com/resources/demos/effect/easing.html
3 |
4 | // EASE IN
5 | $ease-in-quad: cubic-bezier(0.550, 0.085, 0.680, 0.530);
6 | $ease-in-cubic: cubic-bezier(0.550, 0.055, 0.675, 0.190);
7 | $ease-in-quart: cubic-bezier(0.895, 0.030, 0.685, 0.220);
8 | $ease-in-quint: cubic-bezier(0.755, 0.050, 0.855, 0.060);
9 | $ease-in-sine: cubic-bezier(0.470, 0.000, 0.745, 0.715);
10 | $ease-in-expo: cubic-bezier(0.950, 0.050, 0.795, 0.035);
11 | $ease-in-circ: cubic-bezier(0.600, 0.040, 0.980, 0.335);
12 | $ease-in-back: cubic-bezier(0.600, -0.280, 0.735, 0.045);
13 |
14 | // EASE OUT
15 | $ease-out-quad: cubic-bezier(0.250, 0.460, 0.450, 0.940);
16 | $ease-out-cubic: cubic-bezier(0.215, 0.610, 0.355, 1.000);
17 | $ease-out-quart: cubic-bezier(0.165, 0.840, 0.440, 1.000);
18 | $ease-out-quint: cubic-bezier(0.230, 1.000, 0.320, 1.000);
19 | $ease-out-sine: cubic-bezier(0.390, 0.575, 0.565, 1.000);
20 | $ease-out-expo: cubic-bezier(0.190, 1.000, 0.220, 1.000);
21 | $ease-out-circ: cubic-bezier(0.075, 0.820, 0.165, 1.000);
22 | $ease-out-back: cubic-bezier(0.175, 0.885, 0.320, 1.275);
23 |
24 | // EASE IN OUT
25 | $ease-in-out-quad: cubic-bezier(0.455, 0.030, 0.515, 0.955);
26 | $ease-in-out-cubic: cubic-bezier(0.645, 0.045, 0.355, 1.000);
27 | $ease-in-out-quart: cubic-bezier(0.770, 0.000, 0.175, 1.000);
28 | $ease-in-out-quint: cubic-bezier(0.860, 0.000, 0.070, 1.000);
29 | $ease-in-out-sine: cubic-bezier(0.445, 0.050, 0.550, 0.950);
30 | $ease-in-out-expo: cubic-bezier(1.000, 0.000, 0.000, 1.000);
31 | $ease-in-out-circ: cubic-bezier(0.785, 0.135, 0.150, 0.860);
32 | $ease-in-out-back: cubic-bezier(0.680, -0.550, 0.265, 1.550);
33 |
--------------------------------------------------------------------------------
/src/style/bourbon/addons/_triangle.scss:
--------------------------------------------------------------------------------
1 | @mixin triangle ($size, $color, $direction) {
2 | height: 0;
3 | width: 0;
4 |
5 | $width: nth($size, 1);
6 | $height: nth($size, length($size));
7 |
8 | $foreground-color: nth($color, 1);
9 | $background-color: if(length($color) == 2, nth($color, 2), transparent);
10 |
11 | @if ($direction == up) or ($direction == down) or ($direction == right) or ($direction == left) {
12 |
13 | $width: $width / 2;
14 | $height: if(length($size) > 1, $height, $height/2);
15 |
16 | @if $direction == up {
17 | border-left: $width solid $background-color;
18 | border-right: $width solid $background-color;
19 | border-bottom: $height solid $foreground-color;
20 |
21 | } @else if $direction == right {
22 | border-top: $width solid $background-color;
23 | border-bottom: $width solid $background-color;
24 | border-left: $height solid $foreground-color;
25 |
26 | } @else if $direction == down {
27 | border-left: $width solid $background-color;
28 | border-right: $width solid $background-color;
29 | border-top: $height solid $foreground-color;
30 |
31 | } @else if $direction == left {
32 | border-top: $width solid $background-color;
33 | border-bottom: $width solid $background-color;
34 | border-right: $height solid $foreground-color;
35 | }
36 | }
37 |
38 | @else if ($direction == up-right) or ($direction == up-left) {
39 | border-top: $height solid $foreground-color;
40 |
41 | @if $direction == up-right {
42 | border-left: $width solid $background-color;
43 |
44 | } @else if $direction == up-left {
45 | border-right: $width solid $background-color;
46 | }
47 | }
48 |
49 | @else if ($direction == down-right) or ($direction == down-left) {
50 | border-bottom: $height solid $foreground-color;
51 |
52 | @if $direction == down-right {
53 | border-left: $width solid $background-color;
54 |
55 | } @else if $direction == down-left {
56 | border-right: $width solid $background-color;
57 | }
58 | }
59 |
60 | @else if ($direction == inset-up) {
61 | border-width: $height $width;
62 | border-style: solid;
63 | border-color: $background-color $background-color $foreground-color;
64 | }
65 |
66 | @else if ($direction == inset-down) {
67 | border-width: $height $width;
68 | border-style: solid;
69 | border-color: $foreground-color $background-color $background-color;
70 | }
71 |
72 | @else if ($direction == inset-right) {
73 | border-width: $width $height;
74 | border-style: solid;
75 | border-color: $background-color $background-color $background-color $foreground-color;
76 | }
77 |
78 | @else if ($direction == inset-left) {
79 | border-width: $width $height;
80 | border-style: solid;
81 | border-color: $background-color $foreground-color $background-color $background-color;
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/src/style/bourbon/addons/_word-wrap.scss:
--------------------------------------------------------------------------------
1 | @mixin word-wrap($wrap: break-word) {
2 | word-wrap: $wrap;
3 |
4 | @if $wrap == break-word {
5 | overflow-wrap: break-word;
6 | word-break: break-all;
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/src/style/bourbon/css3/_animation.scss:
--------------------------------------------------------------------------------
1 | // http://www.w3.org/TR/css3-animations/#the-animation-name-property-
2 | // Each of these mixins support comma separated lists of values, which allows different transitions for individual properties to be described in a single style rule. Each value in the list corresponds to the value at that same position in the other properties.
3 |
4 | // Official animation shorthand property.
5 | @mixin animation ($animations...) {
6 | @include prefixer(animation, $animations, webkit moz spec);
7 | }
8 |
9 | // Individual Animation Properties
10 | @mixin animation-name ($names...) {
11 | @include prefixer(animation-name, $names, webkit moz spec);
12 | }
13 |
14 |
15 | @mixin animation-duration ($times...) {
16 | @include prefixer(animation-duration, $times, webkit moz spec);
17 | }
18 |
19 |
20 | @mixin animation-timing-function ($motions...) {
21 | // ease | linear | ease-in | ease-out | ease-in-out
22 | @include prefixer(animation-timing-function, $motions, webkit moz spec);
23 | }
24 |
25 |
26 | @mixin animation-iteration-count ($values...) {
27 | // infinite |
28 | @include prefixer(animation-iteration-count, $values, webkit moz spec);
29 | }
30 |
31 |
32 | @mixin animation-direction ($directions...) {
33 | // normal | alternate
34 | @include prefixer(animation-direction, $directions, webkit moz spec);
35 | }
36 |
37 |
38 | @mixin animation-play-state ($states...) {
39 | // running | paused
40 | @include prefixer(animation-play-state, $states, webkit moz spec);
41 | }
42 |
43 |
44 | @mixin animation-delay ($times...) {
45 | @include prefixer(animation-delay, $times, webkit moz spec);
46 | }
47 |
48 |
49 | @mixin animation-fill-mode ($modes...) {
50 | // none | forwards | backwards | both
51 | @include prefixer(animation-fill-mode, $modes, webkit moz spec);
52 | }
53 |
--------------------------------------------------------------------------------
/src/style/bourbon/css3/_appearance.scss:
--------------------------------------------------------------------------------
1 | @mixin appearance ($value) {
2 | @include prefixer(appearance, $value, webkit moz ms o spec);
3 | }
4 |
--------------------------------------------------------------------------------
/src/style/bourbon/css3/_backface-visibility.scss:
--------------------------------------------------------------------------------
1 | //************************************************************************//
2 | // Backface-visibility mixin
3 | //************************************************************************//
4 | @mixin backface-visibility($visibility) {
5 | @include prefixer(backface-visibility, $visibility, webkit spec);
6 | }
7 |
--------------------------------------------------------------------------------
/src/style/bourbon/css3/_background-image.scss:
--------------------------------------------------------------------------------
1 | //************************************************************************//
2 | // Background-image property for adding multiple background images with
3 | // gradients, or for stringing multiple gradients together.
4 | //************************************************************************//
5 |
6 | @mixin background-image($images...) {
7 | $webkit-images: ();
8 | $spec-images: ();
9 |
10 | @each $image in $images {
11 | $webkit-image: ();
12 | $spec-image: ();
13 |
14 | @if (type-of($image) == string) {
15 | $url-str: str-slice($image, 0, 3);
16 | $gradient-type: str-slice($image, 0, 6);
17 |
18 | @if $url-str == "url" {
19 | $webkit-image: $image;
20 | $spec-image: $image;
21 | }
22 |
23 | @else if $gradient-type == "linear" {
24 | $gradients: _linear-gradient-parser($image);
25 | $webkit-image: map-get($gradients, webkit-image);
26 | $spec-image: map-get($gradients, spec-image);
27 | }
28 |
29 | @else if $gradient-type == "radial" {
30 | $gradients: _radial-gradient-parser($image);
31 | $webkit-image: map-get($gradients, webkit-image);
32 | $spec-image: map-get($gradients, spec-image);
33 | }
34 | }
35 |
36 | $webkit-images: append($webkit-images, $webkit-image, comma);
37 | $spec-images: append($spec-images, $spec-image, comma);
38 | }
39 |
40 | background-image: $webkit-images;
41 | background-image: $spec-images;
42 | }
43 |
--------------------------------------------------------------------------------
/src/style/bourbon/css3/_background.scss:
--------------------------------------------------------------------------------
1 | //************************************************************************//
2 | // Background property for adding multiple backgrounds using shorthand
3 | // notation.
4 | //************************************************************************//
5 |
6 | @mixin background($backgrounds...) {
7 | $webkit-backgrounds: ();
8 | $spec-backgrounds: ();
9 |
10 | @each $background in $backgrounds {
11 | $webkit-background: ();
12 | $spec-background: ();
13 | $background-type: type-of($background);
14 |
15 | @if $background-type == string or list {
16 | $background-str: if($background-type == list, nth($background, 1), $background);
17 |
18 | $url-str: str-slice($background-str, 0, 3);
19 | $gradient-type: str-slice($background-str, 0, 6);
20 |
21 | @if $url-str == "url" {
22 | $webkit-background: $background;
23 | $spec-background: $background;
24 | }
25 |
26 | @else if $gradient-type == "linear" {
27 | $gradients: _linear-gradient-parser("#{$background}");
28 | $webkit-background: map-get($gradients, webkit-image);
29 | $spec-background: map-get($gradients, spec-image);
30 | }
31 |
32 | @else if $gradient-type == "radial" {
33 | $gradients: _radial-gradient-parser("#{$background}");
34 | $webkit-background: map-get($gradients, webkit-image);
35 | $spec-background: map-get($gradients, spec-image);
36 | }
37 |
38 | @else {
39 | $webkit-background: $background;
40 | $spec-background: $background;
41 | }
42 | }
43 |
44 | @else {
45 | $webkit-background: $background;
46 | $spec-background: $background;
47 | }
48 |
49 | $webkit-backgrounds: append($webkit-backgrounds, $webkit-background, comma);
50 | $spec-backgrounds: append($spec-backgrounds, $spec-background, comma);
51 | }
52 |
53 | background: $webkit-backgrounds;
54 | background: $spec-backgrounds;
55 | }
56 |
--------------------------------------------------------------------------------
/src/style/bourbon/css3/_border-image.scss:
--------------------------------------------------------------------------------
1 | @mixin border-image($borders...) {
2 | $webkit-borders: ();
3 | $spec-borders: ();
4 |
5 | @each $border in $borders {
6 | $webkit-border: ();
7 | $spec-border: ();
8 | $border-type: type-of($border);
9 |
10 | @if $border-type == string or list {
11 | $border-str: if($border-type == list, nth($border, 1), $border);
12 |
13 | $url-str: str-slice($border-str, 0, 3);
14 | $gradient-type: str-slice($border-str, 0, 6);
15 |
16 | @if $url-str == "url" {
17 | $webkit-border: $border;
18 | $spec-border: $border;
19 | }
20 |
21 | @else if $gradient-type == "linear" {
22 | $gradients: _linear-gradient-parser("#{$border}");
23 | $webkit-border: map-get($gradients, webkit-image);
24 | $spec-border: map-get($gradients, spec-image);
25 | }
26 |
27 | @else if $gradient-type == "radial" {
28 | $gradients: _radial-gradient-parser("#{$border}");
29 | $webkit-border: map-get($gradients, webkit-image);
30 | $spec-border: map-get($gradients, spec-image);
31 | }
32 |
33 | @else {
34 | $webkit-border: $border;
35 | $spec-border: $border;
36 | }
37 | }
38 |
39 | @else {
40 | $webkit-border: $border;
41 | $spec-border: $border;
42 | }
43 |
44 | $webkit-borders: append($webkit-borders, $webkit-border, comma);
45 | $spec-borders: append($spec-borders, $spec-border, comma);
46 | }
47 |
48 | -webkit-border-image: $webkit-borders;
49 | border-image: $spec-borders;
50 | border-style: solid;
51 | }
52 |
53 | //Examples:
54 | // @include border-image(url("image.png"));
55 | // @include border-image(url("image.png") 20 stretch);
56 | // @include border-image(linear-gradient(45deg, orange, yellow));
57 | // @include border-image(linear-gradient(45deg, orange, yellow) stretch);
58 | // @include border-image(linear-gradient(45deg, orange, yellow) 20 30 40 50 stretch round);
59 | // @include border-image(radial-gradient(top, cover, orange, yellow, orange));
60 |
--------------------------------------------------------------------------------
/src/style/bourbon/css3/_border-radius.scss:
--------------------------------------------------------------------------------
1 | //************************************************************************//
2 | // Shorthand Border-radius mixins
3 | //************************************************************************//
4 | @mixin border-top-radius($radii) {
5 | @include prefixer(border-top-left-radius, $radii, spec);
6 | @include prefixer(border-top-right-radius, $radii, spec);
7 | }
8 |
9 | @mixin border-bottom-radius($radii) {
10 | @include prefixer(border-bottom-left-radius, $radii, spec);
11 | @include prefixer(border-bottom-right-radius, $radii, spec);
12 | }
13 |
14 | @mixin border-left-radius($radii) {
15 | @include prefixer(border-top-left-radius, $radii, spec);
16 | @include prefixer(border-bottom-left-radius, $radii, spec);
17 | }
18 |
19 | @mixin border-right-radius($radii) {
20 | @include prefixer(border-top-right-radius, $radii, spec);
21 | @include prefixer(border-bottom-right-radius, $radii, spec);
22 | }
23 |
--------------------------------------------------------------------------------
/src/style/bourbon/css3/_box-sizing.scss:
--------------------------------------------------------------------------------
1 | @mixin box-sizing ($box) {
2 | // content-box | border-box | inherit
3 | @include prefixer(box-sizing, $box, webkit moz spec);
4 | }
5 |
--------------------------------------------------------------------------------
/src/style/bourbon/css3/_calc.scss:
--------------------------------------------------------------------------------
1 | @mixin calc($property, $value) {
2 | #{$property}: -webkit-calc(#{$value});
3 | #{$property}: calc(#{$value});
4 | }
5 |
--------------------------------------------------------------------------------
/src/style/bourbon/css3/_columns.scss:
--------------------------------------------------------------------------------
1 | @mixin columns($arg: auto) {
2 | // ||
3 | @include prefixer(columns, $arg, webkit moz spec);
4 | }
5 |
6 | @mixin column-count($int: auto) {
7 | // auto || integer
8 | @include prefixer(column-count, $int, webkit moz spec);
9 | }
10 |
11 | @mixin column-gap($length: normal) {
12 | // normal || length
13 | @include prefixer(column-gap, $length, webkit moz spec);
14 | }
15 |
16 | @mixin column-fill($arg: auto) {
17 | // auto || length
18 | @include prefixer(column-fill, $arg, webkit moz spec);
19 | }
20 |
21 | @mixin column-rule($arg) {
22 | // || ||
23 | @include prefixer(column-rule, $arg, webkit moz spec);
24 | }
25 |
26 | @mixin column-rule-color($color) {
27 | @include prefixer(column-rule-color, $color, webkit moz spec);
28 | }
29 |
30 | @mixin column-rule-style($style: none) {
31 | // none | hidden | dashed | dotted | double | groove | inset | inset | outset | ridge | solid
32 | @include prefixer(column-rule-style, $style, webkit moz spec);
33 | }
34 |
35 | @mixin column-rule-width ($width: none) {
36 | @include prefixer(column-rule-width, $width, webkit moz spec);
37 | }
38 |
39 | @mixin column-span($arg: none) {
40 | // none || all
41 | @include prefixer(column-span, $arg, webkit moz spec);
42 | }
43 |
44 | @mixin column-width($length: auto) {
45 | // auto || length
46 | @include prefixer(column-width, $length, webkit moz spec);
47 | }
48 |
--------------------------------------------------------------------------------
/src/style/bourbon/css3/_filter.scss:
--------------------------------------------------------------------------------
1 | @mixin filter($function: none) {
2 | // [
3 | @include prefixer(perspective, $depth, webkit moz spec);
4 | }
5 |
6 | @mixin perspective-origin($value: 50% 50%) {
7 | @include prefixer(perspective-origin, $value, webkit moz spec);
8 | }
9 |
--------------------------------------------------------------------------------
/src/style/bourbon/css3/_placeholder.scss:
--------------------------------------------------------------------------------
1 | @mixin placeholder {
2 | $placeholders: ":-webkit-input" ":-moz" "-moz" "-ms-input";
3 | @each $placeholder in $placeholders {
4 | &:#{$placeholder}-placeholder {
5 | @content;
6 | }
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/src/style/bourbon/css3/_radial-gradient.scss:
--------------------------------------------------------------------------------
1 | // Requires Sass 3.1+
2 | @mixin radial-gradient($G1, $G2,
3 | $G3: null, $G4: null,
4 | $G5: null, $G6: null,
5 | $G7: null, $G8: null,
6 | $G9: null, $G10: null,
7 | $pos: null,
8 | $shape-size: null,
9 | $fallback: null) {
10 |
11 | $data: _radial-arg-parser($G1, $G2, $pos, $shape-size);
12 | $G1: nth($data, 1);
13 | $G2: nth($data, 2);
14 | $pos: nth($data, 3);
15 | $shape-size: nth($data, 4);
16 |
17 | $full: $G1, $G2, $G3, $G4, $G5, $G6, $G7, $G8, $G9, $G10;
18 |
19 | // Strip deprecated cover/contain for spec
20 | $shape-size-spec: _shape-size-stripper($shape-size);
21 |
22 | // Set $G1 as the default fallback color
23 | $first-color: nth($full, 1);
24 | $fallback-color: nth($first-color, 1);
25 |
26 | @if (type-of($fallback) == color) or ($fallback == "transparent") {
27 | $fallback-color: $fallback;
28 | }
29 |
30 | // Add Commas and spaces
31 | $shape-size: if($shape-size, '#{$shape-size}, ', null);
32 | $pos: if($pos, '#{$pos}, ', null);
33 | $pos-spec: if($pos, 'at #{$pos}', null);
34 | $shape-size-spec: if(($shape-size-spec != ' ') and ($pos == null), '#{$shape-size-spec}, ', '#{$shape-size-spec} ');
35 |
36 | background-color: $fallback-color;
37 | background-image: -webkit-radial-gradient(unquote(#{$pos}#{$shape-size}#{$full}));
38 | background-image: unquote("radial-gradient(#{$shape-size-spec}#{$pos-spec}#{$full})");
39 | }
40 |
--------------------------------------------------------------------------------
/src/style/bourbon/css3/_transform.scss:
--------------------------------------------------------------------------------
1 | @mixin transform($property: none) {
2 | // none |
3 | @include prefixer(transform, $property, webkit moz ms o spec);
4 | }
5 |
6 | @mixin transform-origin($axes: 50%) {
7 | // x-axis - left | center | right | length | %
8 | // y-axis - top | center | bottom | length | %
9 | // z-axis - length
10 | @include prefixer(transform-origin, $axes, webkit moz ms o spec);
11 | }
12 |
13 | @mixin transform-style ($style: flat) {
14 | @include prefixer(transform-style, $style, webkit moz ms o spec);
15 | }
16 |
--------------------------------------------------------------------------------
/src/style/bourbon/css3/_transition.scss:
--------------------------------------------------------------------------------
1 | // Shorthand mixin. Supports multiple parentheses-deliminated values for each variable.
2 | // Example: @include transition (all 2s ease-in-out);
3 | // @include transition (opacity 1s ease-in 2s, width 2s ease-out);
4 | // @include transition-property (transform, opacity);
5 |
6 | @mixin transition ($properties...) {
7 | // Fix for vendor-prefix transform property
8 | $needs-prefixes: false;
9 | $webkit: ();
10 | $moz: ();
11 | $spec: ();
12 |
13 | // Create lists for vendor-prefixed transform
14 | @each $list in $properties {
15 | @if nth($list, 1) == "transform" {
16 | $needs-prefixes: true;
17 | $list1: -webkit-transform;
18 | $list2: -moz-transform;
19 | $list3: ();
20 |
21 | @each $var in $list {
22 | $list3: join($list3, $var);
23 |
24 | @if $var != "transform" {
25 | $list1: join($list1, $var);
26 | $list2: join($list2, $var);
27 | }
28 | }
29 |
30 | $webkit: append($webkit, $list1);
31 | $moz: append($moz, $list2);
32 | $spec: append($spec, $list3);
33 | }
34 |
35 | // Create lists for non-prefixed transition properties
36 | @else {
37 | $webkit: append($webkit, $list, comma);
38 | $moz: append($moz, $list, comma);
39 | $spec: append($spec, $list, comma);
40 | }
41 | }
42 |
43 | @if $needs-prefixes {
44 | -webkit-transition: $webkit;
45 | -moz-transition: $moz;
46 | transition: $spec;
47 | }
48 | @else {
49 | @if length($properties) >= 1 {
50 | @include prefixer(transition, $properties, webkit moz spec);
51 | }
52 |
53 | @else {
54 | $properties: all 0.15s ease-out 0s;
55 | @include prefixer(transition, $properties, webkit moz spec);
56 | }
57 | }
58 | }
59 |
60 | @mixin transition-property ($properties...) {
61 | -webkit-transition-property: transition-property-names($properties, 'webkit');
62 | -moz-transition-property: transition-property-names($properties, 'moz');
63 | transition-property: transition-property-names($properties, false);
64 | }
65 |
66 | @mixin transition-duration ($times...) {
67 | @include prefixer(transition-duration, $times, webkit moz spec);
68 | }
69 |
70 | @mixin transition-timing-function ($motions...) {
71 | // ease | linear | ease-in | ease-out | ease-in-out | cubic-bezier()
72 | @include prefixer(transition-timing-function, $motions, webkit moz spec);
73 | }
74 |
75 | @mixin transition-delay ($times...) {
76 | @include prefixer(transition-delay, $times, webkit moz spec);
77 | }
78 |
--------------------------------------------------------------------------------
/src/style/bourbon/css3/_user-select.scss:
--------------------------------------------------------------------------------
1 | @mixin user-select($arg: none) {
2 | @include prefixer(user-select, $arg, webkit moz ms spec);
3 | }
4 |
--------------------------------------------------------------------------------
/src/style/bourbon/functions/_assign.scss:
--------------------------------------------------------------------------------
1 | @function assign-inputs($inputs, $pseudo: null) {
2 | $list : ();
3 |
4 | @each $input in $inputs {
5 | $input: unquote($input);
6 | $input: if($pseudo, $input + ":" + $pseudo, $input);
7 | $list: append($list, $input, comma);
8 | }
9 |
10 | @return $list;
11 | }
--------------------------------------------------------------------------------
/src/style/bourbon/functions/_color-lightness.scss:
--------------------------------------------------------------------------------
1 | // Programatically determines whether a color is light or dark
2 | // Returns a boolean
3 | // More details here http://robots.thoughtbot.com/closer-look-color-lightness
4 |
5 | @function is-light($hex-color) {
6 | $-local-red: red(rgba($hex-color, 1.0));
7 | $-local-green: green(rgba($hex-color, 1.0));
8 | $-local-blue: blue(rgba($hex-color, 1.0));
9 |
10 | $-local-lightness: ($-local-red * 0.2126 + $-local-green * 0.7152 + $-local-blue * 0.0722) / 255;
11 |
12 | @return $-local-lightness > .6;
13 | }
14 |
--------------------------------------------------------------------------------
/src/style/bourbon/functions/_flex-grid.scss:
--------------------------------------------------------------------------------
1 | // Flexible grid
2 | @function flex-grid($columns, $container-columns: $fg-max-columns) {
3 | $width: $columns * $fg-column + ($columns - 1) * $fg-gutter;
4 | $container-width: $container-columns * $fg-column + ($container-columns - 1) * $fg-gutter;
5 | @return percentage($width / $container-width);
6 | }
7 |
8 | // Flexible gutter
9 | @function flex-gutter($container-columns: $fg-max-columns, $gutter: $fg-gutter) {
10 | $container-width: $container-columns * $fg-column + ($container-columns - 1) * $fg-gutter;
11 | @return percentage($gutter / $container-width);
12 | }
13 |
14 | // The $fg-column, $fg-gutter and $fg-max-columns variables must be defined in your base stylesheet to properly use the flex-grid function.
15 | // This function takes the fluid grid equation (target / context = result) and uses columns to help define each.
16 | //
17 | // The calculation presumes that your column structure will be missing the last gutter:
18 | //
19 | // -- column -- gutter -- column -- gutter -- column
20 | //
21 | // $fg-column: 60px; // Column Width
22 | // $fg-gutter: 25px; // Gutter Width
23 | // $fg-max-columns: 12; // Total Columns For Main Container
24 | //
25 | // div {
26 | // width: flex-grid(4); // returns (315px / 995px) = 31.65829%;
27 | // margin-left: flex-gutter(); // returns (25px / 995px) = 2.51256%;
28 | //
29 | // p {
30 | // width: flex-grid(2, 4); // returns (145px / 315px) = 46.031746%;
31 | // float: left;
32 | // margin: flex-gutter(4); // returns (25px / 315px) = 7.936508%;
33 | // }
34 | //
35 | // blockquote {
36 | // float: left;
37 | // width: flex-grid(2, 4); // returns (145px / 315px) = 46.031746%;
38 | // }
39 | // }
--------------------------------------------------------------------------------
/src/style/bourbon/functions/_golden-ratio.scss:
--------------------------------------------------------------------------------
1 | @function golden-ratio($value, $increment) {
2 | @return modular-scale($value, $increment, $golden)
3 | }
4 |
--------------------------------------------------------------------------------
/src/style/bourbon/functions/_grid-width.scss:
--------------------------------------------------------------------------------
1 | @function grid-width($n) {
2 | @return $n * $gw-column + ($n - 1) * $gw-gutter;
3 | }
4 |
5 | // The $gw-column and $gw-gutter variables must be defined in your base stylesheet to properly use the grid-width function.
6 | //
7 | // $gw-column: 100px; // Column Width
8 | // $gw-gutter: 40px; // Gutter Width
9 | //
10 | // div {
11 | // width: grid-width(4); // returns 520px;
12 | // margin-left: $gw-gutter; // returns 40px;
13 | // }
14 |
--------------------------------------------------------------------------------
/src/style/bourbon/functions/_modular-scale.scss:
--------------------------------------------------------------------------------
1 | // Scaling Variables
2 | $golden: 1.618;
3 | $minor-second: 1.067;
4 | $major-second: 1.125;
5 | $minor-third: 1.2;
6 | $major-third: 1.25;
7 | $perfect-fourth: 1.333;
8 | $augmented-fourth: 1.414;
9 | $perfect-fifth: 1.5;
10 | $minor-sixth: 1.6;
11 | $major-sixth: 1.667;
12 | $minor-seventh: 1.778;
13 | $major-seventh: 1.875;
14 | $octave: 2;
15 | $major-tenth: 2.5;
16 | $major-eleventh: 2.667;
17 | $major-twelfth: 3;
18 | $double-octave: 4;
19 |
20 | @function modular-scale($value, $increment, $ratio) {
21 | $v1: nth($value, 1);
22 | $v2: nth($value, length($value));
23 | $value: $v1;
24 |
25 | // scale $v2 to just above $v1
26 | @while $v2 > $v1 {
27 | $v2: ($v2 / $ratio); // will be off-by-1
28 | }
29 | @while $v2 < $v1 {
30 | $v2: ($v2 * $ratio); // will fix off-by-1
31 | }
32 |
33 | // check AFTER scaling $v2 to prevent double-counting corner-case
34 | $double-stranded: $v2 > $v1;
35 |
36 | @if $increment > 0 {
37 | @for $i from 1 through $increment {
38 | @if $double-stranded and ($v1 * $ratio) > $v2 {
39 | $value: $v2;
40 | $v2: ($v2 * $ratio);
41 | } @else {
42 | $v1: ($v1 * $ratio);
43 | $value: $v1;
44 | }
45 | }
46 | }
47 |
48 | @if $increment < 0 {
49 | // adjust $v2 to just below $v1
50 | @if $double-stranded {
51 | $v2: ($v2 / $ratio);
52 | }
53 |
54 | @for $i from $increment through -1 {
55 | @if $double-stranded and ($v1 / $ratio) < $v2 {
56 | $value: $v2;
57 | $v2: ($v2 / $ratio);
58 | } @else {
59 | $v1: ($v1 / $ratio);
60 | $value: $v1;
61 | }
62 | }
63 | }
64 |
65 | @return $value;
66 | }
67 |
--------------------------------------------------------------------------------
/src/style/bourbon/functions/_px-to-em.scss:
--------------------------------------------------------------------------------
1 | // Convert pixels to ems
2 | // eg. for a relational value of 12px write em(12) when the parent is 16px
3 | // if the parent is another value say 24px write em(12, 24)
4 |
5 | @function em($pxval, $base: $em-base) {
6 | @if not unitless($pxval) {
7 | $pxval: strip-units($pxval);
8 | }
9 | @if not unitless($base) {
10 | $base: strip-units($base);
11 | }
12 | @return ($pxval / $base) * 1em;
13 | }
14 |
--------------------------------------------------------------------------------
/src/style/bourbon/functions/_px-to-rem.scss:
--------------------------------------------------------------------------------
1 | // Convert pixels to rems
2 | // eg. for a relational value of 12px write rem(12)
3 | // Assumes $em-base is the font-size of
4 |
5 | @function rem($pxval) {
6 | @if not unitless($pxval) {
7 | $pxval: strip-units($pxval);
8 | }
9 |
10 | $base: $em-base;
11 | @if not unitless($base) {
12 | $base: strip-units($base);
13 | }
14 | @return ($pxval / $base) * 1rem;
15 | }
16 |
--------------------------------------------------------------------------------
/src/style/bourbon/functions/_strip-units.scss:
--------------------------------------------------------------------------------
1 | // Srtips the units from a value. e.g. 12px -> 12
2 |
3 | @function strip-units($val) {
4 | @return ($val / ($val * 0 + 1));
5 | }
6 |
--------------------------------------------------------------------------------
/src/style/bourbon/functions/_tint-shade.scss:
--------------------------------------------------------------------------------
1 | // Add percentage of white to a color
2 | @function tint($color, $percent){
3 | @return mix(white, $color, $percent);
4 | }
5 |
6 | // Add percentage of black to a color
7 | @function shade($color, $percent){
8 | @return mix(black, $color, $percent);
9 | }
10 |
--------------------------------------------------------------------------------
/src/style/bourbon/functions/_transition-property-name.scss:
--------------------------------------------------------------------------------
1 | // Return vendor-prefixed property names if appropriate
2 | // Example: transition-property-names((transform, color, background), moz) -> -moz-transform, color, background
3 | //************************************************************************//
4 | @function transition-property-names($props, $vendor: false) {
5 | $new-props: ();
6 |
7 | @each $prop in $props {
8 | $new-props: append($new-props, transition-property-name($prop, $vendor), comma);
9 | }
10 |
11 | @return $new-props;
12 | }
13 |
14 | @function transition-property-name($prop, $vendor: false) {
15 | // put other properties that need to be prefixed here aswell
16 | @if $vendor and $prop == transform {
17 | @return unquote('-'+$vendor+'-'+$prop);
18 | }
19 | @else {
20 | @return $prop;
21 | }
22 | }
--------------------------------------------------------------------------------
/src/style/bourbon/functions/_unpack.scss:
--------------------------------------------------------------------------------
1 | // Convert shorthand to the 4-value syntax
2 |
3 | @function unpack($shorthand) {
4 | @if length($shorthand) == 1 {
5 | @return nth($shorthand, 1) nth($shorthand, 1) nth($shorthand, 1) nth($shorthand, 1);
6 | }
7 | @else if length($shorthand) == 2 {
8 | @return nth($shorthand, 1) nth($shorthand, 2) nth($shorthand, 1) nth($shorthand, 2);
9 | }
10 | @else if length($shorthand) == 3 {
11 | @return nth($shorthand, 1) nth($shorthand, 2) nth($shorthand, 3) nth($shorthand, 2);
12 | }
13 | @else {
14 | @return $shorthand;
15 | }
16 | }
17 |
18 |
--------------------------------------------------------------------------------
/src/style/bourbon/helpers/_convert-units.scss:
--------------------------------------------------------------------------------
1 | //************************************************************************//
2 | // Helper function for str-to-num fn.
3 | // Source: http://sassmeister.com/gist/9647408
4 | //************************************************************************//
5 | @function _convert-units($number, $unit) {
6 | $strings: 'px' 'cm' 'mm' '%' 'ch' 'pica' 'in' 'em' 'rem' 'pt' 'pc' 'ex' 'vw' 'vh' 'vmin' 'vmax', 'deg', 'rad', 'grad', 'turn';
7 | $units: 1px 1cm 1mm 1% 1ch 1pica 1in 1em 1rem 1pt 1pc 1ex 1vw 1vh 1vmin 1vmax, 1deg, 1rad, 1grad, 1turn;
8 | $index: index($strings, $unit);
9 |
10 | @if not $index {
11 | @warn "Unknown unit `#{$unit}`.";
12 | @return false;
13 | }
14 | @return $number * nth($units, $index);
15 | }
16 |
--------------------------------------------------------------------------------
/src/style/bourbon/helpers/_gradient-positions-parser.scss:
--------------------------------------------------------------------------------
1 | @function _gradient-positions-parser($gradient-type, $gradient-positions) {
2 | @if $gradient-positions
3 | and ($gradient-type == linear)
4 | and (type-of($gradient-positions) != color) {
5 | $gradient-positions: _linear-positions-parser($gradient-positions);
6 | }
7 | @else if $gradient-positions
8 | and ($gradient-type == radial)
9 | and (type-of($gradient-positions) != color) {
10 | $gradient-positions: _radial-positions-parser($gradient-positions);
11 | }
12 | @return $gradient-positions;
13 | }
14 |
--------------------------------------------------------------------------------
/src/style/bourbon/helpers/_is-num.scss:
--------------------------------------------------------------------------------
1 | //************************************************************************//
2 | // Helper for linear-gradient-parser
3 | //************************************************************************//
4 | @function _is-num($char) {
5 | $values: '0' '1' '2' '3' '4' '5' '6' '7' '8' '9' 0 1 2 3 4 5 6 7 8 9;
6 | $index: index($values, $char);
7 | @return if($index, true, false);
8 | }
9 |
--------------------------------------------------------------------------------
/src/style/bourbon/helpers/_linear-angle-parser.scss:
--------------------------------------------------------------------------------
1 | // Private function for linear-gradient-parser
2 | @function _linear-angle-parser($image, $first-val, $prefix, $suffix) {
3 | $offset: null;
4 | $unit-short: str-slice($first-val, str-length($first-val) - 2, str-length($first-val));
5 | $unit-long: str-slice($first-val, str-length($first-val) - 3, str-length($first-val));
6 |
7 | @if ($unit-long == "grad") or
8 | ($unit-long == "turn") {
9 | $offset: if($unit-long == "grad", -100grad * 3, -0.75turn);
10 | }
11 |
12 | @else if ($unit-short == "deg") or
13 | ($unit-short == "rad") {
14 | $offset: if($unit-short == "deg", -90 * 3, 1.6rad);
15 | }
16 |
17 | @if $offset {
18 | $num: _str-to-num($first-val);
19 |
20 | @return (
21 | webkit-image: -webkit- + $prefix + ($offset - $num) + $suffix,
22 | spec-image: $image
23 | );
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/style/bourbon/helpers/_linear-gradient-parser.scss:
--------------------------------------------------------------------------------
1 | @function _linear-gradient-parser($image) {
2 | $image: unquote($image);
3 | $gradients: ();
4 | $start: str-index($image, "(");
5 | $end: str-index($image, ",");
6 | $first-val: str-slice($image, $start + 1, $end - 1);
7 |
8 | $prefix: str-slice($image, 0, $start);
9 | $suffix: str-slice($image, $end, str-length($image));
10 |
11 | $has-multiple-vals: str-index($first-val, " ");
12 | $has-single-position: unquote(_position-flipper($first-val) + "");
13 | $has-angle: _is-num(str-slice($first-val, 0, 0));
14 |
15 | @if $has-multiple-vals {
16 | $gradients: _linear-side-corner-parser($image, $first-val, $prefix, $suffix, $has-multiple-vals);
17 | }
18 |
19 | @else if $has-single-position != "" {
20 | $pos: unquote($has-single-position + "");
21 |
22 | $gradients: (
23 | webkit-image: -webkit- + $image,
24 | spec-image: $prefix + "to " + $pos + $suffix
25 | );
26 | }
27 |
28 | @else if $has-angle {
29 | // Rotate degree for webkit
30 | $gradients: _linear-angle-parser($image, $first-val, $prefix, $suffix);
31 | }
32 |
33 | @else {
34 | $gradients: (
35 | webkit-image: -webkit- + $image,
36 | spec-image: $image
37 | );
38 | }
39 |
40 | @return $gradients;
41 | }
42 |
--------------------------------------------------------------------------------
/src/style/bourbon/helpers/_linear-positions-parser.scss:
--------------------------------------------------------------------------------
1 | @function _linear-positions-parser($pos) {
2 | $type: type-of(nth($pos, 1));
3 | $spec: null;
4 | $degree: null;
5 | $side: null;
6 | $corner: null;
7 | $length: length($pos);
8 | // Parse Side and corner positions
9 | @if ($length > 1) {
10 | @if nth($pos, 1) == "to" { // Newer syntax
11 | $side: nth($pos, 2);
12 |
13 | @if $length == 2 { // eg. to top
14 | // Swap for backwards compatability
15 | $degree: _position-flipper(nth($pos, 2));
16 | }
17 | @else if $length == 3 { // eg. to top left
18 | $corner: nth($pos, 3);
19 | }
20 | }
21 | @else if $length == 2 { // Older syntax ("top left")
22 | $side: _position-flipper(nth($pos, 1));
23 | $corner: _position-flipper(nth($pos, 2));
24 | }
25 |
26 | @if ("#{$side} #{$corner}" == "left top") or ("#{$side} #{$corner}" == "top left") {
27 | $degree: _position-flipper(#{$side}) _position-flipper(#{$corner});
28 | }
29 | @else if ("#{$side} #{$corner}" == "right top") or ("#{$side} #{$corner}" == "top right") {
30 | $degree: _position-flipper(#{$side}) _position-flipper(#{$corner});
31 | }
32 | @else if ("#{$side} #{$corner}" == "right bottom") or ("#{$side} #{$corner}" == "bottom right") {
33 | $degree: _position-flipper(#{$side}) _position-flipper(#{$corner});
34 | }
35 | @else if ("#{$side} #{$corner}" == "left bottom") or ("#{$side} #{$corner}" == "bottom left") {
36 | $degree: _position-flipper(#{$side}) _position-flipper(#{$corner});
37 | }
38 | $spec: to $side $corner;
39 | }
40 | @else if $length == 1 {
41 | // Swap for backwards compatability
42 | @if $type == string {
43 | $degree: $pos;
44 | $spec: to _position-flipper($pos);
45 | }
46 | @else {
47 | $degree: -270 - $pos; //rotate the gradient opposite from spec
48 | $spec: $pos;
49 | }
50 | }
51 | $degree: unquote($degree + ",");
52 | $spec: unquote($spec + ",");
53 | @return $degree $spec;
54 | }
55 |
56 | @function _position-flipper($pos) {
57 | @return if($pos == left, right, null)
58 | if($pos == right, left, null)
59 | if($pos == top, bottom, null)
60 | if($pos == bottom, top, null);
61 | }
62 |
--------------------------------------------------------------------------------
/src/style/bourbon/helpers/_linear-side-corner-parser.scss:
--------------------------------------------------------------------------------
1 | // Private function for linear-gradient-parser
2 | @function _linear-side-corner-parser($image, $first-val, $prefix, $suffix, $has-multiple-vals) {
3 | $val-1: str-slice($first-val, 0, $has-multiple-vals - 1 );
4 | $val-2: str-slice($first-val, $has-multiple-vals + 1, str-length($first-val));
5 | $val-3: null;
6 | $has-val-3: str-index($val-2, " ");
7 |
8 | @if $has-val-3 {
9 | $val-3: str-slice($val-2, $has-val-3 + 1, str-length($val-2));
10 | $val-2: str-slice($val-2, 0, $has-val-3 - 1);
11 | }
12 |
13 | $pos: _position-flipper($val-1) _position-flipper($val-2) _position-flipper($val-3);
14 | $pos: unquote($pos + "");
15 |
16 | // Use old spec for webkit
17 | @if $val-1 == "to" {
18 | @return (
19 | webkit-image: -webkit- + $prefix + $pos + $suffix,
20 | spec-image: $image
21 | );
22 | }
23 |
24 | // Bring the code up to spec
25 | @else {
26 | @return (
27 | webkit-image: -webkit- + $image,
28 | spec-image: $prefix + "to " + $pos + $suffix
29 | );
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/style/bourbon/helpers/_radial-arg-parser.scss:
--------------------------------------------------------------------------------
1 | @function _radial-arg-parser($G1, $G2, $pos, $shape-size) {
2 | @each $value in $G1, $G2 {
3 | $first-val: nth($value, 1);
4 | $pos-type: type-of($first-val);
5 | $spec-at-index: null;
6 |
7 | // Determine if spec was passed to mixin
8 | @if type-of($value) == list {
9 | $spec-at-index: if(index($value, at), index($value, at), false);
10 | }
11 | @if $spec-at-index {
12 | @if $spec-at-index > 1 {
13 | @for $i from 1 through ($spec-at-index - 1) {
14 | $shape-size: $shape-size nth($value, $i);
15 | }
16 | @for $i from ($spec-at-index + 1) through length($value) {
17 | $pos: $pos nth($value, $i);
18 | }
19 | }
20 | @else if $spec-at-index == 1 {
21 | @for $i from ($spec-at-index + 1) through length($value) {
22 | $pos: $pos nth($value, $i);
23 | }
24 | }
25 | $G1: null;
26 | }
27 |
28 | // If not spec calculate correct values
29 | @else {
30 | @if ($pos-type != color) or ($first-val != "transparent") {
31 | @if ($pos-type == number)
32 | or ($first-val == "center")
33 | or ($first-val == "top")
34 | or ($first-val == "right")
35 | or ($first-val == "bottom")
36 | or ($first-val == "left") {
37 |
38 | $pos: $value;
39 |
40 | @if $pos == $G1 {
41 | $G1: null;
42 | }
43 | }
44 |
45 | @else if
46 | ($first-val == "ellipse")
47 | or ($first-val == "circle")
48 | or ($first-val == "closest-side")
49 | or ($first-val == "closest-corner")
50 | or ($first-val == "farthest-side")
51 | or ($first-val == "farthest-corner")
52 | or ($first-val == "contain")
53 | or ($first-val == "cover") {
54 |
55 | $shape-size: $value;
56 |
57 | @if $value == $G1 {
58 | $G1: null;
59 | }
60 |
61 | @else if $value == $G2 {
62 | $G2: null;
63 | }
64 | }
65 | }
66 | }
67 | }
68 | @return $G1, $G2, $pos, $shape-size;
69 | }
70 |
--------------------------------------------------------------------------------
/src/style/bourbon/helpers/_radial-gradient-parser.scss:
--------------------------------------------------------------------------------
1 | @function _radial-gradient-parser($image) {
2 | $image: unquote($image);
3 | $gradients: ();
4 | $start: str-index($image, "(");
5 | $end: str-index($image, ",");
6 | $first-val: str-slice($image, $start + 1, $end - 1);
7 |
8 | $prefix: str-slice($image, 0, $start);
9 | $suffix: str-slice($image, $end, str-length($image));
10 |
11 | $is-spec-syntax: str-index($first-val, "at");
12 |
13 | @if $is-spec-syntax and $is-spec-syntax > 1 {
14 | $keyword: str-slice($first-val, 1, $is-spec-syntax - 2);
15 | $pos: str-slice($first-val, $is-spec-syntax + 3, str-length($first-val));
16 | $pos: append($pos, $keyword, comma);
17 |
18 | $gradients: (
19 | webkit-image: -webkit- + $prefix + $pos + $suffix,
20 | spec-image: $image
21 | )
22 | }
23 |
24 | @else if $is-spec-syntax == 1 {
25 | $pos: str-slice($first-val, $is-spec-syntax + 3, str-length($first-val));
26 |
27 | $gradients: (
28 | webkit-image: -webkit- + $prefix + $pos + $suffix,
29 | spec-image: $image
30 | )
31 | }
32 |
33 | @else if str-index($image, "cover") or str-index($image, "contain") {
34 | @warn "Radial-gradient needs to be updated to conform to latest spec.";
35 |
36 | $gradients: (
37 | webkit-image: null,
38 | spec-image: $image
39 | )
40 | }
41 |
42 | @else {
43 | $gradients: (
44 | webkit-image: -webkit- + $image,
45 | spec-image: $image
46 | )
47 | }
48 |
49 | @return $gradients;
50 | }
51 |
--------------------------------------------------------------------------------
/src/style/bourbon/helpers/_radial-positions-parser.scss:
--------------------------------------------------------------------------------
1 | @function _radial-positions-parser($gradient-pos) {
2 | $shape-size: nth($gradient-pos, 1);
3 | $pos: nth($gradient-pos, 2);
4 | $shape-size-spec: _shape-size-stripper($shape-size);
5 |
6 | $pre-spec: unquote(if($pos, "#{$pos}, ", null))
7 | unquote(if($shape-size, "#{$shape-size},", null));
8 | $pos-spec: if($pos, "at #{$pos}", null);
9 |
10 | $spec: "#{$shape-size-spec} #{$pos-spec}";
11 |
12 | // Add comma
13 | @if ($spec != ' ') {
14 | $spec: "#{$spec},"
15 | }
16 |
17 | @return $pre-spec $spec;
18 | }
19 |
--------------------------------------------------------------------------------
/src/style/bourbon/helpers/_render-gradients.scss:
--------------------------------------------------------------------------------
1 | // User for linear and radial gradients within background-image or border-image properties
2 |
3 | @function _render-gradients($gradient-positions, $gradients, $gradient-type, $vendor: false) {
4 | $pre-spec: null;
5 | $spec: null;
6 | $vendor-gradients: null;
7 | @if $gradient-type == linear {
8 | @if $gradient-positions {
9 | $pre-spec: nth($gradient-positions, 1);
10 | $spec: nth($gradient-positions, 2);
11 | }
12 | }
13 | @else if $gradient-type == radial {
14 | $pre-spec: nth($gradient-positions, 1);
15 | $spec: nth($gradient-positions, 2);
16 | }
17 |
18 | @if $vendor {
19 | $vendor-gradients: -#{$vendor}-#{$gradient-type}-gradient(#{$pre-spec} $gradients);
20 | }
21 | @else if $vendor == false {
22 | $vendor-gradients: "#{$gradient-type}-gradient(#{$spec} #{$gradients})";
23 | $vendor-gradients: unquote($vendor-gradients);
24 | }
25 | @return $vendor-gradients;
26 | }
27 |
--------------------------------------------------------------------------------
/src/style/bourbon/helpers/_shape-size-stripper.scss:
--------------------------------------------------------------------------------
1 | @function _shape-size-stripper($shape-size) {
2 | $shape-size-spec: null;
3 | @each $value in $shape-size {
4 | @if ($value == "cover") or ($value == "contain") {
5 | $value: null;
6 | }
7 | $shape-size-spec: "#{$shape-size-spec} #{$value}";
8 | }
9 | @return $shape-size-spec;
10 | }
11 |
--------------------------------------------------------------------------------
/src/style/bourbon/helpers/_str-to-num.scss:
--------------------------------------------------------------------------------
1 | //************************************************************************//
2 | // Helper function for linear/radial-gradient-parsers.
3 | // Source: http://sassmeister.com/gist/9647408
4 | //************************************************************************//
5 | @function _str-to-num($string) {
6 | // Matrices
7 | $strings: '0' '1' '2' '3' '4' '5' '6' '7' '8' '9';
8 | $numbers: 0 1 2 3 4 5 6 7 8 9;
9 |
10 | // Result
11 | $result: 0;
12 | $divider: 0;
13 | $minus: false;
14 |
15 | // Looping through all characters
16 | @for $i from 1 through str-length($string) {
17 | $character: str-slice($string, $i, $i);
18 | $index: index($strings, $character);
19 |
20 | @if $character == '-' {
21 | $minus: true;
22 | }
23 |
24 | @else if $character == '.' {
25 | $divider: 1;
26 | }
27 |
28 | @else {
29 | @if not $index {
30 | $result: if($minus, $result * -1, $result);
31 | @return _convert-units($result, str-slice($string, $i));
32 | }
33 |
34 | $number: nth($numbers, $index);
35 |
36 | @if $divider == 0 {
37 | $result: $result * 10;
38 | }
39 |
40 | @else {
41 | // Move the decimal dot to the left
42 | $divider: $divider * 10;
43 | $number: $number / $divider;
44 | }
45 |
46 | $result: $result + $number;
47 | }
48 | }
49 | @return if($minus, $result * -1, $result);
50 | }
51 |
--------------------------------------------------------------------------------
/src/style/bourbon/settings/_asset-pipeline.scss:
--------------------------------------------------------------------------------
1 | $asset-pipeline: false !default;
2 |
--------------------------------------------------------------------------------
/src/style/bourbon/settings/_prefixer.scss:
--------------------------------------------------------------------------------
1 | // Variable settings for /addons/prefixer.scss
2 | $prefix-for-webkit: true !default;
3 | $prefix-for-mozilla: true !default;
4 | $prefix-for-microsoft: true !default;
5 | $prefix-for-opera: true !default;
6 | $prefix-for-spec: true !default; // required for keyframe mixin
7 |
--------------------------------------------------------------------------------
/src/style/bourbon/settings/_px-to-em.scss:
--------------------------------------------------------------------------------
1 | $em-base: 16px !default;
2 |
--------------------------------------------------------------------------------
/src/style/main.scss:
--------------------------------------------------------------------------------
1 | $red: #FF2750;
2 | $mobile: 1080px;
3 |
4 | @import "normalize";
5 | @import "bourbon/bourbon";
6 | @import "mixins";
7 | @import "animations";
8 |
9 |
10 |
11 | // defaults
12 | *,
13 | *::before,
14 | *::after {
15 | @include box-sizing(border-box);
16 | margin: 0;
17 | }
18 |
19 | a {
20 | text-decoration: none;
21 | color: inherit;
22 | }
23 |
24 | strong {
25 | font-weight: bold;
26 | }
27 |
28 | em {
29 | font-style: italic;
30 | }
31 |
32 | body {
33 | background-color: $red;
34 | font-family: "Source Sans Pro", sans-serif;
35 | font-weight: 300;
36 | line-height: 1.25;
37 | color: white;
38 | }
39 |
40 | @import "layout";
41 | @import "home";
42 |
--------------------------------------------------------------------------------
/src/views/index.jade:
--------------------------------------------------------------------------------
1 | doctype html
2 | html
3 | head
4 | title isogrammer
5 | meta(charset="UTF-8")
6 | meta(name='viewport', content='width=device-width, initial-scale=1, maximum-scale=1')
7 | link(href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400")
8 | link(rel='stylesheet', href='main.css')
9 |
10 | body
11 | .wrapper
12 |
13 | //- left
14 | .input
15 | .headings
16 | h1.isogrammer isogrammer
17 | h3.tagline Isogram analytics generator
18 | input.isogram-input(placeholder="isogram", maxlength="7", autofocus)
19 | p.warning
20 |
21 | p.credits by
22 | a(href="https://twitter.com/jaxgeller") @jaxgeller |
23 | a(href="https://github.com/jaxgeller/isogrammer") source |
24 | a.what-is-this(href="https://en.wikipedia.org/wiki/Isogram") What's an isogram?
25 |
26 | //- right
27 | .script-output
28 | .output-top
29 | pre.output-bottom.
30 | <script>
31 | (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
32 | (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
33 | m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
34 | })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
35 |
36 | ga('create', 'UIDHERE', 'auto');
37 | ga('send', 'pageview');
38 | </script>
39 |
40 |
41 | p.credits-mobile by
42 | a(href="https://twitter.com/jaxgeller") @jaxgeller |
43 | a(href="https://github.com/jaxgeller/isogrammer") source
44 |
45 | script(src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js")
46 | script(src="main.js")
47 |
48 | script.
49 | (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
50 | (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
51 | m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
52 | })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
53 | ga('create', 'UA-58932709-1', 'auto');
54 | ga('send', 'pageview');
55 |
56 |
--------------------------------------------------------------------------------