@limetech/lime-elements
Version:
666 lines (622 loc) • 16.8 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.
*/
blockquote {
position: relative;
max-width: 100%;
margin: 0.75rem 0;
padding: 0.5rem;
border-left: 0.25rem solid rgb(var(--contrast-500));
background-color: rgb(var(--contrast-200));
}
blockquote:before, blockquote:after {
position: absolute;
line-height: 0;
font-size: 2rem;
opacity: 0.4;
}
blockquote:before {
content: "“";
left: -0.5rem;
top: 0.5rem;
}
blockquote:after {
content: "”";
right: -0.25rem;
bottom: -0.25rem;
}
blockquote blockquote {
padding-top: 0;
padding-right: 0;
padding-bottom: 0;
padding-left: 0.25rem;
border-color: rgb(var(--contrast-700));
border-left-width: 1px;
}
blockquote blockquote:before, blockquote blockquote:after {
display: none;
}
blockquote:has(> blockquote) {
padding-left: 0.25rem;
padding-bottom: 0;
}
:host(limel-markdown.truncate-paragraphs) p {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
p,
li {
font-size: var(--limel-theme-default-font-size);
word-break: break-word;
}
a {
word-break: break-all;
}
p {
margin-top: 0;
margin-bottom: 0.5rem;
}
p:only-child {
margin-bottom: 0;
}
a {
transition: color 0.2s ease;
color: var(--markdown-hyperlink-color, rgb(var(--color-blue-dark)));
text-decoration: none;
}
a:hover {
color: var(--markdown-hyperlink-color--hovered, rgb(var(--color-blue-default)));
}
hr {
margin: 1.75rem 0 2rem 0;
border-width: 0;
border-top: 1px solid rgb(var(--contrast-500));
}
dl {
display: grid;
grid-template-columns: 1fr 2fr;
grid-template-rows: 1fr;
margin-bottom: 2rem;
border: 1px solid rgb(var(--contrast-400));
border-radius: 0.375rem;
background-color: rgb(var(--contrast-200));
}
dl dt,
dl dd {
padding: 0.375rem 0.5rem;
font-size: var(--limel-theme-default-font-size);
margin: 0;
}
dl dt:nth-of-type(even),
dl dd:nth-of-type(even) {
background-color: rgb(var(--contrast-300));
}
dl dt:first-child {
border-top-left-radius: 0.375rem;
}
dl dt:last-child {
border-bottom-left-radius: 0.375rem;
}
dl dd:first-child {
border-top-right-radius: 0.375rem;
}
dl dd:last-child {
border-bottom-right-radius: 0.375rem;
}
h1 {
font-size: 1.5rem;
}
h2 {
font-size: 1.25rem;
}
h3 {
font-size: 1.125rem;
}
h4 {
font-size: 1rem;
}
h5 {
font-size: var(--limel-theme-default-font-size);
}
h6 {
font-size: 0.75rem;
}
h1,
h2 {
margin-top: 0.5rem;
margin-bottom: 0.5rem;
letter-spacing: -0.03125rem;
font-weight: 500;
}
h3,
h4 {
margin-top: 0.75rem;
margin-bottom: 0.25rem;
font-weight: 600;
}
h5,
h6 {
margin-top: 0.5rem;
margin-bottom: 0.125rem;
font-weight: 600;
}
h1,
h2,
h3,
h4,
h5,
h6 {
word-break: break-word;
hyphens: auto;
-webkit-hyphens: auto;
}
:not([contenteditable=true]) h1,
:not([contenteditable=true]) h2,
:not([contenteditable=true]) h3,
:not([contenteditable=true]) h4,
:not([contenteditable=true]) h5,
:not([contenteditable=true]) h6 {
text-wrap: balance;
}
[contenteditable=true] h1,
[contenteditable=true] h2,
[contenteditable=true] h3,
[contenteditable=true] h4,
[contenteditable=true] h5,
[contenteditable=true] h6 {
text-wrap: initial;
}
ul {
list-style: none;
}
ul li {
position: relative;
margin-left: 0.75rem;
}
ul li:before {
content: "";
position: absolute;
left: -0.5rem;
top: 0.5rem;
width: 0.25rem;
height: 0.25rem;
border-radius: 50%;
background-color: rgb(var(--contrast-700));
display: block;
}
ol {
margin-top: 0.25rem;
padding-left: 1rem;
}
ul {
margin-top: 0.25rem;
padding-left: 0;
}
ul ul,
ul ol,
ol ol,
ol ul {
margin-left: 0;
}
li {
margin-bottom: 0.25rem;
}
/**
* 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!
*/
code {
font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;
font-size: var(--limel-theme-default-small-font-size);
letter-spacing: -0.0125rem;
color: rgb(var(--contrast-1300));
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
display: inline-block;
border-radius: 0.25rem;
padding: 0.03125rem 0.25rem;
background-color: rgb(var(--contrast-600));
}
pre > code {
display: block;
margin: 0.5rem 0;
padding: 0.5rem 0.75rem;
overflow: auto;
white-space: pre-wrap;
}
:host(limel-markdown:not(.no-table-styles)) table {
table-layout: auto;
min-width: 100%;
border-collapse: collapse;
border-spacing: 0;
background: transparent;
margin: 0.75rem 0;
}
:host(limel-markdown:not(.no-table-styles)) tbody {
border: 1px solid rgb(var(--contrast-400));
border-radius: 0.25rem;
}
:host(limel-markdown:not(.no-table-styles)) th,
:host(limel-markdown:not(.no-table-styles)) td {
text-align: left;
vertical-align: top;
transition: background-color 0.2s ease;
font-size: var(--limel-theme-default-font-size);
}
:host(limel-markdown:not(.no-table-styles)) td {
padding: 0.5rem 0.375rem 0.75rem 0.375rem;
}
:host(limel-markdown:not(.no-table-styles)) tr th {
background-color: rgb(var(--contrast-400));
padding: 0.25rem 0.375rem;
font-weight: normal;
}
:host(limel-markdown:not(.no-table-styles)) tr th:only-child {
text-align: center;
}
:host(limel-markdown:not(.no-table-styles)) tbody tr:nth-child(odd) td {
background-color: rgb(var(--contrast-200));
}
:host(limel-markdown:not(.no-table-styles)) tbody tr:hover td {
background-color: rgb(var(--contrast-300));
}
table {
display: block;
box-sizing: border-box;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
max-width: 100%;
}
kbd {
font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;
font-weight: 600;
color: rgb(var(--contrast-1100));
background-color: rgb(var(--contrast-200));
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: normal;
padding: 0.125rem 0.5rem;
margin: 0 0.25rem;
box-shadow: var(--button-shadow-normal), 0 0.03125rem 0.21875rem 0 rgba(var(--contrast-100), 0.5) inset;
border-radius: 0.125rem;
border-style: solid;
border-color: rgba(var(--contrast-600), 0.8);
border-width: 0 1px 0.125rem 1px;
}
img {
max-width: 100%;
border-radius: 0.25rem;
}
.image-wrapper {
display: inline-flex;
position: relative;
}
.image-wrapper limel-linear-progress {
position: absolute;
inset: 0.25rem auto auto 0.25rem;
width: calc(100% - 0.5rem);
}
.image-wrapper img {
transition: opacity 0.2s ease, scale 0.6s ease;
}
.image-wrapper.state-failed, .image-wrapper.state-loading {
background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%208%208%27%20style%3D%27fill-rule%3Aevenodd%3B%27%3E%3Cpath%20fill%3D%27rgba(186%2C186%2C192%2C0.16)%27%20d%3D%27M0%200h4v4H0zM4%204h4v4H4z%27%2F%3E%3C%2Fsvg%3E");
background-size: 0.5rem;
}
.image-wrapper.state-failed img, .image-wrapper.state-loading img {
opacity: 0.3;
scale: 0.98;
}
.image-wrapper::before {
pointer-events: none;
content: "";
display: block;
position: absolute;
inset: 0;
border-radius: 0.25rem;
transition: border-color 0.4s ease, opacity 0.2s ease, box-shadow 0.6s ease;
border: 1px dashed transparent;
opacity: 0.2;
}
.image-wrapper.state-failed img {
filter: grayscale(0.8);
}
.image-wrapper.state-failed:before {
opacity: 0.8;
box-shadow: var(--shadow-error-state);
}
.image-wrapper:hover::before {
opacity: 0.8;
box-shadow: var(--shadow-depth-8);
}
.image-wrapper:has(.resize-handle[aria-grabbed=true])::before {
border-color: var(--lime-primary-color, var(--limel-theme-primary-color));
opacity: 0.8;
box-shadow: var(--shadow-depth-16), var(--shadow-depth-8);
}
.resize-handle {
transition: color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);
cursor: pointer;
color: var(--limel-theme-on-surface-color);
background-color: rgb(var(--contrast-900));
box-shadow: var(--button-shadow-normal);
cursor: nwse-resize;
position: absolute;
display: flex;
align-items: center;
justify-content: center;
width: 0.5rem;
height: 0.5rem;
border-radius: 50%;
opacity: 0.6;
}
.resize-handle:hover, .resize-handle:focus, .resize-handle:focus-visible {
will-change: color, background-color, box-shadow, transform;
}
.resize-handle:hover, .resize-handle:focus-visible {
transform: translate3d(0, -0.04rem, 0);
color: var(--limel-theme-on-surface-color);
background-color: var(--lime-elevated-surface-background-color);
box-shadow: var(--button-shadow-hovered);
}
.resize-handle:active {
--limel-clickable-transform-timing-function: cubic-bezier(
0.83,
-0.15,
0.49,
1.16
);
transform: translate3d(0, 0.05rem, 0);
box-shadow: var(--button-shadow-pressed);
}
.resize-handle:hover, .resize-handle:active {
--limel-clickable-transition-speed: 0.2s;
--limel-clickable-transform-speed: 0.16s;
}
.resize-handle:focus {
outline: none;
}
.resize-handle:focus-visible {
outline: none;
box-shadow: var(--shadow-depth-8-focused);
}
.resize-handle.top-left {
left: -0.25rem;
top: -0.25rem;
translate: -50%, -50%;
}
.resize-handle.bottom-right {
right: -0.25rem;
bottom: -0.25rem;
translate: 50%, 50%;
}
.resize-wrapper:has(.resize-handle[aria-grabbed=true]) .resize-handle, .resize-wrapper:hover .resize-handle, .resize-handle:hover, .resize-handle:focus-visible {
opacity: 1;
}
.resize-handle[aria-grabbed=true], .resize-handle:hover, .resize-handle:focus-visible {
opacity: 1;
background-color: var(--lime-primary-color, var(--limel-theme-primary-color));
}
.resize-handle:hover, .resize-handle[aria-grabbed=true] {
scale: 1.4;
}
.resize-handle:hover:before, .resize-handle[aria-grabbed=true]:before {
background-color: rgb(var(--color-white));
}
.resize-handle:before {
content: "";
display: block;
position: absolute;
inset: 0;
margin: auto;
border-radius: 50%;
width: 0.25rem;
height: 0.25rem;
background-color: rgb(var(--contrast-100));
}
:host(limel-prosemirror-adapter) {
display: flex;
flex-direction: column;
}
:host(limel-prosemirror-adapter) .toolbar {
order: 1;
}
:host(limel-prosemirror-adapter) div#editor {
order: 2;
height: 100%;
flex-grow: 1;
}
:host(limel-prosemirror-adapter) div[contenteditable=true] {
height: 100%;
}
* {
box-sizing: border-box;
}
:host(limel-prosemirror-adapter:hover) .toolbar,
:host(limel-prosemirror-adapter:focus-within) .toolbar {
will-change: grid-template-rows;
}
:host(limel-prosemirror-adapter:hover) limel-action-bar,
:host(limel-prosemirror-adapter:focus-within) limel-action-bar {
will-change: opacity, padding;
}
.ProseMirror-menubar-wrapper {
display: grid;
grid-template-rows: auto 1fr;
}
.ProseMirror-textblock-dropdown {
min-width: 3em;
}
.ProseMirror-tooltip .ProseMirror-menu {
width: -webkit-fit-content;
width: fit-content;
white-space: pre;
}
.toolbar {
--action-bar-border-radius: 0.25rem;
border-radius: var(--action-bar-border-radius);
flex-shrink: 0;
position: sticky;
z-index: 1;
top: 0;
width: 100%;
display: grid;
grid-template-rows: var(--limel-prosemirror-adapter-toolbar-grid-template-rows);
transition-property: grid-template-rows;
transition-duration: var(--limel-prosemirror-adapter-toolbar-grid-template-rows-transition-duration);
transition-timing-function: var(--limel-prosemirror-adapter-toolbar-transition-timing-function);
background-color: rgba(var(--contrast-200), 0.5);
backdrop-filter: blur(0.5rem);
-webkit-backdrop-filter: blur(0.5rem);
}
limel-action-bar {
min-width: 0;
transition-property: padding, opacity;
transition-duration: var(--limel-prosemirror-adapter-toolbar-grid-template-rows-transition-duration);
transition-timing-function: var(--limel-prosemirror-adapter-toolbar-transition-timing-function);
opacity: var(--limel-prosemirror-adapter-toolbar-opacity);
padding: var(--limel-prosemirror-adapter-action-bar-padding-top-bottom, 0.125rem) 0.25rem;
background-color: transparent;
overflow: hidden;
}
.ProseMirror {
position: relative;
word-wrap: break-word;
white-space: pre-wrap;
white-space: break-spaces;
-webkit-font-variant-ligatures: none;
font-variant-ligatures: none;
font-feature-settings: "liga" 0;
padding: var(--limel-text-editor-padding);
}
.ProseMirror [draggable][contenteditable=false] {
user-select: text;
}
.ProseMirror:focus-visible {
outline: none;
}
.ProseMirror-hideselection {
caret-color: transparent;
}
.ProseMirror-hideselection *::selection {
background: transparent;
}
.ProseMirror-hideselection *::-moz-selection {
background: transparent;
}
.ProseMirror-selectednode {
outline: 0.125rem solid rgb(var(--color-sky-light));
}
li.ProseMirror-selectednode {
outline: none;
}
li.ProseMirror-selectednode:after {
content: "";
position: absolute;
left: -2rem;
right: -0.125rem;
top: -0.125rem;
bottom: -0.125rem;
border: 0.125rem solid rgb(var(--color-sky-light));
pointer-events: none;
}
img.ProseMirror-separator {
display: inline ;
border: none ;
margin: 0 ;
}
limel-portal {
width: 25rem;
}