Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2329 from owncloud/fix-breadcrumb-spacing
Browse files Browse the repository at this point in the history
Adjust breadcrumbs spacing
  • Loading branch information
JammingBen authored Sep 28, 2022
2 parents 5bfde3a + fea6b2f commit 9a92a96
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 24 deletions.
7 changes: 7 additions & 0 deletions changelog/unreleased/enhancement-breadcrumb-spacing
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Enhancement: Adjust breadcrumb spacing

We've adjusted some spacing in the breadcrumbs to improve the overall look.

https://github.com/owncloud/web/issues/7676
https://github.com/owncloud/web/issues/7525
https://github.com/owncloud/owncloud-design-system/pull/2329
18 changes: 8 additions & 10 deletions src/components/molecules/OcBreadcrumb/OcBreadcrumb.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
<template>
<nav :class="`oc-breadcrumb oc-breadcrumb-${variation}`">
<ol class="oc-breadcrumb-list oc-mb-s">
<li v-for="(item, index) in items" :key="index" class="oc-breadcrumb-list-item">
<ol class="oc-breadcrumb-list oc-flex">
<li
v-for="(item, index) in items"
:key="index"
class="oc-breadcrumb-list-item oc-flex oc-flex-middle"
>
<router-link v-if="item.to" :aria-current="getAriaCurrent(index)" :to="item.to">
<span>{{ item.text }}</span>
</router-link>
<oc-icon
v-if="item.to"
color="var(--oc-color-text-default)"
name="arrow-right-s"
class="oc-mx-xs"
fill-type="line"
/>
<oc-button
Expand Down Expand Up @@ -175,10 +180,7 @@ export default {
@extend .oc-p-rm;
list-style: none;
> * {
display: contents;
}
align-items: baseline;
#oc-breadcrumb-contextmenu-trigger > span {
vertical-align: middle;
Expand All @@ -196,8 +198,6 @@ export default {
> :nth-child(n + 2)::before {
color: var(--oc-color-text-default);
display: inline-block;
vertical-align: middle;
line-height: normal;
}
> :last-child > span {
Expand All @@ -219,8 +219,6 @@ export default {
font-size: var(--oc-font-size-medium);
color: var(--oc-color-text-default);
display: inline-block;
vertical-align: middle;
line-height: normal;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@

exports[`OcBreadcrumb displays all items 1`] = `
<nav class="oc-breadcrumb oc-breadcrumb-default">
<ol class="oc-breadcrumb-list oc-mb-s">
<li class="oc-breadcrumb-list-item">
<ol class="oc-breadcrumb-list oc-flex">
<li class="oc-breadcrumb-list-item oc-flex oc-flex-middle">
<router-link-stub tag="a" to="[object Object]"><span>First folder</span></router-link-stub>
<oc-icon-stub name="arrow-right-s" filltype="line" accessiblelabel="" type="span" size="medium" variation="passive" color="var(--oc-color-text-default)"></oc-icon-stub>
<oc-icon-stub name="arrow-right-s" filltype="line" accessiblelabel="" type="span" size="medium" variation="passive" color="var(--oc-color-text-default)" class="oc-mx-xs"></oc-icon-stub>
<!---->
</li>
<li class="oc-breadcrumb-list-item">
<li class="oc-breadcrumb-list-item oc-flex oc-flex-middle">
<!---->
<oc-button-stub type="button" size="medium" submit="button" variation="passive" appearance="raw" justifycontent="center" gapsize="medium"><span>Subfolder</span></oc-button-stub>
<!---->
</li>
<li class="oc-breadcrumb-list-item">
<li class="oc-breadcrumb-list-item oc-flex oc-flex-middle">
<router-link-stub tag="a" to="[object Object]"><span>Deep</span></router-link-stub>
<oc-icon-stub name="arrow-right-s" filltype="line" accessiblelabel="" type="span" size="medium" variation="passive" color="var(--oc-color-text-default)"></oc-icon-stub>
<oc-icon-stub name="arrow-right-s" filltype="line" accessiblelabel="" type="span" size="medium" variation="passive" color="var(--oc-color-text-default)" class="oc-mx-xs"></oc-icon-stub>
<!---->
</li>
<li class="oc-breadcrumb-list-item">
<li class="oc-breadcrumb-list-item oc-flex oc-flex-middle">
<!----> <span aria-current="page" tabindex="-1">Deeper ellipsize in responsive mode</span>
<!---->
</li>
Expand Down Expand Up @@ -51,23 +51,23 @@ exports[`OcBreadcrumb displays all items 1`] = `

exports[`OcBreadcrumb sets correct variation 1`] = `
<nav class="oc-breadcrumb oc-breadcrumb-lead">
<ol class="oc-breadcrumb-list oc-mb-s">
<li class="oc-breadcrumb-list-item">
<ol class="oc-breadcrumb-list oc-flex">
<li class="oc-breadcrumb-list-item oc-flex oc-flex-middle">
<router-link-stub tag="a" to="[object Object]"><span>First folder</span></router-link-stub>
<oc-icon-stub name="arrow-right-s" filltype="line" accessiblelabel="" type="span" size="medium" variation="passive" color="var(--oc-color-text-default)"></oc-icon-stub>
<oc-icon-stub name="arrow-right-s" filltype="line" accessiblelabel="" type="span" size="medium" variation="passive" color="var(--oc-color-text-default)" class="oc-mx-xs"></oc-icon-stub>
<!---->
</li>
<li class="oc-breadcrumb-list-item">
<li class="oc-breadcrumb-list-item oc-flex oc-flex-middle">
<!---->
<oc-button-stub type="button" size="medium" submit="button" variation="passive" appearance="raw" justifycontent="center" gapsize="medium"><span>Subfolder</span></oc-button-stub>
<!---->
</li>
<li class="oc-breadcrumb-list-item">
<li class="oc-breadcrumb-list-item oc-flex oc-flex-middle">
<router-link-stub tag="a" to="[object Object]"><span>Deep</span></router-link-stub>
<oc-icon-stub name="arrow-right-s" filltype="line" accessiblelabel="" type="span" size="medium" variation="passive" color="var(--oc-color-text-default)"></oc-icon-stub>
<oc-icon-stub name="arrow-right-s" filltype="line" accessiblelabel="" type="span" size="medium" variation="passive" color="var(--oc-color-text-default)" class="oc-mx-xs"></oc-icon-stub>
<!---->
</li>
<li class="oc-breadcrumb-list-item">
<li class="oc-breadcrumb-list-item oc-flex oc-flex-middle">
<!----> <span aria-current="page" tabindex="-1">Deeper ellipsize in responsive mode</span>
<!---->
</li>
Expand Down

0 comments on commit 9a92a96

Please sign in to comment.