Skip to content

Commit

Permalink
fix(ui5-breadcrumbs): remove text-decoration from separator (#4568)
Browse files Browse the repository at this point in the history
Remove underline text decoration shown on mouse hover from separator.
  • Loading branch information
hardl authored Jan 18, 2022
1 parent f872c45 commit ed87ba5
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 103 deletions.
5 changes: 3 additions & 2 deletions packages/main/src/Breadcrumbs.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@keydown="{{_onkeydown}}"
@keyup="{{_onkeyup}}">

<li class="ui5-breadcrumbs-dropdown-arrow-link-wrapper"
<li class="ui5-breadcrumbs-dropdown-arrow-link-wrapper"
?hidden="{{_isOverflowEmpty}}">
<ui5-link @click="{{_openRespPopover}}"
accessible-role="button"
Expand All @@ -16,7 +16,8 @@
</li>

{{#each _linksData}}
<li class="ui5-breadcrumbs-link-wrapper" @click="{{../_onLinkPress}}">
<li class="ui5-breadcrumbs-link-wrapper" @click="{{../_onLinkPress}}"
id="{{this._id}}-link-wrapper">
<ui5-link
href="{{this.href}}"
target="{{this.target}}"
Expand Down
6 changes: 4 additions & 2 deletions packages/main/src/Breadcrumbs.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ class Breadcrumbs extends UI5Element {

for (let i = this._overflowSize; i < items.length; i++) {
const item = items[i],
link = this.shadowRoot.querySelector(`.ui5-breadcrumbs-link-wrapper #${item._id}-link`);
link = this.shadowRoot.querySelector(`#${item._id}-link-wrapper`);
map.set(item, this._getElementWidth(link) || 0);
}

Expand All @@ -324,7 +324,9 @@ class Breadcrumbs extends UI5Element {
}

if (!this._isOverflowEmpty) {
this._dropdownArrowLinkWidth = this._getElementWidth(this._dropdownArrowLink);
this._dropdownArrowLinkWidth = this._getElementWidth(
this.shadowRoot.querySelector(".ui5-breadcrumbs-dropdown-arrow-link-wrapper"),
);
}
}

Expand Down
199 changes: 100 additions & 99 deletions packages/main/src/themes/Breadcrumbs.css
Original file line number Diff line number Diff line change
@@ -1,99 +1,100 @@
.ui5-breadcrumbs-root {
white-space: nowrap;
outline: none;
margin: 0 0 0.5rem 0;
}

.ui5-breadcrumbs-root > ol {
margin: 0;
padding: 0;
list-style-type: none;
display: -webkit-box;
display: -webkit-flex;
display: flex;
}

.ui5-breadcrumbs-root > ol > li {
display: inline;
}

.ui5-breadcrumbs-current-location {
min-width: 1%;
-webkit-flex: 1;
-webkit-box-flex: 1;
flex: 1 1 auto;
}

.ui5-breadcrumbs-current-location > span:focus {
outline-offset: -1px;
outline: 1px dotted var(--sapContent_FocusColor);
}

.ui5-breadcrumbs-dropdown-arrow-link-wrapper[hidden] {
display: none
}

.ui5-breadcrumbs-dropdown-arrow-link-wrapper [ui5-icon] {
width: var(--sapFontSize);
height: var(--sapFontSize);
padding-left: .675rem;
vertical-align: text-top;
color: var(--sapLinkColor);
}

.ui5-breadcrumbs-dropdown-arrow-link-wrapper [ui5-icon]::before {
content: "...";
vertical-align: middle;
position: absolute;
left: 0;
bottom: 0;
}

/* underline icon on hover */
.ui5-breadcrumbs-dropdown-arrow-link-wrapper [ui5-link][focused] [ui5-icon]::after,
.ui5-breadcrumbs-dropdown-arrow-link-wrapper:hover [ui5-icon]::after {
content: "";
position: absolute;
border-bottom: 0.0625rem solid;
top: 0;
left: 0;
bottom: 1px;
right: 0;
}

/* links separator */
[ui5-link]::after {
content: "/"; /* default separator is "Slash" */
padding: 0 .25rem;
cursor: auto;
color: var(--sapContent_LabelColor);
display: flex;
align-items: flex-end;
}

.ui5-breadcrumbs-popover-footer {
display: flex;
justify-content: flex-end;
width: 100%;
}

/* separator styles */
:host([separator-style="BackSlash"]) [ui5-link]::after {
content: "\\";
}

:host([separator-style="DoubleBackSlash"]) [ui5-link]::after {
content: "\\\\";
}

:host([separator-style="DoubleGreaterThan"]) [ui5-link]::after {
content: ">>";
}

:host([separator-style="DoubleSlash"]) [ui5-link]::after {
content: "//";
}

:host([separator-style="GreaterThan"]) [ui5-link]::after {
content: ">";
}
.ui5-breadcrumbs-root {
white-space: nowrap;
outline: none;
margin: 0 0 0.5rem 0;
}

.ui5-breadcrumbs-root > ol {
margin: 0;
padding: 0;
list-style-type: none;
display: -webkit-box;
display: -webkit-flex;
display: flex;
}

.ui5-breadcrumbs-root > ol > li {
display: inline;
}

.ui5-breadcrumbs-current-location {
min-width: 1%;
-webkit-flex: 1;
-webkit-box-flex: 1;
flex: 1 1 auto;
}

.ui5-breadcrumbs-current-location > span:focus {
outline-offset: -1px;
outline: 1px dotted var(--sapContent_FocusColor);
}

.ui5-breadcrumbs-dropdown-arrow-link-wrapper[hidden] {
display: none
}

.ui5-breadcrumbs-dropdown-arrow-link-wrapper [ui5-icon] {
width: var(--sapFontSize);
height: var(--sapFontSize);
padding-left: .675rem;
vertical-align: text-top;
color: var(--sapLinkColor);
}

.ui5-breadcrumbs-dropdown-arrow-link-wrapper [ui5-icon]::before {
content: "...";
vertical-align: middle;
position: absolute;
left: 0;
bottom: 0;
}

/* underline icon on hover */
.ui5-breadcrumbs-dropdown-arrow-link-wrapper [ui5-link][focused] [ui5-icon]::after,
.ui5-breadcrumbs-dropdown-arrow-link-wrapper:hover [ui5-icon]::after {
content: "";
position: absolute;
border-bottom: 0.0625rem solid;
top: 0;
left: 0;
bottom: 1px;
right: 0;
}

/* links separator */
li:not(.ui5-breadcrumbs-current-location)::after {
content: "/"; /* default separator is "Slash" */
padding: 0 .25rem;
cursor: auto;
color: var(--sapContent_LabelColor);
display: inline-block;
font-family: "72override",var(--sapFontFamily);
font-size: var(--sapFontSize);
}

.ui5-breadcrumbs-popover-footer {
display: flex;
justify-content: flex-end;
width: 100%;
}

/* separator styles */
:host([separator-style="BackSlash"]) li:not(.ui5-breadcrumbs-current-location)::after {
content: "\\";
}

:host([separator-style="DoubleBackSlash"]) li:not(.ui5-breadcrumbs-current-location)::after {
content: "\\\\";
}

:host([separator-style="DoubleGreaterThan"]) li:not(.ui5-breadcrumbs-current-location)::after {
content: ">>";
}

:host([separator-style="DoubleSlash"]) li:not(.ui5-breadcrumbs-current-location)::after {
content: "//";
}

:host([separator-style="GreaterThan"]) li:not(.ui5-breadcrumbs-current-location)::after {
content: ">";
}

0 comments on commit ed87ba5

Please sign in to comment.