Home > @csstools/css-parser-algorithms > SimpleBlockNode
A simple block node.
Signature:
export declare class SimpleBlockNode extends ContainerNodeBaseClass Extends: ContainerNodeBaseClass
const node = parseComponentValue(tokenize('[foo=bar]'));
isSimpleBlockNode(node); // true
node.startToken; // [TokenType.OpenSquare, '[', 0, 0, undefined]|
Constructor |
Modifiers |
Description |
|---|---|---|
|
Constructs a new instance of the |
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
CSSToken |
The token for the closing token of the block. If the block is closed it will be the mirror variant of the | ||
|
CSSToken |
The token for the opening token of the block. | ||
|
The node type, always |
|
Method |
Modifiers |
Description |
|---|---|---|
|
Normalize the current simple block 1. if the "endToken" is EOF, replace with the mirror token of the "startToken" | ||
|
Retrieve the tokens for the current simple block. This is the inverse of parsing from a list of tokens. | ||
|
Convert the current simple block to a string. This is not a true serialization. It is purely a concatenation of the string representation of the tokens. |