General
mixins
BreadCrumbs
@mixin BreadCrumbs() { ... }
Description
BreadCrumbs is the trail of links that shows the user where they are in the site hierarchy and allows them to go back up the tree. Often BreadCrumbs are located at the top of the page.
Parameters
None.
Requires
- [function]
get-text-icon-color
- [function]
get-background-color
- [function]
get-border-color
- [function]
get-text-icon-color
- [function]
get-text-icon-color
HighlightedText
@mixin HighlightedText($entries-without-highlight: ("color": variables.$brand-dark-grey, "font-weight": 400), $entries-with-highlight: (
"highlighted-part": (
"color": variables.$brand-dark-grey,
"font-weight": 500
),
"toned-down-part": (
"color": variables.$brand-dark-grey,
"font-weight": 400
)
)) { ... }
Description
This styling is applied to the matches in the SearchModal and matches in the filters when searching for a specific filter Only the "entries-with-highlight" styling applies to the filters though
Explanation of "entries without highlight" and "entries with highlight"
When the user is typing in the input field, we show query and category suggestions from the API and suggestions from the previous searches of the user (which are saved in localStorage). While the user is typing, we highlight the new parts of the query that we are suggesting (what the user hasn't typed). This only happens if the suggestion contains the query the user has typed.
The most flexible yet simple way we could come up with to style this is by breaking it down as follows: Note: "entry" refers to a suggestion from the API or a previous search.
- Entries without highlight:
This is the styling for the entries where nothing is highlighted. This is the case when the user hasn't typed anything yet, or when the suggestion doesn't contain the query the user has typed. - Entries with highlight:
Something is highlighted in this suggestion. This is the case when the user has typed something and the suggestion contains the query the user has typed. There are two things you can style here:- Highlighted part:
The styling for the highlighted part of the suggestion. - Toned down part:
The styling for the part of the suggestion that is not highlighted. This is the part of the suggestion that the user has already typed.
- Highlighted part:
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$entries-without-highlight | Map between any CSS property key to CSS value. The styling for the entries where nothing is highlighted, see the explanation above. | Map | ("color": variables.$brand-dark-grey, "font-weight": 400) |
$entries-with-highlight | Map containing either "toned-down-part" which is a map and/or "highlighted-part" which is also a map. Both of the aforementioned maps can contain any CSS property key to CSS value. See the explanation above in the | Map | ( "highlighted-part": ( "color": variables.$brand-dark-grey, "font-weight": 500 ), "toned-down-part": ( "color": variables.$brand-dark-grey, "font-weight": 400 ) ) |
Example
Simple example adding a custom font for the highlighted part of the suggestions
@include search.Autocomplete(
$entries-with-highlight: (
"highlighted-part": (
"font-family": "Gotham Medium",
),
)
);
Example if having bold text doesn't fit your brand and you instead want to make what the user typed "light" but keep the rest "regular":
@include search.Autocomplete(
$entries-without-highlight: (
"font-weight": 400
),
$entries-with-highlight: (
"highlighted-part": (
"font-weight": 400
),
"toned-down-part": (
"font-weight": 300
)
)
);
Requires
- [function]
get-text-icon-color
- [function]
get-font-weight
- [function]
get-text-icon-color
- [function]
get-font-weight
- [function]
get-text-icon-color
- [function]
get-font-weight
- [function]
get-text-icon-color
- [function]
get-text-icon-color
PLPResults
@mixin PLPResults() { ... }
Description
Base styling (PLP) that applies to both category and search pages for the PLPResults component, the component which holds the product cards. Another part of this styling is in the ProductListingPage mixin, which takes care about the overall layout of the page (which mostly means margins and paddings).
Parameters
None.
Requires
- [function]
get-text-icon-color
- [function]
get-font-weight
- [variable]
page-background-color
ProductListingPage
@mixin ProductListingPage() { ... }
Description
Styling that ties together the different components that are common to both Category and Search pages. Mainly takes care of margins and paddings but also sets the styling for .cards which is in both PLPResults and SearchRecommendations.
Note that for the gaps not the exact values will always be used but often multiples for different places where it's appropriate.
Parameters
None.
Requires
- [mixin]
mobile_sizes
- [mixin]
mobile_sizes
- [mixin]
mobile_sizes
- [mixin]
mobile_sizes
- [function]
get-gap
- [function]
get-gap
- [function]
get-gap
SearchPage
@mixin SearchPage() { ... }
Description
Styling that ties together the different components on the SearchPage. Mainly takes care of margins and paddings.
Note that for the gaps not the exact values will always be used but often multiples for different places where it's appropriate.
Parameters
None.
Requires
- [mixin]
mobile_sizes
- [mixin]
mobile_sizes
- [mixin]
mobile_sizes
- [mixin]
mobile_sizes
- [mixin]
mobile_sizes
- [function]
get-gap
- [function]
get-gap
- [function]
get-gap
- [function]
get-gap
- [function]
get-gap
- [function]
get-merged
- [variable]
search-modal-layout
- [variable]
search-modal
CategoryPage
@mixin CategoryPage() { ... }
Description
Styling that ties together the different components on the CategoryPage. Mainly takes care of margins and paddings.
Parameters
None.
Requires
- [mixin]
mobile_sizes
- [function]
get-gap
- [function]
get-gap
mobile_sizes
@mixin mobile_sizes() { ... }
Description
Internal mixin that dictates when the vertical spaces should switch to the "mobile" versions
Parameters
None.
Used by
- [mixin]
ProductListingPage
- [mixin]
ProductListingPage
- [mixin]
ProductListingPage
- [mixin]
ProductListingPage
- [mixin]
SearchPage
- [mixin]
SearchPage
- [mixin]
SearchPage
- [mixin]
SearchPage
- [mixin]
SearchPage
- [mixin]
CategoryPage
ScrollStatus
@mixin ScrollStatus($border-radius: variables.$border-radius * 5) { ... }
Description
ScrollStatus shows the user how many items are left to scroll through, if they scroll at a speed that indicates that they are no longer looking at each product but rather just trying to see how many there are.
If you too think that blurring the background would look great here, please take a minute to upvote this chrome bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1382360
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$border-radius | The border-radius of the scroll status. | Number with size unit | variables.$border-radius * 5 |
Requires
- [function]
get-background-color
- [function]
get-text-icon-color
- [variable]
base-z-index
- [variable]
border-radius
SelectedFilters
@mixin SelectedFilters() { ... }
Description
Mixin that styles the SelectedFilters component, which is the component that shows the selected filters if both the sorting and filtering menus are currently hidden.
Parameters
None.
Requires
- [function]
get-gap
- [function]
get-gap
- [function]
get-text-icon-color
- [function]
get-primary-button-properties
- [function]
get-secondary-button-properties
- [variable]
uppercase-text-transform
- [variable]
border-radius
FloatingButtons
@mixin FloatingButtons() { ... }
Description
Styles the FloatingButtons. FloatingButtons are three buttons, one button to open sorting, one button to open filters and one button to scroll to the top that show up when scrolling upwards for a while on a mobile device not really close to the top of the page.
Parameters
None.
Requires
- [function]
get-merged
- [function]
get-merged
- [function]
get-merged
- [function]
get-background-color
- [function]
get-border-color
- [function]
get-background-color
- [function]
get-background-color
- [function]
get-text-icon-color
- [variable]
floating-buttons
- [variable]
base-z-index
- [variable]
floating-buttons
- [variable]
floating-buttons
- [variable]
border-radius
SortAndFilter
@mixin SortAndFilter() { ... }
Description
Mixin that styles the sorting and filtering menus.
Parameters
None.
Requires
- [function]
get-merged
- [function]
get-merged
- [function]
get-background-color
- [function]
get-text-icon-color
- [function]
get-text-icon-color
- [function]
get-font-weight
- [function]
get-text-icon-color
- [function]
get-font-weight
- [function]
get-text-icon-color
- [function]
get-text-icon-color
- [function]
get-font-weight
- [function]
get-text-icon-color
- [function]
get-text-icon-color
- [function]
get-text-icon-color
- [function]
get-text-icon-color
- [function]
get-font-weight
- [function]
get-border-color
- [function]
get-background-color
- [function]
get-background-color
- [function]
get-background-color
- [function]
get-text-icon-color
- [function]
get-border-color
- [function]
get-font-weight
- [function]
get-border-color
- [function]
get-text-icon-color
- [function]
get-text-icon-color
- [function]
highlight-color
- [function]
get-text-icon-color
- [function]
get-text-icon-color
- [function]
get-secondary-button-properties
- [function]
get-secondary-button-properties
- [function]
get-border-color
- [function]
get-border-color
- [function]
get-border-color
- [function]
get-text-icon-color
- [function]
get-text-icon-color
- [function]
get-text-icon-color
- [function]
get-text-icon-color
- [function]
get-border-color
- [function]
get-background-color
- [function]
get-text-icon-color
- [function]
get-background-color
- [function]
get-background-color
- [function]
get-text-icon-color
- [function]
get-background-color
- [function]
get-background-color
- [function]
get-background-color
- [function]
get-background-color
- [function]
get-background-color
- [function]
get-background-color
- [function]
get-background-color
- [function]
get-background-color
- [function]
get-text-icon-color
- [function]
get-background-color
- [function]
get-text-icon-color
- [function]
get-background-color
- [function]
get-text-icon-color
- [function]
get-background-color
- [function]
get-background-color
- [function]
get-background-color
- [function]
get-border-color
- [function]
get-text-icon-color
- [function]
get-text-icon-color
- [function]
get-text-icon-color
- [function]
get-text-icon-color
- [function]
get-border-color
- [function]
get-text-icon-color
- [function]
get-border-color
- [function]
get-border-color
- [function]
get-text-icon-color
- [variable]
filters-configuration
- [variable]
filters-configuration
- [variable]
search-page-base-z-index
- [variable]
uppercase-text-transform
- [variable]
uppercase-text-transform
- [variable]
border-radius
SortAndFilterModal
@mixin SortAndFilterModal() { ... }
Description
Mobile modal - taking arguments from SortAndFilter mixin so see SortAndFilter docs for more info
Parameters
None.
Requires
- [function]
get-merged
- [function]
get-merged
- [function]
get-text-icon-color
- [function]
get-merged
- [function]
get-background-color
- [function]
get-text-icon-color
- [variable]
font-weights
- [variable]
font-weights
- [variable]
filters-configuration
- [variable]
base-z-index
- [variable]
base-z-index
- [variable]
base-z-index
- [variable]
border-radius
- [variable]
border-radius
Toast
@mixin Toast() { ... }
Description
Toast is a small, unobtrusive, banner that appears at the bottom of the page when we clear their filters when going sideways in the category tree (or they do it manually). The Toast has a button that allows them to get their filters back (restore them) in case they want it back. It's a general component otherwise and might also be used for other messages.
Parameters
None.
Requires
- [function]
get-background-color
- [function]
get-text-icon-color
- [variable]
base-z-index
- [variable]
border-radius
- [variable]
border-radius
Recommendations
@mixin Recommendations() { ... }
Description
Styling for recommendations UI components
Parameters
None.
Requires
- [function]
get-text-icon-color
BaseStyle
@mixin BaseStyle() { ... }
Description
Base style used across all Depict components (product listing page, search, category, recommendations). Can only be included once - subsequent includes will yield no css.
Parameters
None.
Requires
- [function]
get-text-icon-color
- [function]
get-text-icon-color
PrimaryButton
@mixin PrimaryButton() { ... }
Description
Generates styling for our primary buttons, including hover, active and focus-visible states
Parameters
None.
Requires
- [function]
get-primary-button-properties
SecondaryButton
@mixin SecondaryButton() { ... }
Description
Generates styling for our secondary buttons, including hover, active and focus-visible states
Parameters
None.
Requires
- [function]
get-secondary-button-properties
SubtleSecondaryButton
@mixin SubtleSecondaryButton() { ... }
Description
A secondary button styled like the "Secondary-Outline-Small" button in Depict's design system
Parameters
None.
Requires
- [function]
get-subtle-secondary-button-properties
Cards
@mixin Cards() { ... }
Description
This is for all product lists, meaning PLP (category + search), as well as recommendations
Parameters
None.
SlidableItems
@mixin SlidableItems() { ... }
Description
Styling for sliders used in the PLP and recommendations. Most of the times SlidableItems is used for items laid out horizontally that do not fit the screen width. On .depict-slider elements without the products
class, there will be default spacing and button style used for overflowing UI items On .depict-slider elements with the products
class there will be no default spacing and buttons styled for navigating products
Examples are the QuickLinks (used to navigate sideways or downwards in the category tree) and the SelectedFilters (if not all selected filters fit on the screen).
Parameters
None.
Requires
- [function]
get-secondary-button-properties
- [function]
get-secondary-button-properties
- [function]
get-background-color
- [function]
get-text-icon-color
- [variable]
page-background-color
- [variable]
border-radius
- [variable]
border-radius
CategoryTitle
@mixin CategoryTitle() { ... }
Description
CategoryTitle is the component that shows the title of the current category along with the number of products in it. This component is optional. When setting up the SDK in TypeScript you can choose between using this component (CategoryTitle) or embedded_num_products which will only show the number of products in the category, and allow you to add a title outside of the category page yourself. You only need to call the mixin if you're using the CategoryTitle component.
Parameters
None.
Requires
- [function]
get-text-icon-color
QuickLinks
@mixin QuickLinks() { ... }
Description
The QuickLinks show the quick links to the subcategories or sibling categories of the current category. It enables to user to navigate to a subcategory or sibling category without having to go back to the category page.
Parameters
None.
Requires
- [function]
get-background-color
- [function]
get-text-icon-color
- [function]
get-border-color
- [function]
get-background-color
- [function]
get-background-color
- [function]
get-secondary-button-properties
- [function]
get-background-color
- [function]
get-text-icon-color
- [function]
get-background-color
- [function]
get-background-color
- [function]
get-background-color
- [function]
get-primary-button-properties
- [function]
get-background-color
- [variable]
border-radius
Autocomplete
@mixin Autocomplete() { ... }
Description
Autocomplete is the component that displays suggested Categories and Products in the SearchModal, both under the "Suggestions" heading (i18n key suggestions_
) when the customer hasn't typed anything, and once the customer has started typing. It also includes previous searches inside of the suggestions provided from the API - when the user hasn't typed though, the PreviousSearches component is shown instead. See also HighlightedText This is not used at all if variables.$search-modal-layout is "v2"
Parameters
None.
Requires
- [function]
get-font-weight
- [function]
get-text-icon-color
- [function]
get-background-color
- [function]
get-background-color
- [function]
get-secondary-button-properties
- [function]
get-background-color
- [function]
get-gap
- [function]
get-gap
- [function]
get-text-icon-color
- [function]
get-text-icon-color
- [function]
get-gap
- [variable]
border-radius
- [variable]
search-modal-layout
CategorySuggestions
@mixin CategorySuggestions() { ... }
Description
CategorySuggestions is the component that displays suggested Categories on the SearchPage, above the results.
Parameters
None.
Requires
- [function]
get-font-weight
- [function]
get-background-color
- [function]
get-background-color
- [function]
get-background-color
- [function]
get-background-color
- [function]
get-border-color
- [function]
get-text-icon-color
- [function]
get-font-weight
ContentResults
@mixin ContentResults() { ... }
Description
Mixin that styles the ContentResults part of the SearchPage
Parameters
None.
Requires
- [function]
get-gap
- [function]
get-gap
- [function]
get-text-icon-color
- [function]
get-text-icon-color
- [function]
get-background-color
- [function]
get-border-color
- [function]
get-text-icon-color
- [function]
get-background-color
- [function]
get-background-color
- [function]
get-text-icon-color
- [function]
get-font-weight
- [function]
get-text-icon-color
- [function]
get-text-icon-color
- [function]
get-font-weight
- [function]
get-text-icon-color
- [function]
get-text-icon-color
- [function]
get-text-icon-color
- [function]
get-text-icon-color
- [function]
get-text-icon-color
- [variable]
gaps
- [variable]
gaps
- [variable]
gaps
- [variable]
gaps
InstantCard
@mixin InstantCard() { ... }
Description
Mixin that styles the idividual product cards in the InstantResults in the SearchModal
Parameters
None.
Requires
- [function]
get-background-color
- [function]
get-background-color
- [function]
get-border-color
- [function]
get-background-color
- [function]
get-text-icon-color
- [function]
get-merged
- [function]
get-text-icon-color
- [function]
get-merged
- [function]
get-text-icon-color
- [function]
get-text-icon-color
- [function]
get-merged
- [variable]
border-radius
- [variable]
search-modal-layout
- [variable]
border-radius
- [variable]
search-modal-layout
- [variable]
search-modal-layout
- [variable]
search-modal-layout
- [variable]
search-modal-layout
- [variable]
search-modal-layout
- [variable]
search-modal-layout
- [variable]
search-modal-layout
- [variable]
search-modal-layout
- [variable]
search-modal-layout
- [variable]
instant-card
- [variable]
search-modal-layout
- [variable]
search-modal-layout
- [variable]
instant-card
- [variable]
search-modal-layout
- [variable]
search-modal-layout
- [variable]
search-modal-layout
- [variable]
search-modal-layout
- [variable]
search-modal-layout
- [variable]
search-modal-layout
- [variable]
instant-card
- [variable]
search-modal-layout
InstantResults
@mixin InstantResults() { ... }
Description
Mixin that styles the container of the InstantResults in the SearchModal
Parameters
None.
Requires
- [function]
get-gap
- [variable]
search-modal-layout
- [variable]
search-modal-layout
PreviousSearches
@mixin PreviousSearches() { ... }
Description
PreviousSearches is the component that shows the previous searches of the user in its own section, with a heading that says "Your previous searches" (key of the string is previous_searches_text_
in the locales). The component is only shown if the user has previous searches and the search field is empty.
PreviousSearches is a sub-component of Autocomplete so you probably don't want to use it on its own. This is not used at all if variables.$search-modal-layout is "v2"
Parameters
None.
Requires
- [function]
get-text-icon-color
- [function]
get-gap
- [function]
get-text-icon-color
- [function]
get-secondary-button-properties
- [function]
get-text-icon-color
- [variable]
border-radius
SearchField
@mixin SearchField() { ... }
Description
SearchField is the component that shows the search input, sometimes back button, clear button and the search button.
Parameters
None.
Requires
- [function]
get-merged
- [function]
get-merged
- [function]
get-merged
- [function]
get-text-icon-color
- [function]
get-text-icon-color
- [function]
get-text-icon-color
- [function]
get-text-icon-color
- [function]
get-text-icon-color
- [function]
get-text-icon-color
- [function]
get-text-icon-color
- [function]
get-text-icon-color
- [function]
get-text-icon-color
- [function]
get-text-icon-color
- [function]
get-secondary-button-properties
- [function]
get-border-color
- [function]
get-text-icon-color
- [function]
get-text-icon-color
- [function]
get-text-icon-color
- [function]
get-text-icon-color
- [function]
get-secondary-button-properties
- [function]
get-border-color
- [function]
get-text-icon-color
- [function]
get-text-icon-color
- [function]
get-border-color
- [variable]
search-field
- [variable]
border-radius
- [variable]
search-field
- [variable]
search-field
- [variable]
search-page-base-z-index
- [variable]
border-radius
- [variable]
search-modal-layout
- [variable]
search-modal-layout
- [variable]
search-modal-layout
- [variable]
border-radius
- [variable]
border-radius
- [variable]
search-modal-layout
- [variable]
search-modal-layout
- [variable]
search-modal-layout
- [variable]
search-modal-layout
- [variable]
search-modal-layout
- [variable]
border-radius
- [variable]
search-modal-layout
- [variable]
search-modal-layout
- [variable]
search-modal-layout
- [variable]
border-radius
- [variable]
border-radius
- [variable]
search-modal-layout
- [variable]
search-page-base-z-index
- [variable]
search-modal-layout
- [variable]
search-modal-layout
- [variable]
search-modal-layout
- [variable]
search-modal-layout
- [variable]
search-modal-layout
- [variable]
search-modal-layout
- [variable]
search-modal-layout
- [variable]
border-radius
- [variable]
border-radius
- [variable]
search-modal-layout
- [variable]
search-modal-layout
SearchModal
@mixin SearchModal() { ... }
Description
SearchModal is the component that shows the search modal when the user clicks on the search icon/into the search field in the header.
Parameters
None.
Requires
- [function]
get-font-weight
- [function]
get-text-icon-color
- [function]
get-background-color
- [function]
get-background-color
- [function]
get-merged
- [function]
get-merged
- [function]
get-background-color
- [function]
get-font-weight
- [function]
get-merged
- [function]
get-merged
- [function]
get-merged
- [function]
get-merged
- [variable]
search-modal-layout
- [variable]
base-z-index
- [variable]
search-modal-layout
- [variable]
search-modal-layout
- [variable]
uppercase-text-transform
- [variable]
base-z-index
- [variable]
search-modal-layout
- [variable]
search-modal-layout
- [variable]
search-modal
- [variable]
search-modal
- [variable]
border-radius
- [variable]
search-modal-layout
- [variable]
search-modal-layout
- [variable]
base-z-index
- [variable]
search-modal-layout
- [variable]
search-modal-layout
- [variable]
search-modal-layout
- [variable]
search-modal-layout
- [variable]
search-modal-layout
- [variable]
uppercase-text-transform
- [variable]
search-modal-layout
- [variable]
uppercase-text-transform
- [variable]
search-modal-layout
- [variable]
search-modal
- [variable]
search-modal
- [variable]
search-modal
- [variable]
search-modal
SearchRecommendations
@mixin SearchRecommendations($border-top: 2px solid variables.$brand-light-grey) { ... }
Description
SearchRecommendations is the component that shows recommendations below the SearchResults once the user has reached the end of the results.
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$border-top | The border separating the results and recommendations | Border | 2px solid variables.$brand-light-grey |
Requires
- [function]
get-border-color
ShowingResultsFor
@mixin ShowingResultsFor() { ... }
Description
This is the styling for the text that says "Showing 30 result(s) for falk"
Parameters
None.
modal-backdrop
@mixin modal-backdrop($background: rgba(0, 0, 0, 0.4), $z-index) { ... }
Description
This mixin is used for the SortAndFilterModal and the SearchModal to color the backdrop behind the modal
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$background | The background color of the backdrop, keep in mind it should be a transparent color | Color | rgba(0, 0, 0, 0.4) |
$z-index | The z-index of the backdrop | Number | — none |
supports-hover
@mixin supports-hover() { ... }
Description
Wraps @content in a media query that targets devices that support :hover
in a non-fallback way.
Parameters
None.
highlight-background
@mixin highlight-background($normal-background, $darken-factor: 10%, $lighten-factor: 10%, $saturation-factor: $darken-factor) { ... }
Description
This mixin sets the background property to the provided color but darkens it by the provided amounts if it is brighter or darker than 50% The purpose is to really easily create i.e. hover effects
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$normal-background | The color to darken or lighten | Color | — none |
$darken-factor | The amount to darken the color by | Percentage | 10% |
$lighten-factor | The amount to lighten the color by | Percentage | 10% |
$saturation-factor | The amount to decrease saturation by when the color is darkened | Percentage | $darken-factor |
[private] _flex-gap
@mixin _flex-gap() { ... }
Description
We can't (or couldn't) use flex gap due to poor compatibility, this mixin is used instead of it and generates margins. We recommend reading the source code and applying thinking to the margin situation that will result.
Parameters
None.
default-theme
@mixin default-theme($scope) { ... }
Description
Default theme for Search and Category pages. Calling this mixin will generate all the styling for the page specified. To configure variables, use @use
and with
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$scope | What to generate styling for. Set this to | "both" or "search" or "category" | — none |
Example
Example usage for when only using the category page that disables all rounded corners.
@use "@depict-ai/plp-styling" with (
$border-radius: 0
);
@include plp-styling.default-theme("category");
Requires
- [variable]
search-modal-layout
- [variable]
search-modal-layout
- [variable]
search-modal-layout
recommendations
@mixin recommendations() { ... }
Description
Base styling for recommendations UI components (Slider and Grid).
Parameters
None.
functions
get-primary-button-properties
@function get-primary-button-properties() { ... }
Description
Used to get the current properties of the primary button. (Buttons.$primary-button-overrides
merged into the default properties.) This is so that parts of the button styling can be re-used in other mixins in the state they were in as the mixins get called.
Parameters
None.
Example
filter: map.get(Buttons.get-primary-button-properties(), "focus-visible-filter");
Requires
- [function]
get-background-color
- [function]
get-background-color
- [function]
get-background-color
- [function]
get-text-icon-color
- [function]
get-background-color
- [function]
get-text-icon-color
- [function]
get-border-color
- [variable]
border-radius
- [variable]
primary-button
Used by
- [mixin]
SelectedFilters
- [mixin]
PrimaryButton
- [mixin]
QuickLinks
get-secondary-button-properties
@function get-secondary-button-properties() { ... }
Description
Used to get the current properties of the secondary button. (Buttons.$secondary-button-overrides
merged into the default properties.) This is so that parts of the button styling can be re-used in other mixins in the state they were in as the mixins get called.
Parameters
None.
Example
filter: map.get(Buttons.get-secondary-button-properties(), "focus-visible-filter");
Requires
- [function]
get-background-color
- [function]
get-background-color
- [function]
get-border-color
- [function]
get-background-color
- [function]
get-text-icon-color
- [function]
get-border-color
- [function]
get-background-color
- [function]
get-text-icon-color
- [function]
get-border-color
- [function]
get-border-color
- [function]
get-border-color
- [variable]
border-radius
- [variable]
secondary-button
Used by
- [mixin]
SelectedFilters
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SecondaryButton
- [mixin]
SlidableItems
- [mixin]
SlidableItems
- [mixin]
QuickLinks
- [mixin]
Autocomplete
- [mixin]
PreviousSearches
- [mixin]
SearchField
- [mixin]
SearchField
get-subtle-secondary-button-properties
@function get-subtle-secondary-button-properties() { ... }
Description
Button not used by Depict UI currently, only used internally
Parameters
None.
Requires
- [function]
get-background-color
- [function]
get-background-color
- [function]
get-border-color
- [function]
get-background-color
- [function]
get-text-icon-color
- [function]
get-border-color
- [function]
get-background-color
- [function]
get-text-icon-color
- [function]
get-border-color
- [function]
get-border-color
- [function]
get-border-color
- [variable]
border-radius
Used by
- [mixin]
SubtleSecondaryButton
highlight-color
@function highlight-color() { ... }
Description
Like highlight-background mixin but returns color value
Parameters
None.
Used by
- [mixin]
SortAndFilter
get-merged
@function get-merged($map, $map2, $key) { ... }
Description
Deep merged two maps and gives you the value of a key in the merged map.
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$map | The base map, whose keys will be overridden by the keys in $map2. | Map | — none |
$map2 | The map whose keys will override the keys in $map. | Map | — none |
$key | The key whose value you want to get from the merged map. | String | — none |
Used by
- [mixin]
SearchPage
- [mixin]
FloatingButtons
- [mixin]
FloatingButtons
- [mixin]
FloatingButtons
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilterModal
- [mixin]
SortAndFilterModal
- [mixin]
SortAndFilterModal
- [mixin]
InstantCard
- [mixin]
InstantCard
- [mixin]
InstantCard
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchModal
- [mixin]
SearchModal
- [mixin]
SearchModal
- [mixin]
SearchModal
- [mixin]
SearchModal
- [mixin]
SearchModal
- [function]
get-font-weight
- [function]
get-gap
get-text-icon-color
@function get-text-icon-color($type, $state: "base") { ... }
Description
Makes it easy to get the text color
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$type | What type of color | "base" or "neutral" or "subtle" or "inverse" | — none |
$state | The state | "default" or "hover" or "pressed" or "disabled" | "base" |
Used by
- [mixin]
BreadCrumbs
- [mixin]
BreadCrumbs
- [mixin]
BreadCrumbs
- [mixin]
HighlightedText
- [mixin]
HighlightedText
- [mixin]
HighlightedText
- [mixin]
HighlightedText
- [mixin]
HighlightedText
- [mixin]
PLPResults
- [mixin]
ScrollStatus
- [mixin]
SelectedFilters
- [mixin]
FloatingButtons
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilterModal
- [mixin]
SortAndFilterModal
- [mixin]
Toast
- [mixin]
Recommendations
- [mixin]
BaseStyle
- [mixin]
BaseStyle
- [function]
get-primary-button-properties
- [function]
get-primary-button-properties
- [function]
get-secondary-button-properties
- [function]
get-secondary-button-properties
- [function]
get-subtle-secondary-button-properties
- [function]
get-subtle-secondary-button-properties
- [mixin]
SlidableItems
- [mixin]
CategoryTitle
- [mixin]
QuickLinks
- [mixin]
QuickLinks
- [mixin]
Autocomplete
- [mixin]
Autocomplete
- [mixin]
Autocomplete
- [mixin]
CategorySuggestions
- [mixin]
ContentResults
- [mixin]
ContentResults
- [mixin]
ContentResults
- [mixin]
ContentResults
- [mixin]
ContentResults
- [mixin]
ContentResults
- [mixin]
ContentResults
- [mixin]
ContentResults
- [mixin]
ContentResults
- [mixin]
ContentResults
- [mixin]
ContentResults
- [mixin]
InstantCard
- [mixin]
InstantCard
- [mixin]
InstantCard
- [mixin]
InstantCard
- [mixin]
PreviousSearches
- [mixin]
PreviousSearches
- [mixin]
PreviousSearches
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchModal
get-border-color
@function get-border-color($type, $state: "base") { ... }
Description
Makes it easy to get the border color
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$type | What type of color | "base" or "neutral" or "subtle" or "inverse" | — none |
$state | The state | "default" or "hover" or "pressed" or "disabled" | "base" |
Used by
- [mixin]
BreadCrumbs
- [mixin]
FloatingButtons
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [function]
get-primary-button-properties
- [function]
get-secondary-button-properties
- [function]
get-secondary-button-properties
- [function]
get-secondary-button-properties
- [function]
get-secondary-button-properties
- [function]
get-secondary-button-properties
- [function]
get-subtle-secondary-button-properties
- [function]
get-subtle-secondary-button-properties
- [function]
get-subtle-secondary-button-properties
- [function]
get-subtle-secondary-button-properties
- [function]
get-subtle-secondary-button-properties
- [mixin]
QuickLinks
- [mixin]
CategorySuggestions
- [mixin]
ContentResults
- [mixin]
InstantCard
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchRecommendations
get-background-color
@function get-background-color($type, $state: "base") { ... }
Description
Makes it easy to get the background color
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$type | What type of color | "base" or "neutral" or "subtle" or "inverse" | — none |
$state | The state | "default" or "hover" or "pressed" or "disabled" | "base" |
Used by
- [mixin]
BreadCrumbs
- [mixin]
ScrollStatus
- [mixin]
FloatingButtons
- [mixin]
FloatingButtons
- [mixin]
FloatingButtons
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilterModal
- [mixin]
Toast
- [function]
get-primary-button-properties
- [function]
get-primary-button-properties
- [function]
get-primary-button-properties
- [function]
get-primary-button-properties
- [function]
get-secondary-button-properties
- [function]
get-secondary-button-properties
- [function]
get-secondary-button-properties
- [function]
get-secondary-button-properties
- [function]
get-subtle-secondary-button-properties
- [function]
get-subtle-secondary-button-properties
- [function]
get-subtle-secondary-button-properties
- [function]
get-subtle-secondary-button-properties
- [mixin]
SlidableItems
- [mixin]
QuickLinks
- [mixin]
QuickLinks
- [mixin]
QuickLinks
- [mixin]
QuickLinks
- [mixin]
QuickLinks
- [mixin]
QuickLinks
- [mixin]
QuickLinks
- [mixin]
QuickLinks
- [mixin]
Autocomplete
- [mixin]
Autocomplete
- [mixin]
Autocomplete
- [mixin]
CategorySuggestions
- [mixin]
CategorySuggestions
- [mixin]
CategorySuggestions
- [mixin]
CategorySuggestions
- [mixin]
ContentResults
- [mixin]
ContentResults
- [mixin]
ContentResults
- [mixin]
InstantCard
- [mixin]
InstantCard
- [mixin]
InstantCard
- [mixin]
SearchModal
- [mixin]
SearchModal
- [mixin]
SearchModal
get-font-weight
@function get-font-weight($type) { ... }
Description
Makes it easy to get font weight
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$type | What type of font weight to get (light, regular, medium or bold) | 300 or 400 or 500 or 600 | — none |
Requires
- [function]
get-merged
- [variable]
font-weights
Used by
- [mixin]
HighlightedText
- [mixin]
HighlightedText
- [mixin]
HighlightedText
- [mixin]
PLPResults
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
Autocomplete
- [mixin]
CategorySuggestions
- [mixin]
CategorySuggestions
- [mixin]
ContentResults
- [mixin]
ContentResults
- [mixin]
SearchModal
- [mixin]
SearchModal
get-gap
@function get-gap($name) { ... }
Description
Makes it easy to get a gap value from the $gaps map
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$name | The name of the property to get | String | — none |
Requires
- [function]
get-merged
- [variable]
gaps
Used by
- [mixin]
ProductListingPage
- [mixin]
ProductListingPage
- [mixin]
ProductListingPage
- [mixin]
SearchPage
- [mixin]
SearchPage
- [mixin]
SearchPage
- [mixin]
SearchPage
- [mixin]
SearchPage
- [mixin]
CategoryPage
- [mixin]
CategoryPage
- [mixin]
SelectedFilters
- [mixin]
SelectedFilters
- [mixin]
Autocomplete
- [mixin]
Autocomplete
- [mixin]
Autocomplete
- [mixin]
ContentResults
- [mixin]
ContentResults
- [mixin]
InstantResults
- [mixin]
PreviousSearches
variables
page-background-color
$page-background-color: white !default;
Description
Set this to the background color of your page. It's needed for example for some things that fade into the background color (that are over another element).
Used by
- [mixin]
PLPResults
- [mixin]
SlidableItems
base-colors
$base-colors: () !default;
Description
The colors to be used across the UI We're trying to avoid getting colours from this map directly in style declarations, instead there's a layer of abstraction on top of this map. That is because different things in the UI need to have different colours from the palette, depending on the palette. See the maps below for text and icon colours, border colors and background colors.
font-weights
$font-weights: () !default;
Description
What font weights to use for the different font weights. The main reason to allow customisation for this is to allow for custom fonts that don't have the same font weights as the default font. So for example if your font doesn't have a "light" (300) font weight then you can set it to 400 and it will use the "regular" (400) font weight instead.
Map structure
key Name | key Description | key Type | key Value |
---|---|---|---|
font-weights.300 | The font weight to use for "light" (300) text | Number | 300 |
font-weights.400 | The font weight to use for "regular" (400) text | Number | 400 |
font-weights.500 | The font weight to use for "medium" (500) text | Number | 500 |
font-weights.600 | The font weight to use for "semibold" (600) text | Number | 600 |
font-weights.700 | The font weight to use for "bold" (700) text | Number | 700 |
Used by
- [mixin]
SortAndFilterModal
- [mixin]
SortAndFilterModal
- [function]
get-font-weight
base-z-index
$base-z-index: 5000 !default;
Description
The base z-index of the modal
Used by
- [mixin]
ScrollStatus
- [mixin]
FloatingButtons
- [mixin]
SortAndFilterModal
- [mixin]
SortAndFilterModal
- [mixin]
SortAndFilterModal
- [mixin]
Toast
- [mixin]
SearchModal
- [mixin]
SearchModal
- [mixin]
SearchModal
search-page-base-z-index
$search-page-base-z-index: 1 !default;
Description
The z-index of the search page
Used by
- [mixin]
SortAndFilter
- [mixin]
SearchField
- [mixin]
SearchField
border-radius
$border-radius: 4px !default;
Description
The border radius to use. This is used in many places and not often exactly this value. Sometimes a multiple is used and if it's 0 then everything will be square
Used by
- [mixin]
ScrollStatus
- [mixin]
SelectedFilters
- [mixin]
FloatingButtons
- [mixin]
SortAndFilter
- [mixin]
SortAndFilterModal
- [mixin]
SortAndFilterModal
- [mixin]
Toast
- [mixin]
Toast
- [function]
get-primary-button-properties
- [function]
get-secondary-button-properties
- [function]
get-subtle-secondary-button-properties
- [mixin]
SlidableItems
- [mixin]
SlidableItems
- [mixin]
QuickLinks
- [mixin]
Autocomplete
- [mixin]
InstantCard
- [mixin]
InstantCard
- [mixin]
PreviousSearches
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchModal
search-modal-layout
$search-modal-layout: "v2" !default;
Description
The search modal layout to use. Set it to "v2" for the new layout. The v2 layout uses modern css features such as :has(), container queries and grid.
Used by
- [mixin]
SearchPage
- [mixin]
Autocomplete
- [mixin]
InstantCard
- [mixin]
InstantCard
- [mixin]
InstantCard
- [mixin]
InstantCard
- [mixin]
InstantCard
- [mixin]
InstantCard
- [mixin]
InstantCard
- [mixin]
InstantCard
- [mixin]
InstantCard
- [mixin]
InstantCard
- [mixin]
InstantCard
- [mixin]
InstantCard
- [mixin]
InstantCard
- [mixin]
InstantCard
- [mixin]
InstantCard
- [mixin]
InstantCard
- [mixin]
InstantCard
- [mixin]
InstantCard
- [mixin]
InstantCard
- [mixin]
InstantResults
- [mixin]
InstantResults
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchModal
- [mixin]
SearchModal
- [mixin]
SearchModal
- [mixin]
SearchModal
- [mixin]
SearchModal
- [mixin]
SearchModal
- [mixin]
SearchModal
- [mixin]
SearchModal
- [mixin]
SearchModal
- [mixin]
SearchModal
- [mixin]
SearchModal
- [mixin]
SearchModal
- [mixin]
SearchModal
- [mixin]
SearchModal
- [mixin]
default-theme
- [mixin]
default-theme
- [mixin]
default-theme
uppercase-text-transform
$uppercase-text-transform: uppercase !default;
Description
Sometimes text is all uppercase in the UI. This is the default text transform used to do that that. For example, if you don't want uppercase text, you can set this to none
Used by
- [mixin]
SelectedFilters
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SearchModal
- [mixin]
SearchModal
- [mixin]
SearchModal
filters-configuration
$filters-configuration: () !default;
Description
Configuration for the filters on the right
Map structure
key Name | key Description | key Type | key Value |
---|---|---|---|
filters-configuration.spacing-between-input-rows | How much space should be between the input rows. Input row being a checkbox/radio button and its label. | Number with size unit | 10px |
filters-configuration.input-row-height-goal | How high an "input row" should try to be. Input row being a checkbox/radio button and its label. If this is smaller than the text size, it will be ignored. If this is an odd number, the filled-in part of checked radio buttons look off-center in google chrome on macOS on 1440p screens. | Number with size unit | 20px |
filters-configuration.radio-checkbox-border | The border on radio buttons and checkboxes. The reason for this being a variable is that its width is extracted and used in calculations to make the input element fit into to "input-row-height-goal". | Border | 1px solid variables.get-border-color("base", "default") |
filters-configuration.hovered-radio-checkbox-border | The border on radio buttons and checkboxes, when hovered. You might want to change this to be 1px wide if you want the hover effect to be less pronounced (and only change the background). | Border | 2px solid variables.get-border-color("base", "default") |
filters-configuration.disabled-radio-checkbox-border | The border on radio buttons and checkboxes, when disabled. | Border | 2px solid variables.get-border-color("base", "disabled") |
filters-configuration.mobile-modal-background-color | The background color of the SortAndFilterModal, a modal containing the sorting and filters on smaller displays. We need this as a variable to calculate a border color that blends with a shadow (apart from setting the background color). | Color | variables.get-background-color("base", "default") |
Used by
- [mixin]
SortAndFilter
- [mixin]
SortAndFilter
- [mixin]
SortAndFilterModal
search-modal
$search-modal: () !default;
Description
Configuration for the search modal.
Map structure
key Name | key Description | key Type | key Value |
---|---|---|---|
search-modal.max-width | The max width of the modal. When using the classic layout this is also used for the max width of SearchField on the search page. | Number with size unit | 800px/1400px |
search-modal.top-snapping | If the modal should snap to the top at certain screen sizes, only recommended to disable if you take care of this via JS | Boolean | true |
search-modal.stacked-side-padding | The padding on the sides of the modal when stacked (mobile layout), only applicable when $search-modal-layout is set to v2 | Number with size unit | 16px |
Used by
- [mixin]
SearchPage
- [mixin]
SearchModal
- [mixin]
SearchModal
- [mixin]
SearchModal
- [mixin]
SearchModal
- [mixin]
SearchModal
- [mixin]
SearchModal
floating-buttons
$floating-buttons: () !default;
Description
Configuration for the buttons that show up when scrolling up after not being too close to the top on mobile
Map structure
key Name | key Description | key Type | key Value |
---|---|---|---|
floating-buttons.bottom-distance | The distance from the bottom of the buttons to the bottom of the screen. | Number with size unit | 12px |
floating-buttons.side-distance | The distance from the | Number with size unit | 12px |
floating-buttons.position | The side of the screen the buttons should be aligned to. Can be "left" or "right". | "left"</code> or <code>"right" | "left" |
Used by
- [mixin]
FloatingButtons
- [mixin]
FloatingButtons
- [mixin]
FloatingButtons
search-field
$search-field: () !default;
Description
Configuration for the search field, that is inside the search modal or on the search page.
Map structure
key Name | key Description | key Type | key Value |
---|---|---|---|
search-field.background | The background color of the input field, clear button and back button | Color | map.get(get-merged($background-colors-defaults, $background-colors, "base"), "default") |
search-modal.max-width | The max width of the input field, only used when v2 search modal is used | Number with size unit | 600px |
search-field.border-radius | Border radius of the outer edges of the whole SearchField | Number with size unit | variables.$border-radius * 2.5 |
Used by
- [mixin]
SearchField
- [mixin]
SearchField
- [mixin]
SearchField
gaps
$gaps: () !default;
Description
Not all gaps can currently be customised using this but some of them do. If this is useful for you and you think we should make it more consistent, please let us know.
Map structure
key Name | key Description | key Type | key Value |
---|---|---|---|
gaps.between-instant-results | The gap between the individual instant results in the modal, unused when $search-modal-layout is set to v2 | Number with size unit | 5px |
gaps.autocomplete.between-items-in-row-mode | The vertical gap between the "list-style items", the individual suggestions that have the full width. | Number with size unit | 5px |
gaps.autocomplete.between-category-and-other | The vertical gap between the category and query suggestion sections | Number with size unit | 20px |
gaps.autocomplete.between-compact-suggestions | The horizontal gap between the individual query suggestions that show up in "compact" mode (multiple in the same row) when no query has been entered | Number with size unit | 5px |
gaps.listing-page | The product listing page (PLP) overall. Note that for the gaps here not the exact values will always be used but often multiples for different places where it's appropriate. | Map | — none |
gaps.listing-page.spacing-to-filters | The spacing between the filters and content. | Number with size unit | 12px |
gaps.listing-page.desktop-item-gap | The vertical gap between the different items on desktop. | Number with size unit | 20px |
gaps.listing-page.mobile-item-gap | The vertical gap between the different items on mobile. | Number with size unit | 16px |
gaps.listing-page.above-and-below-selected-filters.mobile | The spacing above and below the selected filters on mobile. | Number with size unit | 10px |
gaps.listing-page.above-and-below-selected-filters.desktop | The spacing above and below the selected filters on desktop. | Number with size unit | 0 |
gaps.listing-page.search.spacing-above-search-field | Whether to add equal spacing above the search field as below. | Boolean | true |
gaps.listing-page.search.gaps-to-refactor | the factor to multiply the gaps with to get the spacing above the recommendations. | Number with size unit | 3 |
Used by
- [mixin]
ContentResults
- [mixin]
ContentResults
- [mixin]
ContentResults
- [mixin]
ContentResults
- [function]
get-gap
instant-card
$instant-card: () !default;
Description
Styling overrides for the InstantCard component - the component which shows 4 search results in the SearchModal.
Map structure
key Name | key Description | key Type | key Value |
---|---|---|---|
instant-card.sales-price-color | The color of the sales price, only applicable to the modal if $search-modal-layout is set to "classic". Also applies to the Looks component. | Color | #ff2e3e |
instant-card.show-price | Whether to show the price | Boolean | true |
instant-card.show-tagline | Whether to show the "tagline" (different for different customers, some show for example the material of the product) | Boolean | true |
Used by
- [mixin]
InstantCard
- [mixin]
InstantCard
- [mixin]
InstantCard
autocomplete-entries-without-highlight
$autocomplete-entries-without-highlight: () !default;
Description
See documentation of Autocomplete mixin for explanation of this map. It allows customizing the highlighting in the query suggestions
autocomplete-entries-with-highlight
$autocomplete-entries-with-highlight: () !default;
Description
See documentation of Autocomplete mixin for explanation of this map. It allows customizing the highlighting in the query suggestions
primary-button
$primary-button: () !default;
Description
Styling overrides for our primary buttons (button.major
, styled by the PrimaryButton mixin)
Map structure
key Name | key Description | key Type | key Value |
---|---|---|---|
primary-button.background | The background color of the primary button | Color | variables.get-background-color("inverse", "default") |
primary-button.hover-background | The hovered background color of the primary button | Color | variables.get-background-color("inverse", "hover") |
primary-button.active-background | The active background color of the primary button | Color | variables.get-background-color("inverse", "pressed") |
primary-button.color | The text color of the primary button | Color | variables.get-text-icon-color("inverse", "default") |
primary-button.border | The border of the primary button | Border | 1px solid transparent |
primary-button.border-radius | The border radius of the primary button | Number with size unit | variables.$border-radius |
primary-button.hover-filter | The filter to apply to the primary button when hovered | Filter | drop-shadow(-2px -2px 4px rgba(255, 255, 255, 0.25)) drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.15)) |
primary-button.active-filter | The filter to apply to the primary button when active | Filter | drop-shadow(2px 2px 4px rgba(255, 255, 255, 0.25)) drop-shadow(-2px -2px 4px rgba(0, 0, 0, 0.15)) |
primary-button.focus-visible-filter | The filter to apply to the primary button when focused with keyboard navigation. | Filter | drop-shadow(2px 2px 4px rgba(65, 143, 195, 0.8)) drop-shadow(-2px -2px 4px rgba(65, 143, 195, 0.8)) |
primary-button.disabled-background | The background color of the primary button when disabled | Color | variables.get-background-color("inverse", "disabled") |
Used by
- [function]
get-primary-button-properties
secondary-button
$secondary-button: () !default;
Description
Styling overrides for our secondary buttons (button.minor
, styled by the SecondaryButton mixin)
Map structure
key Name | key Description | key Type | key Value |
---|---|---|---|
secondary-button.background | The background color of the secondary button | Color | variables.get-background-color("base", "default") |
secondary-button.hover-background | The hovered background color of the secondary button | Color | variables.get-background-color("base", "hover") |
secondary-button.active-background | The active background color of the secondary button | Color | variables.get-background-color("base", "pressed") |
secondary-button.color | The text color of the secondary button | Color | variables.get-text-icon-color("base", "default") |
secondary-button.border | The border of the secondary button | Border | variables.get-border("base", "default") 1px solid |
secondary-button.border-radius | The border radius of the secondary button | Number with size unit | variables.$border-radius |
secondary-button.hover-filter | The filter to apply to the secondary button when hovered | Filter | drop-shadow(-2px -2px 4px rgba(255, 255, 255, 0.25)) drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.15)) |
secondary-button.active-filter | The filter to apply to the secondary button when active | Filter | drop-shadow(2px 2px 4px rgba(255, 255, 255, 0.25)) drop-shadow(-2px -2px 4px rgba(0, 0, 0, 0.15)) |
secondary-button.focus-visible-filter | The filter to apply to the secondary button when focused with keyboard navigation. | Filter | drop-shadow(-2px -2px 4px rgba(65, 143, 195, 0.8)) drop-shadow(2px 2px 4px rgba(65, 143, 195, 0.8)) |
secondary-button.disabled-background | The background color of the secondary button when disabled | Color | variables.get-background-color("base", "disabled") |
Used by
- [function]
get-secondary-button-properties