PXStylesheet Class Reference
| Inherits from | NSObject |
| Declared in | PXStylesheet.h |
Overview
A PXStylesheet typically corresponds to a single CSS file. Each stylesheet contains a list of rule sets defined within it.
A PXStylesheet typically corresponds to a single CSS file. Each stylesheet contains a list of rule sets defined within it.
Tasks
Other Methods
-
originA PXStylesheetOrigin enumeration value indicating the origin of this stylesheet. Origin values are used in specificity calculations.
property -
errorsA nonmutable array of error strings that were encountered when parsing the source of this stylesheet
property -
filePathThe string path to the file containing the source of this stylesheet
property -
monitorChangesA flag to watch the file for changes. If file changes, then a call to sendChangeNotifation is made.
property
Extension Methods
-
ruleSetsA nonmutable array of rule sets that are contained within this stylesheet
property -
mediaGroupsA nonmutable array of media groups that are contained within this stylesheet
property -
activeMediaQueryThe current media query that applies to any rule sets added to this stylesheet
property -
+ styleSheetFromSource:withOrigin:Allocate and initialize a new stylesheet using the specified source and stylesheet origin
-
+ styleSheetFromFilePath:withOrigin:Allocate and initialize a new styleheet for the specified path and stylesheet origin
-
+ currentApplicationStylesheetA class-level getter returning the current application-level stylesheet. This value may be nil
-
+ currentUserStylesheetA class-level getter returning the current user-level stylesheet. This value may be nil
-
+ currentViewStylesheetA class-level getter returning the current view-level stylesheet. This value may be nil
-
– initWithOrigin:Initialize a new stylesheet instance and set its stylesheet origin
-
– addRuleSet:Add a new rule set to this stylesheet
-
– setURI:forNamespacePrefix:Register a namespace URI for a given prefix. If the prefix is nil or an empty string, then this method sets the default namespace URI.
-
– namespaceForPrefix:Return the namespace URI for the specified prefix. If prefix is nil or an empty string, then the default namespace URI will be returned, if one has been defined
-
– ruleSetsMatchingStyleable:Return a list of rule sets whose selectors match against a specified element
-
– addKeyframe:Add a keyframe animation to this stylesheet
-
– keyframeForName:Retrieve the keyframe for the specified name. This may return nil
Properties
activeMediaQuery
The current media query that applies to any rule sets added to this stylesheet
@property (nonatomic, strong) id<PXMediaExpression> activeMediaQueryDiscussion
The current media query that applies to any rule sets added to this stylesheet
Declared In
PXStylesheet-Private.herrors
A nonmutable array of error strings that were encountered when parsing the source of this stylesheet
@property (nonatomic, strong) NSArray *errorsDiscussion
A nonmutable array of error strings that were encountered when parsing the source of this stylesheet
Declared In
PXStylesheet.hfilePath
The string path to the file containing the source of this stylesheet
@property (nonatomic, strong) NSString *filePathDiscussion
The string path to the file containing the source of this stylesheet
Declared In
PXStylesheet.hmediaGroups
A nonmutable array of media groups that are contained within this stylesheet
@property (readonly, nonatomic, strong) NSArray *mediaGroupsDiscussion
A nonmutable array of media groups that are contained within this stylesheet
Declared In
PXStylesheet-Private.hmonitorChanges
A flag to watch the file for changes. If file changes, then a call to sendChangeNotifation is made.
@property (nonatomic, assign) BOOL monitorChangesDiscussion
A flag to watch the file for changes. If file changes, then a call to sendChangeNotifation is made.
Declared In
PXStylesheet.horigin
A PXStylesheetOrigin enumeration value indicating the origin of this stylesheet. Origin values are used in specificity calculations.
@property (readonly, nonatomic) PXStylesheetOrigin originDiscussion
A PXStylesheetOrigin enumeration value indicating the origin of this stylesheet. Origin values are used in specificity calculations.
Declared In
PXStylesheet.hClass Methods
currentApplicationStylesheet
A class-level getter returning the current application-level stylesheet. This value may be nil
+ (PXStylesheet *)currentApplicationStylesheetDiscussion
A class-level getter returning the current application-level stylesheet. This value may be nil
Declared In
PXStylesheet-Private.hcurrentUserStylesheet
A class-level getter returning the current user-level stylesheet. This value may be nil
+ (PXStylesheet *)currentUserStylesheetDiscussion
A class-level getter returning the current user-level stylesheet. This value may be nil
Declared In
PXStylesheet-Private.hcurrentViewStylesheet
A class-level getter returning the current view-level stylesheet. This value may be nil
+ (PXStylesheet *)currentViewStylesheetDiscussion
A class-level getter returning the current view-level stylesheet. This value may be nil
Declared In
PXStylesheet-Private.hstyleSheetFromFilePath:withOrigin:
Allocate and initialize a new styleheet for the specified path and stylesheet origin
+ (id)styleSheetFromFilePath:(NSString *)filePath withOrigin:(PXStylesheetOrigin)originParameters
- filePath
The string path to the stylesheet file
- origin
The specificity origin for this stylesheet
Discussion
Allocate and initialize a new styleheet for the specified path and stylesheet origin
Declared In
PXStylesheet-Private.hstyleSheetFromSource:withOrigin:
Allocate and initialize a new stylesheet using the specified source and stylesheet origin
+ (id)styleSheetFromSource:(NSString *)source withOrigin:(PXStylesheetOrigin)originParameters
- source
The CSS source for this stylesheet
- origin
The specificity origin for this stylesheet
Discussion
Allocate and initialize a new stylesheet using the specified source and stylesheet origin
Declared In
PXStylesheet-Private.hInstance Methods
addKeyframe:
Add a keyframe animation to this stylesheet
- (void)addKeyframe:(PXKeyframe *)keyframeParameters
- keyframe
The keyframe to add to the stylesheet
Discussion
Add a keyframe animation to this stylesheet
Declared In
PXStylesheet-Private.haddRuleSet:
Add a new rule set to this stylesheet
- (void)addRuleSet:(PXRuleSet *)ruleSetParameters
- ruleSet
The rule set to add. Nil values are ignored
Discussion
Add a new rule set to this stylesheet
Declared In
PXStylesheet-Private.hinitWithOrigin:
Initialize a new stylesheet instance and set its stylesheet origin
- (id)initWithOrigin:(PXStylesheetOrigin)originParameters
- origin
The specificity origin for this stylesheet
Discussion
Initialize a new stylesheet instance and set its stylesheet origin
Declared In
PXStylesheet-Private.hkeyframeForName:
Retrieve the keyframe for the specified name. This may return nil
- (PXKeyframe *)keyframeForName:(NSString *)nameParameters
- name
The name of the keyframe
Discussion
Retrieve the keyframe for the specified name. This may return nil
Declared In
PXStylesheet-Private.hnamespaceForPrefix:
Return the namespace URI for the specified prefix. If prefix is nil or an empty string, then the default namespace URI will be returned, if one has been defined
- (NSString *)namespaceForPrefix:(NSString *)prefixParameters
- prefix
The namespace prefix
Discussion
Return the namespace URI for the specified prefix. If prefix is nil or an empty string, then the default namespace URI will be returned, if one has been defined
Declared In
PXStylesheet-Private.hruleSetsMatchingStyleable:
Return a list of rule sets whose selectors match against a specified element
- (NSArray *)ruleSetsMatchingStyleable:(id<PXStyleable>)elementParameters
- element
The element to match against
Discussion
Return a list of rule sets whose selectors match against a specified element
Declared In
PXStylesheet-Private.hsetURI:forNamespacePrefix:
Register a namespace URI for a given prefix. If the prefix is nil or an empty string, then this method sets the default namespace URI.
- (void)setURI:(NSString *)uri forNamespacePrefix:(NSString *)prefixParameters
- uri
The URI (as a string) for the namespace
- prefix
The namespace prefix to associate with the namespace URI
Discussion
Register a namespace URI for a given prefix. If the prefix is nil or an empty string, then this method sets the default namespace URI.
Declared In
PXStylesheet-Private.h