diff --git a/libs/search-widget/src/Widget.scss b/libs/search-widget/src/Widget.scss index dfbe0173b..c7c7124fd 100644 --- a/libs/search-widget/src/Widget.scss +++ b/libs/search-widget/src/Widget.scss @@ -1,6 +1 @@ @import "common-style"; - -:global(mark) { - background-color: inherit; - font-weight: var(--font-weight-semi-bold); -} diff --git a/libs/search-widget/src/Widget.svelte b/libs/search-widget/src/Widget.svelte index 4a73b94fe..83e5f4a91 100644 --- a/libs/search-widget/src/Widget.svelte +++ b/libs/search-widget/src/Widget.svelte @@ -20,6 +20,7 @@ import type { KBStates, Resource } from '@nuclia/core'; import { Observable } from 'rxjs'; import { setupSuggestionsAndPredictions, setupTriggerSearch } from './core/search-bar'; + import globalCss from './_video-widget/_global.scss'; export let backend = 'https://nuclia.cloud/api'; export let widgetid = ''; @@ -126,6 +127,8 @@ }; +{@html globalCss} +
{#if ready} {#if type === 'input'} diff --git a/libs/search-widget/src/_video-widget/SearchBar.svelte b/libs/search-widget/src/_video-widget/SearchBar.svelte index 7771f2ecc..1178be37b 100644 --- a/libs/search-widget/src/_video-widget/SearchBar.svelte +++ b/libs/search-widget/src/_video-widget/SearchBar.svelte @@ -9,6 +9,7 @@ import { setLang } from '../core/i18n'; import SearchInput from '../widgets/search-input/SearchInput.svelte'; import { setupTriggerSearch } from '../core/search-bar'; + import globalCss from './_global.scss'; export let backend = 'https://nuclia.cloud/api'; export let widgetid = ''; @@ -68,6 +69,7 @@ }); +{@html globalCss}
{#if ready} diff --git a/libs/search-widget/src/_video-widget/SearchResults.scss b/libs/search-widget/src/_video-widget/SearchResults.scss index 22ce28084..1706808f6 100644 --- a/libs/search-widget/src/_video-widget/SearchResults.scss +++ b/libs/search-widget/src/_video-widget/SearchResults.scss @@ -13,14 +13,3 @@ flex-direction: column; gap: var(--rhythm-3); } - -:global(mark) { - background-color: inherit; - font-weight: var(--font-weight-semi-bold); -} - -:global(.ellipsis) { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} diff --git a/libs/search-widget/src/_video-widget/SearchResults.svelte b/libs/search-widget/src/_video-widget/SearchResults.svelte index 6c63ac96f..0c3789b9c 100644 --- a/libs/search-widget/src/_video-widget/SearchResults.svelte +++ b/libs/search-widget/src/_video-widget/SearchResults.svelte @@ -8,6 +8,7 @@ import { _ } from '../core/i18n'; import LoadingDots from '../components/spinner/LoadingDots.svelte'; import VideoTile from './VideoTile.svelte'; + import globalCss from './_global.scss'; const showResults = nucliaStore().triggerSearch.pipe(map(() => true)); const results = nucliaState().results; @@ -43,6 +44,7 @@ }); +{@html globalCss}
{#if $showResults} {#if $hasSearchError} diff --git a/libs/search-widget/src/_video-widget/_global.scss b/libs/search-widget/src/_video-widget/_global.scss new file mode 100644 index 000000000..a613a9313 --- /dev/null +++ b/libs/search-widget/src/_video-widget/_global.scss @@ -0,0 +1,10 @@ +mark { + background-color: inherit; + font-weight: var(--font-weight-semi-bold); +} + +.ellipsis { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +}