Permalink
Browse files

Fix

  • Loading branch information...
1 parent 9401626 commit bf9a7a10d8f0893ccfa5b0b3a2decd2233c2713e @Calvein committed Mar 7, 2012
Showing with 7 additions and 12 deletions.
  1. +1 −1 v2/css/style.css
  2. +0 −1 v2/index.html
  3. +6 −10 v2/js/script.js
View
@@ -1,7 +1,7 @@
* { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; }
div {
- width: 800px;
+ max-width: 800px;
height: 200px;
background-color: #ded8c5;
margin: 0 auto;
View
@@ -26,7 +26,6 @@ <h1 class="ribbon up"><span class=before></span>
<span class=after></span></h1>
</div>
<input type=range value=800 min=100 max=1200 step=100>
-<input type=number value=16 min=0 max=45 step=1>
<input type=color value="#444">
<input type=button value=flip>
View
@@ -1,3 +1,5 @@
+// All the code is nasty, don't use it, please
+
'use strict'
var $ribbon = $('.ribbon')
@@ -16,6 +18,7 @@ var Color = net.brehaut.Color
// By default, take a color from this theme http://kuler.adobe.com/#themeID/2221 (Kuler API sucks)
, startColors = ['#FFF8E3', '#CCCC9F', '#33332D', '#9FB4CC', '#DB4105']
, color = null
+ , styleSheet = document.styleSheets[1];
/*
@@ -51,10 +54,8 @@ $('input[type=color]')
$uBefore.css('background', moins20)
- var s = document.styleSheets[1];
-
- s.insertRule('.ribbon u::selection { background-color: ' + moins20 + ' }');
- s.insertRule('.ribbon u::-moz-selection { background-color: ' + moins20 + ' }');
+ styleSheet.insertRule('.ribbon u::selection { background-color: ' + moins20 + ' }');
+ styleSheet.insertRule('.ribbon u::-moz-selection { background-color: ' + moins20 + ' }');
})
.val(
(function() {
@@ -70,12 +71,7 @@ $u.on('blur', function(e) {
$('input[type=range]').on('change', function(e) {
- $('div').width(this.value)
-})
-
-$('input[type=number]').on('change', function(e) {
- $ribbonBefore.css('-webkit-transform', 'rotate(-' + this.value + 'deg)')
- $iBefore.css('-webkit-transform', 'rotate(' + this.value + 'deg)')
+ $('div').css('max-width', this.value)
})
$('input[type=button]').on('click', function(e) {

0 comments on commit bf9a7a1

Please sign in to comment.