修改完成
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$root = Split-Path -Parent $PSScriptRoot
|
||||
foreach ($relative in @('pages/tree/t07-member-directory.vue', 'pages/tree/t08-member-states.vue')) {
|
||||
$page = Get-Content -LiteralPath (Join-Path $root $relative) -Raw -Encoding utf8
|
||||
$style = [regex]::Match($page, '(?s)<style[^>]*>(.*?)</style>').Groups[1].Value
|
||||
if ([regex]::IsMatch($style, '(?m)\bposition\s*:')) { throw "$relative must use document flow throughout" }
|
||||
}
|
||||
$t07 = Get-Content -LiteralPath (Join-Path $root 'pages/tree/t07-member-directory.vue') -Raw -Encoding utf8
|
||||
if ($t07 -match '(?s)\.directory-card\s*\{[^}]*(?<![-\w])height\s*:\s*19[26]rpx') {
|
||||
throw 'T07 directory cards must grow with member data instead of using a fixed content height'
|
||||
}
|
||||
foreach ($selector in @('directory-card__name', 'directory-card__meta')) {
|
||||
if ($t07 -match "(?s)\.$selector\s*\{[^}]*(?:overflow:\s*hidden|text-overflow:\s*ellipsis|white-space:\s*nowrap)") {
|
||||
throw "T07 .$selector must wrap instead of clipping member data"
|
||||
}
|
||||
}
|
||||
Write-Output 'T07-T08-DOCUMENT-FLOW-CONTRACT PASS'
|
||||
Reference in New Issue
Block a user