Skip to content

Commit

Permalink
fix composer.lock issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tbela99 committed Jul 14, 2022
1 parent fd83f44 commit 6b15fa1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 41 deletions.
4 changes: 2 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 8 additions & 39 deletions test/parse.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,44 +14,13 @@
//
//echo $proertyList;

$parser = new Parser('.widget-rss.red .title,
.widget-recent .title {
color: red;
}
aside .widget-rss:hover {
background: #fff;
}');

$stylesheet = $parser->parse();


foreach ($stylesheet->query("[value*='.widget-rss']") as $p) {
foreach($p->getSelector() as $selector) {
if(strpos($selector, '.widget-rss') !== false) {

try {

$p->removeSelector($selector);
}

catch (Exception $e) {

// empty selector
$p['parentNode']->remove($p);
}
}
}
}

//try {

echo $stylesheet;
//}
//
//catch (Exception $e) {
//
// echo $e->getMessage();
//$parser = new Parser('
//.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image):first-child:nth-last-child(2),
//.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image):first-child:nth-last-child(2)~figure.wp-block-image:not(#individual-image) {
// width: calc(50% - var(--wp--style--unstable-gallery-gap, 16px)*0.5)
//}
//var_dump($parser->getAst());
//');

$parser = new Parser('.cb + .a~.b.cd[type~="ab cd"] {dir:rtl;}');

//echo $parser;
echo (new Renderer(['compress' => false]))->renderAst($parser);

0 comments on commit 6b15fa1

Please sign in to comment.