Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

inset box shadow toggle #47

Closed
wants to merge 1 commit into
from
Jump to file or symbol
Failed to load files and symbols.
+16 −2
Split
View
@@ -74,7 +74,7 @@
-->
<div id="box_shadow" class="rule_wrapper">
- <pre class="rule comment">/* <a class="cb">[to clipboard]</a> <a class="off">[toggle rule off]</a> <span class="endcomment">*/</span></pre>
+ <pre class="rule comment">/* <a class="cb">[to clipboard]</a> <a class="inset">[toggle inset on]</a> <a class="off">[toggle rule off]</a> <span class="endcomment">*/</span></pre>
<pre class="rule">
.box_shadow {
-moz-box-shadow: <b g="0">0px</b> <b g="1">0px</b> <b g="2">4px</b> <b g="3" i="s2Hex" o="sHex">#ffffff</b>; <span class="comment">/* FF3.5+ <span class="endcomment">*/</span></span>
@@ -246,4 +246,4 @@
<script>var _gaq=[['_setAccount','UA-15142720-1'],['_trackPageview']];(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.async=1;g.src='//www.google-analytics.com/ga.js';s.parentNode.insertBefore(g,s)}(document,'script'));</script>
</body>
-</html>
+</html>
View
@@ -572,6 +572,20 @@ rule
$.fn.applyStyles = function(){ generator.applyStyles(this[0]); return this; }
+// box_shadow inset
+$('.rule_wrapper .comment a.inset').live('click',function(){
+ $(this).text( $(this).text().replace(' off',' !on').replace(' on',' off').replace('!','') );
+ var ruleWrapper = $(this).closest('.rule_wrapper');
+ if (ruleWrapper.find('span.inset').length) {
+ ruleWrapper.find('span.inset').remove();
+ } else {
+ ruleWrapper.find('b[g="0"]').before('<span class="inset">inset </span>');
+ }
+ ruleWrapper.find('input').first().applyStyles();
+ getFilters();
+ return false;
+});
+
// commenting out
$('.rule_wrapper .comment a.off').live('click',function(){
$(this).text( $(this).text().replace(' off',' !on').replace(' on',' off').replace('!','') )