Compare commits

..

No commits in common. "55ddc3b5e2bb07f070cf6a16a10a508c2d808013" and "46810c675e17471afb4cf81df789a0897c6fb607" have entirely different histories.

View File

@ -26,7 +26,6 @@ class Tailwindcss4Merger
$atLayerComponents = $this->getLayerComponents($styles); $atLayerComponents = $this->getLayerComponents($styles);
$atProperty = $this->getProperties($styles); $atProperty = $this->getProperties($styles);
$atLayerProperties = $this->getLayerProperties($styles); $atLayerProperties = $this->getLayerProperties($styles);
$unlayered = $this->getUnlayered($styles);
return implode(chr(10), [ return implode(chr(10), [
$atLayerOrder, $atLayerOrder,
$atLayerBase, $atLayerBase,
@ -35,7 +34,6 @@ class Tailwindcss4Merger
$atLayerComponents, $atLayerComponents,
$atProperty, $atProperty,
$atLayerProperties, $atLayerProperties,
$unlayered,
]); ]);
} }
@ -124,8 +122,7 @@ class Tailwindcss4Merger
{ {
$matches = $this->getLayerByName($styles, 'properties'); $matches = $this->getLayerByName($styles, 'properties');
$properties = [ $properties = [
' @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline)' ' @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
. ' and (not (color:rgb(from red r g b)))) {
*, ::before, ::after, ::backdrop {' *, ::before, ::after, ::backdrop {'
]; ];
foreach ($matches as $match) { foreach ($matches as $match) {
@ -147,11 +144,4 @@ class Tailwindcss4Merger
{ {
return '@layer ' . $name . " {\n" . implode("\n", $styles) . "\n}"; return '@layer ' . $name . " {\n" . implode("\n", $styles) . "\n}";
} }
protected function getUnlayered(string $styles): string
{
$unlayered = preg_replace('/(?<layer>@layer[^;{]+;)/i', '', $styles, -1);
$unlayered = preg_replace('/@layer[^{;]+\{.+?(?=\n})\n}/s', '', $unlayered, -1);
return preg_replace('/(?<property>@property[^{]+\{[^}]+})/i', '', $unlayered, -1);
}
} }