Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2079,7 +2079,7 @@
align-items: center;
justify-content: flex-end;
gap: 0;
padding-right: 3px;
padding-right: 4px;
opacity: 0;
visibility: hidden;
pointer-events: none;
Expand Down Expand Up @@ -2117,21 +2117,22 @@

.sql-tab-actions-portal .ui-button.sql-tab-inline-action:hover {
border: 0;
background: color-mix(in srgb, var(--danger) 12%, var(--input-bg));
background: transparent;
color: var(--danger);
box-shadow: none;
}

.sql-tab-actions-portal .ui-button.sql-tab-inline-rename:hover {
background: color-mix(in srgb, var(--info) 10%, var(--input-bg));
background: transparent;
color: var(--foreground);
}

.sql-tab-actions-portal .ui-button.sql-tab-inline-action:focus-visible {
border: 0;
outline: none;
background: color-mix(in srgb, var(--ring) 10%, var(--input-bg));
box-shadow: inset 0 0 0 2px var(--ring);
outline: 2px solid var(--ring);
outline-offset: 1px;
background: transparent;
box-shadow: none;
}

.sql-tab-header-action {
Expand Down
33 changes: 33 additions & 0 deletions scripts/validate-browser-quality.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,39 @@ try {
const closeTabAction = page.locator(".sql-tab-actions-portal.active [data-tab-close-id]");
const renameTabAction = page.locator(".sql-tab-actions-portal.active [data-tab-rename-id]");
const closeAllTabsAction = page.locator("#closeAllTabsBtn");
const tabActionTarget = await closeTabAction.evaluate(element => {
const targetRect = element.getBoundingClientRect();
return {
targetWidth: Math.round(targetRect.width),
targetHeight: Math.round(targetRect.height)
};
});
assert(
tabActionTarget?.targetWidth === 26 && tabActionTarget.targetHeight === 26,
`${locale.tag}/${viewport.name}: inline close target is not 26 by 26 CSS pixels (${JSON.stringify(tabActionTarget)}).`
);
await closeTabAction.hover();
const closeHoverFeedback = await closeTabAction.evaluate(element => {
const resolveColor = (value) => {
const probe = document.createElement("span");
probe.style.color = value;
document.body.appendChild(probe);
const resolved = getComputedStyle(probe).color;
probe.remove();
return resolved;
};
const styles = getComputedStyle(element);
return {
backgroundColor: styles.backgroundColor,
color: styles.color,
expectedDanger: resolveColor(getComputedStyle(document.documentElement).getPropertyValue("--danger"))
};
});
assert(
closeHoverFeedback.backgroundColor === "rgba(0, 0, 0, 0)"
&& closeHoverFeedback.color === closeHoverFeedback.expectedDanger,
`${locale.tag}/${viewport.name}: close hover must keep a transparent hit target and color only the X (${JSON.stringify(closeHoverFeedback)}).`
);
const newTabPlacement = await page.locator("#newSqlTabBtn").evaluate(element => {
const lastTabItem = document.querySelector("#sqlTabs .sql-tab-item:last-child");
if (!lastTabItem) return null;
Expand Down
13 changes: 7 additions & 6 deletions src/styles/03-components.css
Original file line number Diff line number Diff line change
Expand Up @@ -1625,7 +1625,7 @@ display: inline-flex;
align-items: center;
justify-content: flex-end;
gap: 0;
padding-right: 3px;
padding-right: 4px;
opacity: 0;
visibility: hidden;
pointer-events: none;
Expand Down Expand Up @@ -1663,21 +1663,22 @@ width: 26px;

.sql-tab-actions-portal .ui-button.sql-tab-inline-action:hover {
border: 0;
background: color-mix(in srgb, var(--danger) 12%, var(--input-bg));
background: transparent;
color: var(--danger);
box-shadow: none;
}

.sql-tab-actions-portal .ui-button.sql-tab-inline-rename:hover {
background: color-mix(in srgb, var(--info) 10%, var(--input-bg));
background: transparent;
color: var(--foreground);
}

.sql-tab-actions-portal .ui-button.sql-tab-inline-action:focus-visible {
border: 0;
outline: none;
background: color-mix(in srgb, var(--ring) 10%, var(--input-bg));
box-shadow: inset 0 0 0 2px var(--ring);
outline: 2px solid var(--ring);
outline-offset: 1px;
background: transparent;
box-shadow: none;
}

.sql-tab-header-action {
Expand Down