(fix)toast :no white-space: nowrap

This commit is contained in:
2026-08-18 02:51:11 +08:00
parent 699387dbe9
commit ed6d523d05
2 changed files with 10 additions and 2 deletions
+7 -1
View File
@@ -13,8 +13,11 @@
}
.notyf {
position: relative;
margin-bottom: 0.6em;
color: #fff;
font-size: 14px;
line-height: 1.42857143;
float: right;
min-width: 200px;
padding: 1em 3em 1em 3.4em;
@@ -58,7 +61,10 @@
}
.notyf::before {
font: normal normal normal 16px/1 FontAwesome;
font-family: "Font Awesome 5 Free";
font-style: normal;
font-weight: 900;
line-height: 1;
left: 0.8em;
font-size: 1.5em;
position: absolute;
+3 -1
View File
@@ -175,7 +175,9 @@ test('notyf CSS and WordPress enqueue match the reference contract', () => {
const scripts = read('src/Core/ScriptsPart1c.php');
assert.match(css, /\.notyn\s*\{[\s\S]*?bottom:\s*6em;[\s\S]*?max-width:\s*320px;[\s\S]*?z-index:\s*10000000;/);
assert.match(css, /\.notyf\s*\{[\s\S]*?min-width:\s*200px;[\s\S]*?padding:\s*1em 3em 1em 3\.4em;/);
assert.match(css, /\.notyf\s*\{[\s\S]*?position:\s*relative;[\s\S]*?font-size:\s*14px;[\s\S]*?line-height:\s*1\.42857143;[\s\S]*?min-width:\s*200px;[\s\S]*?padding:\s*1em 3em 1em 3\.4em;/);
assert.doesNotMatch(css, /\.notyf\s*\{[^}]*white-space:\s*nowrap;/);
assert.match(css, /\.notyf::before\s*\{[\s\S]*?font-family:\s*"Font Awesome 5 Free";[\s\S]*?font-weight:\s*900;[\s\S]*?line-height:\s*1;/);
assert.match(css, /rgba\(15, 147, 249, 0\.7\)[\s\S]*?rgba\(61, 189, 249, 0\.8\)/);
assert.match(css, /rgba\(58, 162, 54, 0\.8\)[\s\S]*?rgba\(89, 247, 131, 0\.8\)/);
assert.match(css, /rgba\(253, 170, 71, 0\.7\)[\s\S]*?rgba\(247, 154, 13, 0\.8\)/);