UNPKG

@heycar-uikit/core

Version:
353 lines (330 loc) 6.27 kB
:root { /* heycar mint color */ --color-heycar-mint-500: #00cea5; /* mica blue color */ --color-mica-blue-600: #123d82; --color-mica-blue-700: #052962; --color-mica-blue-800: #091e41; --color-mica-blue-900: #040f21; /* sunbeam blue color */ /* mustang yellow color */ /* old ferrari red color */ /* -- fantasy name of "green" color to be defined -- */ /* -- fantasy name of "whatsapp" color to be defined -- */ /* -- fantasy name of "red" color to be defined -- */ /* tarmac grey color */ --color-tarmac-grey-700: #303030; /* brand colors */ } /* Depricated. Do Not Use */ :root { --spacing-1: 4px; --spacing-2: 8px; --spacing-3: 12px; --spacing-4: 16px; --spacing-5: 20px; --spacing-12: 48px; } :root { /* Font families */ --font-family-system: Objektiv, sans-serif, 'Helvetica Neue', Helvetica, Arial; /* Font weights */ --font-weight-medium: 500; } /* Heading */ /* Sub-Heading */ /* Body */ /* Caption */ /* Overline */ /* Button */ /* Button Old - DO NOT USE */ /* If this is ever changed please update breakpoints.json as well */ /* Mobile */ /* Tablet */ /* Desktop */ /* Default theme (light) */ :root { /* Colors */ --color-primary-600: var(--color-mica-blue-600); --color-primary-700: var(--color-mica-blue-700); --color-primary-800: var(--color-mica-blue-800); --color-primary-900: var(--color-mica-blue-900); --color-secondary-500: var(--color-heycar-mint-500); --color-neutral-700: var(--color-tarmac-grey-700); /* Sizes */ } body { color: var(--color-neutral-700); } /* * Base */ .header { position: fixed; top: 0; left: 0; z-index: 100; overflow: hidden; width: 100%; height: 64px; } .header.isBurgerOpen { height: 100vh; } @media (min-width: 1024px) { .header.isBurgerOpen { height: auto; } } @media (min-width: 768px) { .header { height: 72px; } } @media (min-width: 1024px) { .header { height: auto; overflow: visible; } } @media (min-width: 1280px) { .header { background: var(--color-primary-700); } } .headerInner { padding-top: var(--spacing-4); padding-bottom: var(--spacing-4); width: 100%; background: var(--color-primary-700); } .headerInner > div { width: 100%; } @media (min-width: 768px) { .headerInner { padding-top: var(--spacing-5); padding-bottom: var(--spacing-5); } } @media (min-width: 1024px) { .headerInner { padding-top: var(--spacing-3); padding-bottom: var(--spacing-3); } } .colLeft { display: flex; gap: var(--spacing-12); align-items: center; } .colRight { display: flex; align-items: center; justify-content: flex-end; } @media (min-width: 1024px) { .colRight { gap: var(--spacing-4); } } @media (min-width: 1280px) { .colRight { gap: var(--spacing-1); } } .logo { display: inline-block; height: 32px; } .logo > svg { width: auto; height: 32px; } @media (min-width: 1280px) { .logo { margin-left: var(--spacing-3); } } .searchWrapper { display: none; position: absolute; top: 0; left: 0; z-index: 1; width: 100%; } .searchWrapper .closeSearch { display: none; position: absolute; top: var(--spacing-5); right: var(--spacing-4); border: 0; background: 0; padding: 0; } .searchWrapper.active { display: block; } .searchWrapper.active .closeSearch { display: block; } @media (min-width: 1024px) { .searchWrapper { display: block; position: static; } .searchWrapper .closeSearch { display: none; } } .faves { position: relative; } .faves .counter { font-size: 10px; font-weight: var(--font-weight-medium); font-family: var(--font-family-system); display: block; position: absolute; top: 0; left: 19px; width: 14px; height: 14px; border-radius: 50%; border: solid 1px var(--color-primary-700); background: var(--color-secondary-500); text-align: center; line-height: 14px; opacity: 0; transform: translateY(5px); transition: transform 0.25s ease, opacity 0.25s ease; } .faves .counter.active { opacity: 1; transform: translateY(0); } @media (min-width: 1024px) { .faves .counter { top: 11px; left: 14px; } } .item { display: flex; align-items: center; padding: 0 var(--spacing-3); background: none; border: none; color: #fff; text-decoration: none; } .item > span { display: none; margin-left: var(--spacing-2); } .item:last-of-type { padding-right: 0; } .item.horizontalNavOnly, .item.desktopOnly { display: none; } /* Dropdown nav starts here */ @media (min-width: 1024px) { .item { padding: 0 var(--spacing-2); height: var(--spacing-12); } .item:last-of-type { padding-right: var(--spacing-2); } .item:hover, .item:focus, .item.focused { background-color: var(--color-primary-800); } .item:active { background-color: var(--color-primary-900); } .item.horizontalNavOnly { display: flex; } .item.notHorizontalNav { display: none; } } @media (min-width: 1280px) { .item:last-of-type { padding-right: var(--spacing-3); } .item.desktopOnly { display: flex; } .item > span { display: inline; } .item.asideItem { position: relative; margin-left: var(--spacing-3); padding-left: var(--spacing-2); } .item.asideItem:before { content: ''; position: absolute; left: -8px; height: var(--spacing-12); border-left: solid 2px var(--color-primary-600); } } .langWrapper { position: relative; } @media (min-width: 1024px) { .langWrapper { order: -1; } .langWrapper .item > span { display: inline; } } @media (min-width: 1280px) { .langWrapper { order: 0; } } .navWrapper { width: 100%; } .navWrapper nav { transition: transform 300ms ease-in-out 0s; transform: translateX(110vw); } .navWrapper:global(.navOpen) nav { transform: translateX(0); } /* Dropdown nav starts here */ @media (min-width: 1024px) { .navWrapper nav { transition: none; transform: translateX(0) !important; } }