Appearance
ImmutableCssCommentNode
Interface for immutable CSS comment nodes.
typescript
interface ImmutableCssCommentNode extends BaseImmutableCssNode
Description
ImmutableCssCommentNode
represents CSS comments in stylesheets. Comments can contain documentation, TODOs, temporary code, or metadata. This interface provides methods to access the comment text content.
Import
typescript
import { ImmutableCssCommentNode } from '@stripoinc/ui-editor-extensions';
Inheritance
Extends: BaseImmutableCssNode
Methods
getTextContent()
Retrieves the text content of the CSS comment.
typescript
getTextContent(): string
Returns: string
- The comment text (without /* */ delimiters)
Throws: Error
if the node cannot be found
Example:
typescript
const commentText = comment.getTextContent();
// "TODO: Update these styles", "Legacy code - do not remove", etc.