OCSS - CSS Parser for iOS
OCSS (Objective-CSS) is a CSS parser library implementing a part of CSS2, CSS3, DOM and HTML5.
NSURL *url = [NSBundle.mainBundle.resourceURL URLByAppendingPathComponent:@"style.css"];
OCSS *css = [[OCSS alloc] initWithContentsOfURL:url];
OCSSStyleDeclaration *style = [css getComputedStyleForSelector:@".table thead th"];
NSString *padding = style[@"padding"];
E
#id
.class
E F
, E > F
E + F
, E ~ F
[attr]
, [class=nav]
, [class^="icon-"]
*
:first-child { }
(partially available)@media screen and (min-width: 321px) and (max-device-width: 920px) { }
(parsed and ignored)@import url(style.css);
(parsed and ignored)@charset "utf-8";
(parsed and ignored)font-size: inherit;
color: red !important;
Yusuke Kawasaki http://www.kawa.net/
The following copyright notice applies to all the files provided in this distribution, including binary files, unless explicitly noted otherwise.
Copyright 2013 Yusuke Kawasaki