UNPKG

@limetech/lime-elements

Version:
190 lines (180 loc) 6.29 kB
@charset "UTF-8"; /** * Note! This file is forwarded via `src/style/exports.scss` * and exposed to consumers through the root `index.scss`. * * Consumers import it using: * `@use '@limetech/lime-elements' as lime-elements;` * * Legacy import paths (`dist/scss/mixins`) are maintained * for backward compatibility via copy rules in the Stencil config. */ /** * This can be used on a trigger element that opens a dropdown menu or a popover. */ /** * This mixin will mask out the content that is close to * the edges of a scrollable area. * - If the scrollable content has `overflow-y`, use `vertically` * as an argument for `$direction`. - If the scrollable content has `overflow-x`, use `horizontally` * as an argument for `$direction`. * * For the visual effect to work smoothly, we need to make sure that * the size of the fade-out edge effect is the same as the * internal paddings of the scrollable area. Otherwise, content of a * scrollable area that does not have a padding will fade out before * any scrolling has been done. * This is why this mixin already adds paddings, which automatically * default to the size of the fade-out effect. * This size defaults to `1rem`, but to override the size use * `--limel-top-edge-fade-height` & `--limel-bottom-edge-fade-height` * when `vertically` argument is set, and use * `--limel-left-edge-fade-width` & `--limel-right-edge-fade-width` * when `horizontally` argument is set. * Of course you can also programmatically increase and decrease the * size of these variables for each edge, based on the amount of * scrolling that has been done by the user. In this case, make sure * to add a custom padding where the mixin is used, to override * the paddings that are automatically added by the mixin in the * compiled CSS code. */ /** * This mixin will add an animated underline to the bottom of an `a` elements. * Note that you may need to add `all: unset;` –depending on your use case– * before using this mixin. */ /** * This mixin creates a cross-browser font stack. * - `sans-serif` can be used for the UI of the components. * - `monospace` can be used for code. * * ⚠️ If we change the font stacks, we need to update * 1. the consumer documentation in `README.md`, and * 2. the CSS variables of `--kompendium-example-font-family` * in the `<style>` tag of `index.html`. */ /** * This mixin is a hack, using old CSS syntax * to enable you to truncate a piece of text, * after a certain number of lines. */ /** * This mixin will add a chessboard background pattern, * typically used to visualize transparency. */ /** * Make a container resizable by the user. * This is used in the documentations and examples * of some components, to demonstrate how the component * behaves in a resizable container. */ /** * Drag to reorder mixins */ /** * The breakpoints below are used to create responsive designs * in Lime's products. Therefore, they are here to get distributed * to all components in other private repos, which rely on this `mixins` * file, to create consistent styles. * * :::important * In very rare cases you should used media queries! * Nowadays, there are many better ways of achieving responsive design * without media queries. For example, using CSS Grid, Flexbox, and their features. * ::: */ /** * Media query mixins for responsive design based on screen width. * Note that these mixins do not detect the device type! */ /* * This file is imported into every component! * * Nothing in this file may output any CSS * without being explicitly called by outside code. */ /** * @prop --header-background-color: Background color of header, defaults to `--contrast-300`. * @prop --header-heading-color: Color of heading text, defaults to `--contrast-1100`. * @prop --header-subheading-color: Color of subheading text, defaults to `--contrast-900`. * @prop --header-supporting-text-color: Color of supporting text in subheading, defaults to `--header-subheading-color`. * @prop --header-top-right-left-border-radius: Top-left and top-right border radius of header, defaults to `0.75rem`. * @prop --header-responsive-breakpoint: Defines the minimum allowed `width` of both information and actions areas in the header, defaults to `22rem`. */ :host(limel-header) { display: flex; align-items: center; box-sizing: border-box; width: 100%; background-color: var(--header-background-color, rgb(var(--contrast-300))); border-top-left-radius: var(--header-top-right-left-border-radius, 0.75rem); border-top-right-radius: var(--header-top-right-left-border-radius, 0.75rem); padding: 0.25rem; } .information { display: flex; flex-grow: 1; align-items: center; min-width: 0; } .icon { --limel-icon-svg-margin: 0.25rem; flex-shrink: 0; color: var(--limel-header-icon-color, var(--header-icon-color, rgb(var(--contrast-1100)))); background-color: var(--limel-header-icon-background-color, var(--header-icon-background-color, transparent)); width: 2.25rem; border-radius: 0.56rem; } .headings { min-width: 0; margin-left: 0.25rem; } .heading, .subheading { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; margin: 0; padding: 0; } .heading { color: var(--header-heading-color, rgb(var(--contrast-1100))); font-size: 1rem; font-weight: 500; } .subheading { color: var(--header-subheading-color, rgb(var(--contrast-900))); font-size: var(--limel-theme-default-small-font-size); font-weight: 400; } .subheading__supporting-text { color: var(--header-supporting-text-color, var(--header-subheading-color)); } .subheading__supporting-text span { margin: 0 0.125rem; } slot[name=actions] { flex-shrink: 0; } :host(limel-header.is-narrow) { padding: 0.125rem 0.25rem; } :host(limel-header.is-narrow) .icon { --limel-icon-svg-margin: 0; width: 1.25rem; } :host(limel-header.is-narrow) .heading { font-size: 0.9375rem; } :host(limel-header.has-responsive-layout) { display: grid; grid-template-columns: repeat(auto-fit, minmax(clamp(50%, var(--header-responsive-breakpoint, 22rem), 100%), 1fr)); } :host(limel-header.has-responsive-layout) .headings { padding-right: 0.5rem; } :host(limel-header.has-responsive-layout) slot[name=actions] { display: flex; justify-content: flex-end; }