Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui5-tab): semantic icon is properly aligned in high contrast themes #10467

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,20 @@
"dev": "node packages/tools/lib/dev-server/dev-server.mjs",
"scopeStart:all": "npm-run-all --parallel watch:base scopeWatch:main scopeWatch:compat scopeWatch:ai scopeWatch:fiori dev",
"start:website": "yarn ci:releasebuild && yarn workspace @ui5/webcomponents-website start",

"start": "npm-run-all --sequential generate start:all",
"build": "yarn ci:releasebuild",
"test": "yarn wsrun --exclude-missing test",

"ci:releasebuild": "npm-run-all --sequential generate ts generateProd generateAPI",
"ci:lint": "npm-run-all --sequential generate lint",
"ci:testbuild": "npm-run-all --sequential generate ts generateProd bundle",
"ci:deploy": "DEPLOY=true yarn ci:testbuild && yarn generateAPI && yarn workspace @ui5/webcomponents-website ci:build",
"ci:deploy:nightly": "DEPLOY_NIGHTLY=true yarn ci:testbuild && yarn generateAPI && yarn workspace @ui5/webcomponents-website ci:build:nightly",

"ci:test:base": "yarn workspace @ui5/webcomponents-base test",
"ci:test:main:suite-1": "yarn workspace @ui5/webcomponents test:ssr && yarn workspace @ui5/webcomponents test:suite-1",
"ci:test:main:suite-2": "yarn workspace @ui5/webcomponents test:cypress && yarn workspace @ui5/webcomponents test:suite-2",
"ci:test:fiori": "yarn workspace @ui5/webcomponents-fiori test:ssr && yarn workspace @ui5/webcomponents-fiori test:cypress && yarn workspace @ui5/webcomponents-fiori test",
"ci:test:compat": "yarn workspace @ui5/webcomponents-compat test:ssr && yarn workspace @ui5/webcomponents-compat test",
"ci:test:ai": "yarn workspace @ui5/webcomponents-ai test:ssr && yarn workspace @ui5/webcomponents-ai test",

"lint": "wsrun --exclude-missing lint",
"lint:scope": "wsrun --exclude-missing lint:scope",
"link-all": "wsrun link",
Expand Down Expand Up @@ -98,5 +94,6 @@
"packages/tools",
"packages/website",
"packages/create-package"
]
],
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
12 changes: 6 additions & 6 deletions packages/main/src/themes/TabInOverflow.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@
display: none;
}

.ui5-tab-semantic-icon {
position: absolute;
inset-inline-start: -0.25rem;
}

.ui5-tab-overflow-item--positive:not(.ui5-tab-overflow-item--disabled) .ui5-tab-overflow-itemContent {
color: var(--_ui5_tc_overflowItem_positive_color);
}
Expand All @@ -45,9 +40,14 @@
}

.ui5-tab-overflow-itemContent-wrapper {
padding-inline-start: calc(var(--_ui5-tab-indentation-level) * 0.5rem + var(--_ui5-tab-extra-indent, 0) * var(--_ui5_tc_overflowItem_extraIndent));
padding-inline-start: calc(var(--_ui5-tab-indentation-level) * var(--_ui5-tab-indent-multiplier) + var(--_ui5-tab-extra-indent, 0) * var(--_ui5_tc_overflowItem_extraIndent));
}

.ui5-tab-overflow-item .ui5-tab-semantic-icon {
position: absolute;
inset-inline-start: -1.5rem;
}

.ui5-tab-overflow-item--selectedSubTab {
background-color: var(--sapList_SelectionBackgroundColor);
}
Expand Down
1 change: 1 addition & 0 deletions packages/main/src/themes/base/TabContainer-parameters.css
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
--_ui5_tc_overflowItem_critical_color: var(--sapCriticalColor);
--_ui5_tc_overflowItem_focus_offset: 0.125rem;
--_ui5_tc_overflowItem_extraIndent: 0rem;
--_ui5-tab-indent-multiplier: 0.5rem;

/* Header Item icons */
--_ui5_tc_headerItemIcon_border: 1px solid var(--sapHighlightColor);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@
--_ui5_tc_overflowItem_critical_color: var(--sapGroup_TitleTextColor);
--_ui5_tc_overflowItem_default_color: var(--sapGroup_TitleTextColor);
--_ui5_tc_overflowItem_current_color: var(--_ui5_tc_overflowItem_default_color);
--_ui5_tc_overflowItem_extraIndent: 1rem;
--_ui5_tc_overflowItem_extraIndent: 1.5rem;
--_ui5-tab-indent-multiplier: 1.5rem;
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@
--_ui5_tc_overflowItem_critical_color: var(--sapGroup_TitleTextColor);
--_ui5_tc_overflowItem_default_color: var(--sapGroup_TitleTextColor);
--_ui5_tc_overflowItem_current_color: var(--_ui5_tc_overflowItem_default_color);
--_ui5_tc_overflowItem_extraIndent: 1rem;
--_ui5_tc_overflowItem_extraIndent: 1.5rem;
--_ui5-tab-indent-multiplier: 1.5rem;
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
--_ui5_tc_overflowItem_critical_color: var(--sapTextColor);
--_ui5_tc_overflowItem_default_color: var(--sapTextColor);
--_ui5_tc_overflowItem_current_color: var(--_ui5_tc_overflowItem_default_color);
--_ui5_tc_overflowItem_extraIndent: 1rem;
--_ui5_tc_overflowItem_extraIndent: 1.5rem;
--_ui5-tab-indent-multiplier: 1.5rem;

/* Overflow Buttons*/
--_ui5_tc_overflow_text_color: var(--sapTextColor);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
--_ui5_tc_overflowItem_critical_color: var(--sapTextColor);
--_ui5_tc_overflowItem_default_color: var(--sapTextColor);
--_ui5_tc_overflowItem_current_color: var(--_ui5_tc_overflowItem_default_color);
--_ui5_tc_overflowItem_extraIndent: 1rem;
--_ui5_tc_overflowItem_extraIndent: 1.5rem;
--_ui5-tab-indent-multiplier: 1.5rem;

/* Overflow Buttons*/
--_ui5_tc_overflow_text_color: var(--sapTextColor);
Expand Down
26 changes: 26 additions & 0 deletions packages/main/test/pages/TabContainer.html
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,32 @@ <h2>Text only End Overflow</h2>
</ui5-tabcontainer>
</section>

<section>
<h2>Semantic States Overflow</h2>
<ui5-tabcontainer id="semanticOverflow">
<ui5-tab design="Positive" text="Home"></ui5-tab>
<ui5-tab design="Critical" text="Notifications"></ui5-tab>
<ui5-tab design="Negative" text="Settings"></ui5-tab>
<ui5-tab design="Positive" text="One"></ui5-tab>

<ui5-tab design="Critical" text="Two">
<ui5-tab design="Positive" slot="items" text="nested one"></ui5-tab>
<ui5-tab design="Positive" slot="items" text="nested two"></ui5-tab>
</ui5-tab>

<ui5-tab text="Three"></ui5-tab>
<ui5-tab design="Negative" text="Four">
<ui5-tab design="Positive" slot="items" text="four one">
<ui5-tab design="Positive" slot="items" text="4.1.1."></ui5-tab>
<ui5-tab design="Critical" slot="items" text="4.1.2."></ui5-tab>
</ui5-tab>
<ui5-tab design="Positive" slot="items" text="four two"></ui5-tab>
</ui5-tab>

<ui5-tab design="Negative" text="Five"></ui5-tab>
</ui5-tabcontainer>
</section>

<section>
<h2>Text only Start And End Overflow</h2>
<ui5-tabcontainer id="tabContainerStartAndEndOverflow" overflow-mode="StartAndEnd" collapsed>
Expand Down
Loading