[UBER-242] Fix breadcrumbs sizing in Safari (#3262)

Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@icloud.com>
This commit is contained in:
Sergei Ogorelkov 2023-05-26 20:39:01 +04:00 committed by GitHub
parent 1ada38e652
commit 73169ff987
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 8 deletions

View File

@ -13,21 +13,18 @@
// limitations under the License.
-->
<script lang="ts">
import { resizeObserver } from '@hcengineering/ui'
export let label: string | undefined = undefined
export let title: string | undefined = undefined
export let position: 'start' | 'middle' | 'end' | undefined = undefined
export let selected = false
export let color = 'var(--body-color)'
let lenght = 0
let clientWidth = 0
$: lenght = clientWidth + 32 > 300 ? 300 : clientWidth + 32
</script>
<div
class="hidden-text text-md font-medium pointer-events-none content-pointer-events-none"
use:resizeObserver={(element) => (lenght = element.clientWidth + 32 > 300 ? 300 : element.clientWidth + 32)}
>
<div class="hidden-text text-md font-medium pointer-events-none content-pointer-events-none" bind:clientWidth>
{#if $$slots.default}
<slot />
{:else}
@ -45,6 +42,7 @@
on:click
>
<svg
style={`width: ${lenght}px;`}
class="asb-bar__back"
viewBox="0 0 {lenght} 24"
xmlns="http://www.w3.org/2000/svg"

View File

@ -327,7 +327,6 @@
width: auto;
&__back {
width: auto;
padding: 1px 0.5px;
height: calc(1.5rem + 2px);
// height: 1.5rem;