mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-15 12:55:59 +00:00
[UBER-242] Fix breadcrumbs sizing in Safari (#3262)
Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@icloud.com>
This commit is contained in:
parent
1ada38e652
commit
73169ff987
@ -13,21 +13,18 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
-->
|
-->
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { resizeObserver } from '@hcengineering/ui'
|
|
||||||
|
|
||||||
export let label: string | undefined = undefined
|
export let label: string | undefined = undefined
|
||||||
export let title: string | undefined = undefined
|
export let title: string | undefined = undefined
|
||||||
export let position: 'start' | 'middle' | 'end' | undefined = undefined
|
export let position: 'start' | 'middle' | 'end' | undefined = undefined
|
||||||
export let selected = false
|
export let selected = false
|
||||||
export let color = 'var(--body-color)'
|
export let color = 'var(--body-color)'
|
||||||
|
|
||||||
let lenght = 0
|
let clientWidth = 0
|
||||||
|
|
||||||
|
$: lenght = clientWidth + 32 > 300 ? 300 : clientWidth + 32
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div
|
<div class="hidden-text text-md font-medium pointer-events-none content-pointer-events-none" bind:clientWidth>
|
||||||
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)}
|
|
||||||
>
|
|
||||||
{#if $$slots.default}
|
{#if $$slots.default}
|
||||||
<slot />
|
<slot />
|
||||||
{:else}
|
{:else}
|
||||||
@ -45,6 +42,7 @@
|
|||||||
on:click
|
on:click
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
|
style={`width: ${lenght}px;`}
|
||||||
class="asb-bar__back"
|
class="asb-bar__back"
|
||||||
viewBox="0 0 {lenght} 24"
|
viewBox="0 0 {lenght} 24"
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
@ -327,7 +327,6 @@
|
|||||||
width: auto;
|
width: auto;
|
||||||
|
|
||||||
&__back {
|
&__back {
|
||||||
width: auto;
|
|
||||||
padding: 1px 0.5px;
|
padding: 1px 0.5px;
|
||||||
height: calc(1.5rem + 2px);
|
height: calc(1.5rem + 2px);
|
||||||
// height: 1.5rem;
|
// height: 1.5rem;
|
||||||
|
Loading…
Reference in New Issue
Block a user