diff --git a/composer.lock b/composer.lock index 6125f255..a552e1ab 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "bb378073833071ec654e0f79383e7510", + "content-hash": "dbfc241645598b6002cf8ab536d0e1e2", "packages": [ { "name": "axy/backtrace", @@ -206,7 +206,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=7.4", + "php": ">=8.0", "ext-json": "*", "ext-curl": "*", "ext-mbstring": "*" diff --git a/test/parse.php b/test/parse.php index 25087603..65704b90 100755 --- a/test/parse.php +++ b/test/parse.php @@ -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; \ No newline at end of file +echo (new Renderer(['compress' => false]))->renderAst($parser); \ No newline at end of file