Skip to content

Commit

Permalink
Make unit optional in CSS length values
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Booth committed Jun 5, 2013
1 parent 074d3ca commit a9bdf61
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Core/Source/NSString+CSS.h
Expand Up @@ -20,7 +20,7 @@
- (NSDictionary *)dictionaryOfCSSStyles;

/**
Determines if the receiver contains a CSS length value, that is a number (with optional period) and a unit (em, pt, px).
Determines if the receiver contains a CSS length value, that is a number with optional period and unit (em, pt, px).
@returns `YES` if this is a CSS length value
*/
- (BOOL)isCSSLengthValue;
Expand Down
2 changes: 1 addition & 1 deletion Core/Source/NSString+CSS.m
Expand Up @@ -50,7 +50,7 @@ - (BOOL)isCSSLengthValue
NSString *numberUnitStr;
if (![scanner scanCharactersFromSet:[NSCharacterSet cssLengthUnitCharacterSet] intoString:&numberUnitStr])
{
return NO;
return YES;
}

if ([numberUnitStr isEqualToString:@"em"] | [numberUnitStr isEqualToString:@"px"] | [numberUnitStr isEqualToString:@"pt"])
Expand Down

0 comments on commit a9bdf61

Please sign in to comment.