Skip to content

Commit

Permalink
#110 revert docs change
Browse files Browse the repository at this point in the history
  • Loading branch information
tbela99 committed Sep 24, 2022
1 parent e462631 commit 8e0126a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -412,12 +412,12 @@ Example using ast

```php

use TBela\CSS\Ast\NodeWalker;
use TBela\CSS\Ast\Traverser;
use TBela\CSS\Parser;
use TBela\CSS\Renderer;

$parser = (new Parser())->load('ast/media.css');
$traverser = new NodeWalker();
$traverser = new Traverser();
$renderer = new Renderer(['remove_empty_nodes' => true]);

$ast = $parser->getAst();
Expand All @@ -427,7 +427,7 @@ $traverser->on('enter', function ($node) {

if ($node->type == 'AtRule' && $node->name == 'media' && $node->value == 'print') {

return NodeWalker::IGNORE_NODE;
return Traverser::IGNORE_NODE;
}
});

Expand All @@ -439,12 +439,12 @@ Example using an Element instance

```php

use TBela\CSS\Ast\NodeWalker;
use TBela\CSS\Ast\Traverser;
use TBela\CSS\Parser;
use TBela\CSS\Renderer;

$parser = (new Parser())->load('ast/media.css');
$traverser = new NodeWalker();
$traverser = new Traverser();
$renderer = new Renderer(['remove_empty_nodes' => true]);

$element = $parser->parse();
Expand All @@ -454,7 +454,7 @@ $traverser->on('enter', function ($node) {

if ($node->type == 'AtRule' && $node->name == 'media' && $node->value == 'print') {

return NodeWalker::IGNORE_NODE;
return Traverser::IGNORE_NODE;
}
});

Expand Down
12 changes: 6 additions & 6 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -412,12 +412,12 @@ Example using ast

```php

use TBela\CSS\Ast\NodeWalker;
use TBela\CSS\Ast\Traverser;
use TBela\CSS\Parser;
use TBela\CSS\Renderer;

$parser = (new Parser())->load('ast/media.css');
$traverser = new NodeWalker();
$traverser = new Traverser();
$renderer = new Renderer(['remove_empty_nodes' => true]);

$ast = $parser->getAst();
Expand All @@ -427,7 +427,7 @@ $traverser->on('enter', function ($node) {

if ($node->type == 'AtRule' && $node->name == 'media' && $node->value == 'print') {

return NodeWalker::IGNORE_NODE;
return Traverser::IGNORE_NODE;
}
});

Expand All @@ -439,12 +439,12 @@ Example using an Element instance

```php

use TBela\CSS\Ast\NodeWalker;
use TBela\CSS\Ast\Traverser;
use TBela\CSS\Parser;
use TBela\CSS\Renderer;

$parser = (new Parser())->load('ast/media.css');
$traverser = new NodeWalker();
$traverser = new Traverser();
$renderer = new Renderer(['remove_empty_nodes' => true]);

$element = $parser->parse();
Expand All @@ -454,7 +454,7 @@ $traverser->on('enter', function ($node) {

if ($node->type == 'AtRule' && $node->name == 'media' && $node->value == 'print') {

return NodeWalker::IGNORE_NODE;
return Traverser::IGNORE_NODE;
}
});

Expand Down
12 changes: 6 additions & 6 deletions docs/traverser.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ add a callback for the specified event

```php

use TBela\CSS\Ast\NodeWalker;
use TBela\CSS\Ast\Traverser;

$traverser = new NodeWalker();
$traverser = new Traverser();
$callable = function ($node) {

// remove @media print {}
if ($node->type == 'AtRule' && $node->value == 'print') {

return NodeWalker::IGNORE_NODE;
return Traverser::IGNORE_NODE;
}
};

Expand All @@ -52,15 +52,15 @@ remove a callback for the specified event

```php

use TBela\CSS\Ast\NodeWalker;
use TBela\CSS\Ast\Traverser;

$traverser = new NodeWalker();
$traverser = new Traverser();
$callable = function ($node) {

// remove @media print {}
if ($node->type == 'AtRule' && $node->value == 'print') {

return NodeWalker::IGNORE_NODE;
return Traverser::IGNORE_NODE;
}
};

Expand Down

0 comments on commit 8e0126a

Please sign in to comment.