Permalink
Browse files

inset box shadow toggle

  • Loading branch information...
1 parent 7393d69 commit 3916fbe52580bbd43a4a351ff56f670693def82a Ryan committed Apr 14, 2011
Showing with 16 additions and 2 deletions.
  1. +2 −2 index.html
  2. +14 −0 javascript/javascript.js
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>
@@ -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('!','') )

0 comments on commit 3916fbe

Please sign in to comment.