Compare commits
No commits in common. "55ddc3b5e2bb07f070cf6a16a10a508c2d808013" and "46810c675e17471afb4cf81df789a0897c6fb607" have entirely different histories.
55ddc3b5e2
...
46810c675e
@ -26,7 +26,6 @@ class Tailwindcss4Merger
|
||||
$atLayerComponents = $this->getLayerComponents($styles);
|
||||
$atProperty = $this->getProperties($styles);
|
||||
$atLayerProperties = $this->getLayerProperties($styles);
|
||||
$unlayered = $this->getUnlayered($styles);
|
||||
return implode(chr(10), [
|
||||
$atLayerOrder,
|
||||
$atLayerBase,
|
||||
@ -35,7 +34,6 @@ class Tailwindcss4Merger
|
||||
$atLayerComponents,
|
||||
$atProperty,
|
||||
$atLayerProperties,
|
||||
$unlayered,
|
||||
]);
|
||||
}
|
||||
|
||||
@ -124,8 +122,7 @@ class Tailwindcss4Merger
|
||||
{
|
||||
$matches = $this->getLayerByName($styles, 'properties');
|
||||
$properties = [
|
||||
' @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline)'
|
||||
. ' and (not (color:rgb(from red r g b)))) {
|
||||
' @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
|
||||
*, ::before, ::after, ::backdrop {'
|
||||
];
|
||||
foreach ($matches as $match) {
|
||||
@ -147,11 +144,4 @@ class Tailwindcss4Merger
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user