Created
March 4, 2015 03:06
-
-
Save dumbledork/0a602d6096c0478d239d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // my-wdiget.js | |
| +function ($) { 'use strict'; | |
| var Plugin = function (element, options) { | |
| this.element = element; | |
| this.options = options ? options : Plugin.DEFAULTS; | |
| return this; | |
| }; | |
| Plugin.VERSION = '0.1.0'; | |
| Plugin.DEFAULTS = {}; | |
| $.fn.awesome = function (opts) { | |
| var options = $.extend({}, $.fn.awesome.defaults, opts); | |
| return this.each (function () { | |
| var awesome = new Plugin ($(this)[0], options); | |
| awesome(); | |
| }); | |
| }; | |
| $.fn.awesome.defaults = Plugin.DEFAULTS; | |
| }(jQuery); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*! my-wdiget.less */ | |
| @base: #f938ab; | |
| .box-shadow(@style, @c) when (iscolor(@c)) { | |
| -webkit-box-shadow: @style @c; | |
| box-shadow: @style @c; | |
| } | |
| .box-shadow(@style, @alpha: 50%) when (isnumber(@alpha)) { | |
| .box-shadow(@style, rgba(0, 0, 0, @alpha)); | |
| } | |
| .box { | |
| color: saturate(@base, 5%); | |
| border-color: lighten(@base, 30%); | |
| div { .box-shadow(0 0 5px, 30%) } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment