PHP 클래스 SassRuleNode

Represents a CSS rule.
상속: extends SassNode
파일 보기 프로젝트 열기: richthegeek/phpsass 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( object $token ) : SassRuleNode SassRuleNode constructor.
addSelectors ( string $selectors, boolean $explode = true ) Adds selector(s) to the rule.
extend ( ) Extend this nodes selectors $extendee is the subject of the @extend directive $extender is the selector that contains the @extend directive $selector a selector or selector sequence that is to be extended
getIsContinued ( ) : boolean Returns a value indicating if the selectors for this rule are to be continued.
getSelectors ( ) : array Returns the selectors
isPlaceholder ( $selector )
parse ( SassContext $context ) : array Parse this node and its children into static nodes.
render ( ) : string Render this node and its children to CSS.
resolveSelectors ( SassContext $context ) : array Resolves selectors.

보호된 메소드들

메소드 설명
getParentSelectors ( mixed $context ) : array Returns the parent selector(s) for this node.

비공개 메소드들

메소드 설명
explode ( string $string ) : array Explodes a string of selectors into an array.
hasParentReference ( string $selector ) : boolean Determines if there is a parent reference in the selector
isPsuedo ( string $selector ) : boolean Tests whether the selector is a psuedo selector
isSequence ( string $selector ) : boolean Tests whether the selector is a sequence selector
mergeSequence ( string $extender, string $extendee, string $selector ) : array Merges selector sequences
parentReferencePos ( string $selector ) : mixed Returns the position of the first parent reference in the selector.
resolveParentReferences ( string $selector, mixed $context ) : string Resolves parent references in the selector

메소드 상세

__construct() 공개 메소드

SassRuleNode constructor.
public __construct ( object $token ) : SassRuleNode
$token object source token
리턴 SassRuleNode

addSelectors() 공개 메소드

If the selectors are to continue for the rule the selector must end in a comma
public addSelectors ( string $selectors, boolean $explode = true )
$selectors string selector
$explode boolean

extend() 공개 메소드

Extend this nodes selectors $extendee is the subject of the @extend directive $extender is the selector that contains the @extend directive $selector a selector or selector sequence that is to be extended
public extend ( )

getIsContinued() 공개 메소드

Returns a value indicating if the selectors for this rule are to be continued.
public getIsContinued ( ) : boolean
리턴 boolean rue if the selectors for this rule are to be continued false if not

getParentSelectors() 보호된 메소드

This in an empty array if there is no parent selector.
protected getParentSelectors ( mixed $context ) : array
$context mixed
리턴 array the parent selector for this node

getSelectors() 공개 메소드

Returns the selectors
public getSelectors ( ) : array
리턴 array selectors

isPlaceholder() 공개 메소드

public isPlaceholder ( $selector )

parse() 공개 메소드

Parse this node and its children into static nodes.
public parse ( SassContext $context ) : array
$context SassContext the context in which this node is parsed
리턴 array the parsed node and its children

render() 공개 메소드

Render this node and its children to CSS.
public render ( ) : string
리턴 string the rendered node

resolveSelectors() 공개 메소드

Interpolates SassScript in selectors and resolves any parent references or appends the parent selectors.
public resolveSelectors ( SassContext $context ) : array
$context SassContext the context in which this node is parsed Change: 7/Dec/11 - change to make selector ordering conform to Ruby compiler.
리턴 array