Lasse begrenzte Farbflächen bei kein Abstand ohne Lücke verschmelzen
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
25b2149d43
commit
66f9275099
8 files changed
+67
-1
No files matched your search
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Tests\TestCase;
|
||||
|
||||
/**
|
||||
* Begrenzte Flächen (Hintergrundbreite „Auf Abschnittsbreite begrenzt“) verschmelzen, wenn „Abstand unten“ und
|
||||
* „Abstand oben“ der Nachbarn „kein Abstand“ sind. Das Verhalten ist reines CSS; geprüft wird die Regel für jede Fläche,
|
||||
* die der Renderer als eigene Fläche kennt, damit eine neue Fläche die Naht nicht vergisst.
|
||||
*/
|
||||
class CmsSectionMergeTest extends TestCase
|
||||
{
|
||||
public function test_the_merge_rules_cover_every_surface_and_both_sides_of_the_seam(): void
|
||||
{
|
||||
$css = (string) file_get_contents(resource_path('css/sections.css'));
|
||||
|
||||
foreach (['light', 'dark', 'accent', 'palette', 'image'] as $surface) {
|
||||
$this->assertStringContainsString('.section-bg-'.$surface, $css, 'Die Fläche „'.$surface.'“ fehlt in den Regeln.');
|
||||
}
|
||||
|
||||
$this->assertMatchesRegularExpression('/\.section-bg-width-section\.section-space-bottom-none:has\(\+ :is\([^)]*\)\.section-space-top-none\)\s*\{[^}]*margin-bottom:\s*0;/', $css, 'Unterseite der oberen Fläche');
|
||||
$this->assertMatchesRegularExpression('/\.section-space-bottom-none \+ \.section-bg-width-section\.section-space-top-none\s*\{[^}]*margin-top:\s*0;/', $css, 'Oberseite der unteren Fläche');
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user