Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: paulirish/css3please
base: f85659eaa6
...
head fork: paulirish/css3please
compare: e12392b867
  • 4 commits
  • 3 files changed
  • 0 commit comments
  • 2 contributors
Showing with 24 additions and 23 deletions.
  1. +11 −11 index.html
  2. +7 −7 javascript/javascript.js
  3. +6 −5 test_math.html
View
22 index.html
@@ -79,9 +79,9 @@
<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">
.box_shadow {
- -webkit-box-shadow: <b g="0">0px</b> <b g="1">0px</b> <b g="2">4px</b> <b g="3">0px</b> <b g="4" i="s2Hex" o="sHex">#ffffff</b>; <span class="comment">/* Saf3-4, iOS 4.0.2 - 4.2, Android 2.3+ <span class="endcomment">*/</span></span>
- -moz-box-shadow: <b g="0">0px</b> <b g="1">0px</b> <b g="2">4px</b> <b g="3">0px</b> <b g="4" i="s2Hex" o="sHex">#ffffff</b>; <span class="comment">/* FF3.5 - 3.6 <span class="endcomment">*/</span></span>
- box-shadow: <b g="0">0px</b> <b g="1">0px</b> <b g="2">4px</b> <b g="3">0px</b> <b g="4" i="s2Hex" o="sHex">#ffffff</b>; <span class="comment">/* Opera 10.5, IE9, FF4+, Chrome 6+, iOS 5 <span class="endcomment">*/</span></span>
+ -webkit-box-shadow: <b g="0">0px</b> <b g="1">0px</b> <b g="2">4px</b> <b g="3">0px</b> <b g="4" i="lHex" o="sHex">#ffffff</b>; <span class="comment">/* Saf3-4, iOS 4.0.2 - 4.2, Android 2.3+ <span class="endcomment">*/</span></span>
+ -moz-box-shadow: <b g="0">0px</b> <b g="1">0px</b> <b g="2">4px</b> <b g="3">0px</b> <b g="4" i="lHex" o="sHex">#ffffff</b>; <span class="comment">/* FF3.5 - 3.6 <span class="endcomment">*/</span></span>
+ box-shadow: <b g="0">0px</b> <b g="1">0px</b> <b g="2">4px</b> <b g="3">0px</b> <b g="4" i="lHex" o="sHex">#ffffff</b>; <span class="comment">/* Opera 10.5, IE9, FF4+, Chrome 6+, iOS 5 <span class="endcomment">*/</span></span>
}</pre>
<pre class="rule comment commentclose"><span class="comment">/* */</span></pre>
</div>
@@ -90,13 +90,13 @@
<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">
.box_gradient {
- background-color: <b g="0" i="s2Hex">#444444</b>;
- background-image: -webkit-gradient(linear, left top, left bottom, from(<b g="0" i="s2Hex">#444444</b>), to(<b g="1" i="s2Hex">#999999</b>)); <span class="comment">/* Saf4+, Chrome <span class="endcomment">*/</span></span>
- background-image: -webkit-linear-gradient(top, <b g="0" i="s2Hex">#444444</b>, <b g="1" i="s2Hex">#999999</b>); <span class="comment">/* Chrome 10+, Saf5.1+, iOS 5+ <span class="endcomment">*/</span></span>
- background-image: -moz-linear-gradient(top, <b g="0" i="s2Hex">#444444</b>, <b g="1" i="s2Hex">#999999</b>); <span class="comment">/* FF3.6 <span class="endcomment">*/</span></span>
- background-image: -ms-linear-gradient(top, <b g="0" i="s2Hex">#444444</b>, <b g="1" i="s2Hex">#999999</b>); <span class="comment">/* IE10 <span class="endcomment">*/</span></span>
- background-image: -o-linear-gradient(top, <b g="0" i="s2Hex">#444444</b>, <b g="1" i="s2Hex">#999999</b>); <span class="comment">/* Opera 11.10+ <span class="endcomment">*/</span></span>
- background-image: linear-gradient(to bottom, <b g="0" i="s2Hex">#444444</b>, <b g="1" i="s2Hex">#999999</b>);</span>
+ background-color: <b g="0" i="lHex">#444444</b>;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(<b g="0" i="lHex">#444444</b>), to(<b g="1" i="lHex">#999999</b>)); <span class="comment">/* Saf4+, Chrome <span class="endcomment">*/</span></span>
+ background-image: -webkit-linear-gradient(top, <b g="0" i="lHex">#444444</b>, <b g="1" i="lHex">#999999</b>); <span class="comment">/* Chrome 10+, Saf5.1+, iOS 5+ <span class="endcomment">*/</span></span>
+ background-image: -moz-linear-gradient(top, <b g="0" i="lHex">#444444</b>, <b g="1" i="lHex">#999999</b>); <span class="comment">/* FF3.6 <span class="endcomment">*/</span></span>
+ background-image: -ms-linear-gradient(top, <b g="0" i="lHex">#444444</b>, <b g="1" i="lHex">#999999</b>); <span class="comment">/* IE10 <span class="endcomment">*/</span></span>
+ background-image: -o-linear-gradient(top, <b g="0" i="lHex">#444444</b>, <b g="1" i="lHex">#999999</b>); <span class="comment">/* Opera 11.10+ <span class="endcomment">*/</span></span>
+ background-image: linear-gradient(to bottom, <b g="0" i="lHex">#444444</b>, <b g="1" i="lHex">#999999</b>);</span>
}</pre>
<pre class="rule comment commentclose"><span class="comment">/* */</span></pre>
</div>
@@ -182,7 +182,7 @@
<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">
.box_textshadow {
- text-shadow: <b g="0">1px</b> <b g="1">1px</b> <b g="2">3px</b> <b g="3" i="s2Hex" o="sHex">#888</b>; <span class="comment">/* FF3.5+, Opera 9+, Saf1+, Chrome, IE10 <span class="endcomment">*/</span></span>
+ text-shadow: <b g="0">1px</b> <b g="1">1px</b> <b g="2">3px</b> <b g="3" i="lHex" o="sHex">#888</b>; <span class="comment">/* FF3.5+, Opera 9+, Saf1+, Chrome, IE10 <span class="endcomment">*/</span></span>
}</pre>
<pre class="rule comment commentclose"><span class="comment">/* */</span></pre>
</div>
View
14 javascript/javascript.js
@@ -166,12 +166,12 @@ window.cssMath = {
},
/* String to Hexadecimals */
s2Hex: function (value, allValues) {
- if (value.indexOf('rgb') > -1) {
- return '#' + cssMath.da2ha(value.replace(/^rgb\s?\(\s?(.*?)\s?\)$/, '$1').split(/,\s?/)).join('');
- }
- else {
- return cssMath.h2lh(value);
- }
+ if (value.indexOf('rgb') > -1) {
+ return '#' + cssMath.da2ha(value.replace(/^rgb\s?\(\s?(.*?)\s?\)$/, '$1').split(/,\s?/)).join('');
+ }
+ else {
+ return cssMath.h2lh(value);
+ }
},
// dont include an AA in this hex
shortHex : function (value, allValues) {
@@ -557,7 +557,7 @@ $(document).ready(function () {
}
//create colorpicker
- colorPicker("b[i='s2Hex']", 'hex');
+ colorPicker("b[i='s2Hex'], b[i='lHex']", 'hex');
//track events via google analytics custom events
$(document).on('click', 'b, #matrixbox', function(event) {
View
11 test_math.html
@@ -197,11 +197,12 @@
'cssMath.s2c(\'#CCFF33FF\', 1)', 'returns: ', cssMath.s2c('#CCFF33FF'), '\n'
);
-console.log(
- 'Testing s2xm: function (s)', '\n',
- 'String to channels, hexadecimals, or units Moved', '\n',
- 'cssMath.s2xm(\'FFFEFF\', 1)', 'returns: ', cssMath.s2xm('FFFEFF', 1), '\n'
-);
+// No such function in javascript.js - not sure if this test is relevant
+// console.log(
+// 'Testing s2xm: function (s)', '\n',
+// 'String to channels, hexadecimals, or units Moved', '\n',
+// 'cssMath.s2xm(\'FFFEFF\', 1)', 'returns: ', cssMath.s2xm('FFFEFF', 1), '\n'
+// );
</script>
</head>

No commit comments for this range

Something went wrong with that request. Please try again.