Skip to content

Commit

Permalink
fix: support of @container directive #89
Browse files Browse the repository at this point in the history
  • Loading branch information
Cerdic committed Nov 18, 2024
1 parent 3d65b74 commit ffc835d
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 3 deletions.
2 changes: 1 addition & 1 deletion class.csstidy.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
* An online version should be available here: http://cdburnerxp.se/cssparse/css_optimiser.php
* @package csstidy
* @author Florian Schmitz (floele at gmail dot com) 2005-2006
* @version 2.2.0
* @version 2.2.1
*/
class csstidy {

Expand Down
4 changes: 2 additions & 2 deletions data.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
* @global array $data['csstidy']['at_rules']
* @version 1.1
*/
$data['csstidy']['at_rules'] = array('page' => 'is','font-face' => 'atis','charset' => 'iv', 'import' => 'iv','namespace' => 'iv','media' => 'at', 'supports' => 'at', 'keyframes' => 'at','-moz-keyframes' => 'at','-o-keyframes' => 'at','-webkit-keyframes' => 'at','-ms-keyframes' => 'at');
$data['csstidy']['at_rules'] = array('page' => 'is','font-face' => 'atis','charset' => 'iv', 'import' => 'iv','namespace' => 'iv','media' => 'at', 'supports' => 'at', 'keyframes' => 'at','-moz-keyframes' => 'at','-o-keyframes' => 'at','-webkit-keyframes' => 'at','-ms-keyframes' => 'at','container' => 'at');

/**
* Properties that need a value with unit
Expand Down Expand Up @@ -647,4 +647,4 @@
$data['csstidy']['predefined_templates']['low_compression'][] = ' ';
$data['csstidy']['predefined_templates']['low_compression'][] = '<span class="comment">'; // before comment
$data['csstidy']['predefined_templates']['low_compression'][] = '</span>'."\n"; // after comment
$data['csstidy']['predefined_templates']['low_compression'][] = "\n";
$data['csstidy']['predefined_templates']['low_compression'][] = "\n";
5 changes: 5 additions & 0 deletions tests/Fixtures/special/container.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@container myContainer (width < 500px) {
.child {
width: 50%;
}
}
9 changes: 9 additions & 0 deletions tests/Fixtures/special/container.full-expected.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

return array (
'@container myContainer (width 500px) ' => array(
'.child' => array(
'width' => '50%',
)
)
);
6 changes: 6 additions & 0 deletions tests/Fixtures/special/container.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php

return [
'test' => '@container',
'settings' => [],
];

0 comments on commit ffc835d

Please sign in to comment.