diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/typography.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/typography.cljs index c188fcfd55..4b970dd1cb 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/typography.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/typography.cljs @@ -191,8 +191,10 @@ #(let [offset (.getOffsetForRow ^js inst #js {:alignment "center" :index index})] (.scrollToPosition ^js inst offset))))) - [:div {:class (stl/css :font-selector)} - [:div {:class (stl/css-case :font-selector-dropdown true :font-selector-dropdown-full-size full-size?)} + [:div {:class [(stl/css-case :font-selector true + :fonts-on-modal (not full-size?))]} + [:div {:class (stl/css-case :font-selector-dropdown true + :font-selector-dropdown-full-size full-size?)} [:div {:class (stl/css :header)} [:> search-bar* {:on-change on-filter-change :value (:term state) @@ -313,6 +315,7 @@ :on-close on-font-selector-close :on-select on-font-select :full-size full-size-selector + :origin "right-sidebar" :show-recent show-recent}]) [:div {:class (stl/css :font-option) diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/typography.scss b/frontend/src/app/main/ui/workspace/sidebar/options/menus/typography.scss index 1bbb057ad4..b12d3cd835 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/typography.scss +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/typography.scss @@ -332,6 +332,10 @@ z-index: var(--z-index-dropdown); } +.fonts-on-modal { + top: 0; +} + .show-recent { border-radius: $br-8 $br-8 0 0; background: var(--color-background-tertiary); diff --git a/frontend/src/app/main/ui/workspace/tokens/management/forms/controls/fonts_combobox.cljs b/frontend/src/app/main/ui/workspace/tokens/management/forms/controls/fonts_combobox.cljs index a0eabbdeba..e0bf1bb221 100644 --- a/frontend/src/app/main/ui/workspace/tokens/management/forms/controls/fonts_combobox.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/management/forms/controls/fonts_combobox.cljs @@ -198,8 +198,7 @@ [:div {:class (stl/css :font-select-wrapper)} [:> font-selector* {:current-font font :on-select on-select-font - :on-close on-close-font-selector - :full-size true}]])])) + :on-close on-close-font-selector}]])])) (defn- on-composite-combobox-token-change ([form field value] @@ -336,8 +335,7 @@ [:* [:> input* props] (when font-selector-open? - [:div {:class (stl/css :font-select-wrapper)} + [:div {:class (stl/css :font-select-wrapper-composite)} [:> font-selector* {:current-font font :on-select on-select-font - :on-close on-close-font-selector - :full-size true}]])])) \ No newline at end of file + :on-close on-close-font-selector}]])])) \ No newline at end of file diff --git a/frontend/src/app/main/ui/workspace/tokens/management/forms/controls/fonts_combobox.scss b/frontend/src/app/main/ui/workspace/tokens/management/forms/controls/fonts_combobox.scss index d1d415eff4..c1d132758c 100644 --- a/frontend/src/app/main/ui/workspace/tokens/management/forms/controls/fonts_combobox.scss +++ b/frontend/src/app/main/ui/workspace/tokens/management/forms/controls/fonts_combobox.scss @@ -6,9 +6,14 @@ @use "ds/_utils.scss" as *; -.font-select-wrapper { +.font-select-wrapper, +.font-select-wrapper-composite { position: absolute; width: 100%; height: px2rem(115); top: px2rem(54); } + +.font-select-wrapper-composite { + top: px2rem(36); +}