Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Convenience method for writing inline CSS.

  • Loading branch information...
commit 6dd07eebd434afaf1b7020bba95c91f6e95c0d33 1 parent 6577420
@mikeabdullah mikeabdullah authored
Showing with 8 additions and 0 deletions.
  1. +1 −0  KSHTMLWriter.h
  2. +7 −0 KSHTMLWriter.m
View
1  KSHTMLWriter.h
@@ -97,6 +97,7 @@
#pragma mark Style
+- (void)writeStyleElementWithCSSString:(NSString *)css;
- (void)startStyleElementWithType:(NSString *)type;
View
7 KSHTMLWriter.m
@@ -201,6 +201,13 @@ - (void)endJavascriptCDATA;
#pragma mark Style
+- (void)writeStyleElementWithCSSString:(NSString *)css;
+{
+ [self startStyleElementWithType:@"text/css"];
+ [self writeString:css]; // browsers don't expect styles to be XML escaped
+ [self endElement];
+}
+
- (void)startStyleElementWithType:(NSString *)type;
{
[self openTag:@"style"];
Please sign in to comment.
Something went wrong with that request. Please try again.