@limetech/lime-elements
Version:
401 lines (390 loc) • 13.2 kB
CSS
@charset "UTF-8";
/*
* This file is imported into every component!
*
* Nothing in this file may output any CSS
* without being explicitly called by outside code.
*/
/**
* @prop --form-body-padding: space around content of the form. Defaults to `1rem`.
* @prop --form-column-gap: defines the vertical space between elements of the form with `grid` and `default` layouts. Defaults to `1rem`.
* @prop --form-row-gap: defines the horizontal space between elements of the form with `grid` and `default` layouts. Defaults to `1rem`.
* @prop --form-gap: defines the space between elements of the form with `grid` and `default` layouts. Defaults to `1rem`.
* @prop --form-background-color-of-even-rows: Background of even rows in the form, when layout type is `row`. Defaults to `transparent`.
* @prop --form-background-color-of-odd-rows:Background of odd rows in the form, when layout type is `row`. Defaults to `--contrast-200`.
*/
.form-group {
min-width: 0;
}
.limel-form-array-item--simple {
display: flex;
align-items: center;
padding-bottom: var(--form-row-gap, 1rem);
}
.limel-form-array-item--simple *:first-child {
flex-grow: 1;
}
limel-code-editor {
margin-bottom: 0.75rem;
}
.limel-form-array-item--object {
margin-bottom: 0.25rem;
}
.limel-form-layout--default {
display: grid;
column-gap: var(--form-column-gap, 1rem);
row-gap: var(--form-row-gap, 1rem);
padding: var(--form-body-padding, 1rem);
}
.limel-form-layout--grid {
--min-height-of-one-row: 2.5rem;
display: grid;
column-gap: var(--form-column-gap, 1rem);
row-gap: var(--form-row-gap, 1rem);
padding: var(--form-body-padding, 1rem);
grid-template-columns: repeat(var(--number-of-columns), minmax(0, 1fr));
}
.limel-form-layout--grid.auto-reorder-to-avoid-empty-cells {
grid-auto-flow: dense;
}
.limel-form-layout--grid.layout-1-columns .limel-form-layout-colspan--1,
.limel-form-layout--grid.layout-1-columns .limel-form-layout-colspan--2,
.limel-form-layout--grid.layout-1-columns .limel-form-layout-colspan--3,
.limel-form-layout--grid.layout-1-columns .limel-form-layout-colspan--4,
.limel-form-layout--grid.layout-1-columns .limel-form-layout-colspan--5 {
grid-column: span 1;
}
.limel-form-layout--grid.layout-2-columns .limel-form-layout-colspan--1 {
grid-column: span 1;
}
.limel-form-layout--grid.layout-2-columns .limel-form-layout-colspan--2,
.limel-form-layout--grid.layout-2-columns .limel-form-layout-colspan--3,
.limel-form-layout--grid.layout-2-columns .limel-form-layout-colspan--4,
.limel-form-layout--grid.layout-2-columns .limel-form-layout-colspan--5 {
grid-column: span 2;
}
.limel-form-layout--grid.layout-3-columns .limel-form-layout-colspan--1 {
grid-column: span 1;
}
.limel-form-layout--grid.layout-3-columns .limel-form-layout-colspan--2 {
grid-column: span 2;
}
.limel-form-layout--grid.layout-3-columns .limel-form-layout-colspan--3,
.limel-form-layout--grid.layout-3-columns .limel-form-layout-colspan--4,
.limel-form-layout--grid.layout-3-columns .limel-form-layout-colspan--5 {
grid-column: span 3;
}
.limel-form-layout--grid.layout-4-columns .limel-form-layout-colspan--1 {
grid-column: span 1;
}
.limel-form-layout--grid.layout-4-columns .limel-form-layout-colspan--2 {
grid-column: span 2;
}
.limel-form-layout--grid.layout-4-columns .limel-form-layout-colspan--3 {
grid-column: span 3;
}
.limel-form-layout--grid.layout-4-columns .limel-form-layout-colspan--4,
.limel-form-layout--grid.layout-4-columns .limel-form-layout-colspan--5 {
grid-column: span 4;
}
.limel-form-layout--grid.layout-5-columns .limel-form-layout-colspan--1 {
grid-column: span 1;
}
.limel-form-layout--grid.layout-5-columns .limel-form-layout-colspan--2 {
grid-column: span 2;
}
.limel-form-layout--grid.layout-5-columns .limel-form-layout-colspan--3 {
grid-column: span 3;
}
.limel-form-layout--grid.layout-5-columns .limel-form-layout-colspan--4 {
grid-column: span 4;
}
.limel-form-layout--grid.layout-5-columns .limel-form-layout-colspan--5 {
grid-column: span 5;
}
.limel-form-layout--grid .limel-form-layout-colspan--all {
grid-column: 1/-1;
}
.limel-form-layout--grid limel-checkbox,
.limel-form-layout--grid limel-switch {
min-height: var(--min-height-of-one-row);
}
.limel-form-layout--grid limel-checkbox {
display: block;
}
.limel-form-layout--grid limel-switch {
margin-left: 0.5rem;
}
.form-error {
color: var(--limel-theme-error-color);
font-size: 0.6875rem;
line-height: 1.5;
visibility: inherit;
padding-right: 1rem;
padding-left: 1rem;
padding-top: 0.25rem;
}
.button-add-new {
margin-top: 0.5rem;
width: 100%;
}
.mdc-typography--headline1 {
position: relative;
}
.form-group {
position: relative;
}
.form-group limel-help {
position: absolute;
top: calc(var(--form-row-gap, 1rem) * -0.5);
left: calc(var(--form-column-gap, 1rem) * -0.5);
}
.form-group .mdc-typography--headline1,
.form-group .mdc-typography--body1 {
color: rgb(var(--contrast-1100));
}
.form-group .mdc-typography--headline1 {
font-size: 2rem;
line-height: 2.25rem;
letter-spacing: -0.01rem;
font-weight: 400;
margin-top: 1.5rem;
margin-bottom: 0.25rem;
}
.form-group .mdc-typography--body1 {
margin-top: 0;
margin-bottom: 0.5rem;
font-size: var(--limel-theme-default-font-size);
}
.form-group .form-group .mdc-typography--headline1,
.form-group .form-group .mdc-typography--body1 {
color: rgb(var(--contrast-1200));
}
.form-group .form-group .mdc-typography--headline1 {
font-size: 1.625rem;
line-height: 1.25rem;
font-weight: 300;
margin-top: 1rem;
}
.form-group .form-group .mdc-typography--headline1:before {
content: "";
display: block;
position: absolute;
top: 0;
bottom: 0;
margin: auto;
left: -0.75rem;
background-color: var(--lime-primary-color, var(--limel-theme-primary-color));
width: 0.125rem;
height: 1.5rem;
border-radius: 0.125rem;
opacity: 0.6;
}
.form-group .form-group .form-group .mdc-typography--headline1,
.form-group .form-group .form-group .mdc-typography--body1 {
color: rgb(var(--contrast-1300));
}
.form-group .form-group .form-group .mdc-typography--headline1 {
font-size: 1.375rem;
line-height: 1.5rem;
margin-top: 0.5rem;
}
.form-group .form-group .form-group .mdc-typography--headline1:before {
display: none;
}
.form-group .form-group .form-group .form-group .mdc-typography--headline1,
.form-group .form-group .form-group .form-group .mdc-typography--body1 {
color: rgb(var(--contrast-1400));
}
.form-group .form-group .form-group .form-group .mdc-typography--headline1 {
font-size: 1.25rem;
line-height: 1.25rem;
margin-top: 1rem;
}
.form-group .form-group .form-group .form-group .mdc-typography--headline1:before {
display: none;
}
.form-group .form-group .form-group .form-group .mdc-typography--headline1,
.form-group .form-group .form-group .form-group .mdc-typography--body1 {
color: rgb(var(--contrast-1400));
}
.form-group .form-group .form-group .form-group .mdc-typography--headline1 {
font-size: 1.25rem;
line-height: 1.25rem;
margin-top: 0.25rem;
}
.form-group .form-group .form-group .form-group .mdc-typography--headline1:before {
display: none;
}
.form-group .form-group .form-group .form-group .form-group .mdc-typography--headline1,
.form-group .form-group .form-group .form-group .form-group .mdc-typography--body1 {
color: rgb(var(--contrast-1400));
}
.form-group .form-group .form-group .form-group .form-group .mdc-typography--headline1 {
font-size: 1rem;
line-height: 1rem;
margin-top: 0.25rem;
}
.form-group .form-group .form-group .form-group .form-group .mdc-typography--headline1:before {
display: none;
}
/**
* 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!
*/
.limel-form-row--layout {
--limel-form-row-border-radius: 0.375rem;
--limel-form-row-icon-size: 1.75rem;
--limel-form-row-main-information-gap: 0.5rem;
display: flex;
flex-direction: column;
}
.limel-form-row--layout .row {
display: flex;
gap: 0.5rem;
flex-direction: column;
padding: 0.5rem 1rem;
}
.limel-form-row--layout .row:nth-child(odd) {
background-color: var(--form-background-color-of-odd-rows, rgb(var(--contrast-200)));
}
.limel-form-row--layout .row:nth-child(even) {
background-color: var(--form-background-color-of-even-rows, transparent);
}
.limel-form-row--layout .row:first-child {
border-radius: var(--limel-form-row-border-radius) var(--limel-form-row-border-radius) 0 0;
}
.limel-form-row--layout .row:last-child {
border-radius: 0 0 var(--limel-form-row-border-radius) var(--limel-form-row-border-radius);
}
.limel-form-row--layout .main-information {
position: relative;
display: flex;
flex-direction: row;
align-items: center;
gap: var(--limel-form-row-main-information-gap);
min-width: 0;
}
.limel-form-row--layout .main-information {
position: relative;
}
.limel-form-row--layout .main-information > .form-group.field {
position: unset;
}
.limel-form-row--layout .main-information > .form-group.field limel-help {
top: 0;
}
.limel-form-row--layout limel-icon {
color: rgb(var(--contrast-1200));
width: var(--limel-form-row-icon-size);
flex-shrink: 0;
min-width: 0;
}
.limel-form-row--layout .title {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
margin: 0;
font-weight: normal;
flex-grow: 1;
color: var(--limel-theme-on-surface-color);
font-size: 0.875rem;
}
.limel-form-row--layout .description {
margin: 0;
color: var(--limel-theme-text-secondary-on-background-color);
font-size: var(--limel-theme-default-small-font-size);
line-height: 1.5;
}
.limel-form-row--layout .has-icon .description {
padding-left: calc(var(--limel-form-row-icon-size) + var(--limel-form-row-main-information-gap));
}
.limel-form-row--layout .form-group.field {
flex-shrink: 0;
display: flex;
align-content: center;
}
.limel-form-row--layout .form-group.field limel-slider {
min-width: 8rem;
display: block;
}