Permalink
Browse files

Merge branch 'master' of github.com:paulirish/css3please

  • Loading branch information...
2 parents eda7cf1 + 75016c8 commit 1da2c22f3f48052bfdfea5d013e123c21f3c6221 @paulirish committed Nov 8, 2011
Showing with 17 additions and 0 deletions.
  1. +9 −0 index.html
  2. +8 −0 javascript/javascript.js
View
@@ -46,6 +46,15 @@
</pre>
+<div id="opacity" 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">
+.opacity {
+ opacity: <b g="0">0.5</b>; <span class="comment">/* Chrome 4+, FF2+, Saf3.1+, Opera 9+, iOS 3.2+, Android 2.1+ <span class="endcomment">*/</span></span>
+ filter: alpha(opacity=<b g="0" i="fraction" o="percent">50</b>); <span class="comment">/* IE6-IE8 <span class="endcomment">*/</span></span>
+}</pre>
+ <pre class="rule comment commentclose"><span class="comment">/* */</span></pre>
+</div>
<div id="box_round" 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>
View
@@ -156,6 +156,14 @@ window.cssMath = {
},
eval: {
+ /* Fraction to Percentage */
+ fraction: function (value, allValues) {
+ return value / 100;
+ },
+ /* Percentage to Fraction */
+ percent: function (value, allValues) {
+ return value * 100;
+ },
/* String to Hexadecimals */
s2Hex: function (value, allValues) {
if (value.indexOf('rgb') > -1) {

0 comments on commit 1da2c22

Please sign in to comment.