@limetech/lime-elements
Version:
125 lines (124 loc) • 4.3 kB
CSS
@charset "UTF-8";
/**
* Note! This file is exported to `dist/scss/` in the published
* node module, for consumer projects to import.
* That means this file cannot import from any file that isn't
* also exported, keeping the same relative path.
*
* Or, just don't import anything, that works too.
*/
/**
* 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.
*/
/**
* 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!
*/
/**
* @prop --icon-background-color: Background color of the icon. Defaults to `--contrast-400`.
* @prop --icon-color: Color of the icon. Defaults to `--contrast-1100`.
*/
:host(limel-file) {
position: relative;
}
.drag-and-drop-tip {
pointer-events: none;
position: absolute;
box-sizing: border-box;
margin: 0.25rem;
inset: 0;
display: flex;
align-items: center;
justify-content: flex-end;
flex-wrap: nowrap;
border-radius: 0.25rem;
border: 1px dashed rgb(var(--contrast-700));
padding: 0 0.5rem;
}
.drag-and-drop-tip .invisible-label-mock {
flex-shrink: 0;
opacity: 0;
padding-right: 1rem;
padding-left: 1.5rem;
}
.drag-and-drop-tip .tip {
font-size: smaller;
color: var(--limel-theme-text-secondary-on-background-color);
height: auto;
max-height: 3rem;
line-height: 1;
display: -webkit-box;
overflow: hidden;
white-space: normal;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}