source: frontend/node_modules/postcss/lib/comment.d.ts

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 1.6 KB
Line 
1import Container from './container.js'
2import Node, { NodeProps } from './node.js'
3
4declare namespace Comment {
5 export interface CommentRaws extends Record<string, unknown> {
6 /**
7 * The space symbols before the node.
8 */
9 before?: string
10
11 /**
12 * The space symbols between `/*` and the comment’s text.
13 */
14 left?: string
15
16 /**
17 * The space symbols between the comment’s text.
18 */
19 right?: string
20 }
21
22 export interface CommentProps extends NodeProps {
23 /** Information used to generate byte-to-byte equal node string as it was in the origin input. */
24 raws?: CommentRaws
25 /** Content of the comment. */
26 text: string
27 }
28
29 export { Comment_ as default }
30}
31
32/**
33 * It represents a class that handles
34 * [CSS comments](https://developer.mozilla.org/en-US/docs/Web/CSS/Comments)
35 *
36 * ```js
37 * Once (root, { Comment }) {
38 * const note = new Comment({ text: 'Note: …' })
39 * root.append(note)
40 * }
41 * ```
42 *
43 * Remember that CSS comments inside selectors, at-rule parameters,
44 * or declaration values will be stored in the `raws` properties
45 * explained above.
46 */
47declare class Comment_ extends Node {
48 parent: Container | undefined
49 raws: Comment.CommentRaws
50 type: 'comment'
51 /**
52 * The comment's text.
53 */
54 get text(): string
55
56 set text(value: string)
57
58 constructor(defaults?: Comment.CommentProps)
59 assign(overrides: Comment.CommentProps | object): this
60 clone(overrides?: Partial<Comment.CommentProps>): this
61 cloneAfter(overrides?: Partial<Comment.CommentProps>): this
62 cloneBefore(overrides?: Partial<Comment.CommentProps>): this
63}
64
65declare class Comment extends Comment_ {}
66
67export = Comment
Note: See TracBrowser for help on using the repository browser.