Analyse: Banner-Knoepfe gleich breit
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2ca18f9c65
commit
7ead59ff73
4 files changed
+9
-3
No files matched your search
Vendored
+1
-1
@@ -276,7 +276,7 @@ function main() {
|
|||||||
'.t{margin:0;max-width:720px}' +
|
'.t{margin:0;max-width:720px}' +
|
||||||
'.t a{color:#111;text-decoration:underline}' +
|
'.t a{color:#111;text-decoration:underline}' +
|
||||||
'.r{display:flex;gap:10px;flex:none}' +
|
'.r{display:flex;gap:10px;flex:none}' +
|
||||||
'button{font:600 15px/1 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;min-width:120px;height:44px;padding:0 20px;border:2px solid ' + accent + ';border-radius:8px;cursor:pointer;background:' + accent + ';color:#fff}' +
|
'button{font:600 15px/1 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;width:150px;height:44px;padding:0 20px;border:2px solid ' + accent + ';border-radius:8px;cursor:pointer;background:' + accent + ';color:#fff}' +
|
||||||
'button:focus-visible{outline:3px solid #1a73e8;outline-offset:2px}' +
|
'button:focus-visible{outline:3px solid #1a73e8;outline-offset:2px}' +
|
||||||
'@media (max-width:767px){.bar{display:block;margin:8px;padding:16px;border:1px solid #d0d0d0;border-radius:12px}.r{flex-direction:column;margin-top:12px}button{width:100%}}';
|
'@media (max-width:767px){.bar{display:block;margin:8px;padding:16px;border:1px solid #d0d0d0;border-radius:12px}.r{flex-direction:column;margin-top:12px}button{width:100%}}';
|
||||||
|
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ function main() {
|
|||||||
'.t{margin:0;max-width:720px}' +
|
'.t{margin:0;max-width:720px}' +
|
||||||
'.t a{color:#111;text-decoration:underline}' +
|
'.t a{color:#111;text-decoration:underline}' +
|
||||||
'.r{display:flex;gap:10px;flex:none}' +
|
'.r{display:flex;gap:10px;flex:none}' +
|
||||||
'button{font:600 15px/1 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;min-width:120px;height:44px;padding:0 20px;border:2px solid ' + accent + ';border-radius:8px;cursor:pointer;background:' + accent + ';color:#fff}' +
|
'button{font:600 15px/1 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;width:150px;height:44px;padding:0 20px;border:2px solid ' + accent + ';border-radius:8px;cursor:pointer;background:' + accent + ';color:#fff}' +
|
||||||
'button:focus-visible{outline:3px solid #1a73e8;outline-offset:2px}' +
|
'button:focus-visible{outline:3px solid #1a73e8;outline-offset:2px}' +
|
||||||
'@media (max-width:767px){.bar{display:block;margin:8px;padding:16px;border:1px solid #d0d0d0;border-radius:12px}.r{flex-direction:column;margin-top:12px}button{width:100%}}';
|
'@media (max-width:767px){.bar{display:block;margin:8px;padding:16px;border:1px solid #d0d0d0;border-radius:12px}.r{flex-direction:column;margin-top:12px}button{width:100%}}';
|
||||||
|
|
||||||
|
|||||||
@@ -242,6 +242,12 @@ test('w.js: Banner-Aufbau (Dialog, Texte, gleiche Buttons, Akzent nur Annehmen)'
|
|||||||
assert.equal(buttons[0].attrs.class, buttons[1].attrs.class);
|
assert.equal(buttons[0].attrs.class, buttons[1].attrs.class);
|
||||||
assert.ok(!/button\.|\.p\b/.test(css), 'eine Regel fuer beide Buttons');
|
assert.ok(!/button\.|\.p\b/.test(css), 'eine Regel fuer beide Buttons');
|
||||||
assert.match(css, /button\{[^}]*background:#0a5a8a[^}]*color:#fff/);
|
assert.match(css, /button\{[^}]*background:#0a5a8a[^}]*color:#fff/);
|
||||||
|
assert.match(css, /button\{[^}]*[; ]width:150px/);
|
||||||
|
assert.equal((css.match(/(?<![-\w])width:/g) || []).length, 2, 'eine feste Breite fuer beide + 100% mobil');
|
||||||
|
assert.ok(!/min-width/.test(css));
|
||||||
|
const portal = readFileSync(join(dirname(fileURLToPath(import.meta.url)), '..', '..', 'public', 'funktionen.css'), 'utf8');
|
||||||
|
assert.match(portal, /\.an-bn-btn \{[^}]*[; ]width: 150px/);
|
||||||
|
assert.equal((portal.match(/\.an-bn-btn[^{]*\{/g) || []).length, 2, 'Basisregel + mobile Regel');
|
||||||
assert.equal(host.style.zIndex, '2147483647');
|
assert.equal(host.style.zIndex, '2147483647');
|
||||||
// Escape schliesst nicht
|
// Escape schliesst nicht
|
||||||
fire(dlg, 'keydown', { key: 'Escape' }); fire(host, 'keydown', { key: 'Escape' });
|
fire(dlg, 'keydown', { key: 'Escape' }); fire(host, 'keydown', { key: 'Escape' });
|
||||||
|
|||||||
@@ -155,7 +155,7 @@
|
|||||||
.an-bn-text { flex: 1 1 260px; min-width: 0; margin: 0 !important; color: #111 !important; font-size: 15px !important; line-height: 1.45 !important; }
|
.an-bn-text { flex: 1 1 260px; min-width: 0; margin: 0 !important; color: #111 !important; font-size: 15px !important; line-height: 1.45 !important; }
|
||||||
.an-bn-link { text-decoration: underline; }
|
.an-bn-link { text-decoration: underline; }
|
||||||
.an-bn-row { display: flex; gap: 10px; flex: none; }
|
.an-bn-row { display: flex; gap: 10px; flex: none; }
|
||||||
.an-bn-btn { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-width: 120px; height: 44px; padding: 0 20px; border: 2px solid; border-radius: 8px; font: 600 15px/1 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
|
.an-bn-btn { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 150px; height: 44px; padding: 0 20px; border: 2px solid; border-radius: 8px; font: 600 15px/1 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
|
||||||
|
|
||||||
.an-range { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
|
.an-range { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
|
||||||
.an-tab { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--kb-border-strong); background: transparent; color: inherit; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
|
.an-tab { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--kb-border-strong); background: transparent; color: inherit; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
|
||||||
|
|||||||
Reference in new issue
Block a user