Skip to content
Browse files

Merge pull request #2421 from kentaromiura/bugfix-2420

fixes #2420
  • Loading branch information...
2 parents 4d6b2af + 302e028 commit d78c8755fba57934e6d8eae629ab1e1ff70794c0 @arian arian committed Sep 1, 2012
Showing with 15 additions and 1 deletion.
  1. +1 −1 Source/Element/Element.Style.js
  2. +14 −0 Specs/1.4client/Element/Element.Style.js
View
2 Source/Element/Element.Style.js
@@ -179,7 +179,7 @@ Element.implement({
Element.Styles = {
left: '@px', top: '@px', bottom: '@px', right: '@px',
width: '@px', height: '@px', maxWidth: '@px', maxHeight: '@px', minWidth: '@px', minHeight: '@px',
- backgroundColor: 'rgb(@, @, @)', backgroundPosition: '@px @px', color: 'rgb(@, @, @)',
+ backgroundColor: 'rgb(@, @, @)', backgroundSize: '@px', backgroundPosition: '@px @px', color: 'rgb(@, @, @)',
fontSize: '@px', letterSpacing: '@px', lineHeight: '@px', clip: 'rect(@px @px @px @px)',
margin: '@px @px @px @px', padding: '@px @px @px @px', border: '@px @ rgb(@, @, @) @px @ rgb(@, @, @) @px @ rgb(@, @, @)',
borderWidth: '@px @px @px @px', borderStyle: '@ @ @ @', borderColor: 'rgb(@, @, @) rgb(@, @, @) rgb(@, @, @) rgb(@, @, @)',
View
14 Specs/1.4client/Element/Element.Style.js
@@ -173,6 +173,20 @@ describe('Element.Style', function(){
});
+ describe('set/getStyle background-size', function(){
+
+ it('should return the correct pixel size', function(){
+ var foo = new Element('div', {
+ styles: {
+ backgroundSize: '44px'
+ }
+ });
+ foo.setStyle('background-size', 20);​
+ expect(foo.getStyle('backgroundSize')).toEqual('20px');
+ });
+
+ });
+
describe('getStyle background-position', function(){
beforeEach(function(){
var className = 'getStyleBackgroundPosition';

0 comments on commit d78c875

Please sign in to comment.
Something went wrong with that request. Please try again.