You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

181 lines
4.4 KiB

1 year ago
.markdown-reading-view .block-language-cardlink {
9 months ago
margin: var(--p-spacing) 0;
}
.auto-card-link-container {
1 year ago
container-type: inline-size;
position: relative;
overflow: hidden;
user-select: none;
9 months ago
--auto-card-link-button-width: calc(var(--icon-size) + var(--size-2-3));
--auto-card-link-indent-size: 2.5em;
&[data-auto-card-link-depth="0"] {
margin-left: calc(var(--auto-card-link-indent-size) * 0);
}
&[data-auto-card-link-depth="1"] {
margin-left: calc(var(--auto-card-link-indent-size) * 1);
}
&[data-auto-card-link-depth="2"] {
margin-left: calc(var(--auto-card-link-indent-size) * 2);
}
&[data-auto-card-link-depth="3"] {
margin-left: calc(var(--auto-card-link-indent-size) * 3);
}
&[data-auto-card-link-depth="4"] {
margin-left: calc(var(--auto-card-link-indent-size) * 4);
}
&[data-auto-card-link-depth="5"] {
margin-left: calc(var(--auto-card-link-indent-size) * 5);
}
&[data-auto-card-link-depth="6"] {
margin-left: calc(var(--auto-card-link-indent-size) * 6);
}
&[data-auto-card-link-depth="7"] {
margin-left: calc(var(--auto-card-link-indent-size) * 7);
}
2 years ago
}
1 year ago
@container (max-width: 300px) {
.auto-card-link-thumbnail {
display: none;
}
}
@container (max-width: 500px) {
.auto-card-link-description {
display: none;
}
.auto-card-link-thumbnail {
max-width: 40% !important;
}
.auto-card-link-title {
white-space: normal !important;
--lh: 1.5em;
line-height: var(--lh);
height: calc(var(--lh) * 3);
}
}
2 years ago
.auto-card-link-error-container {
max-width: 780px;
1 year ago
margin: 1em auto;
2 years ago
border-radius: 8px;
overflow: hidden;
1 year ago
background-color: var(--background-modifier-error);
2 years ago
padding: 10px;
1 year ago
font-family: var(--font-text);
&:hover {
background: var(--background-modifier-error-hover);
}
2 years ago
}
.auto-card-link-card {
display: flex;
1 year ago
flex-direction: row-reverse;
height: 8em;
transition: 20ms ease-in 0s;
2 years ago
cursor: pointer;
1 year ago
text-decoration: none;
color: var(--link-external-color);
background: var(--background-primary-alt);
border: solid var(--border-width) var(--divider-color);
border-radius: var(--radius-s);
&:hover {
background: var(--background-modifier-hover);
border-color: var(--background-modifier-hover);
text-decoration: none;
}
2 years ago
}
.auto-card-link-main {
display: flex;
1 year ago
flex-grow: 1;
flex-direction: column;
1 year ago
justify-content: space-between;
gap: 0.18em;
padding: 0.5em 0.6em;
overflow: hidden;
text-align: left; /* necessary for ellipsis to work */
2 years ago
}
.auto-card-link-title {
overflow: hidden;
1 year ago
white-space: nowrap;
text-overflow: ellipsis;
&:hover {
color: var(--link-external-color-hover)
}
9 months ago
/* Prevent clash with edit block button */
.is-live-preview .auto-card-link-container:hover &,
.is-live-preview .block-language-cardlink:has(+ .edit-block-button:hover) & {
margin-right: var(--auto-card-link-button-width);
}
2 years ago
}
.auto-card-link-description {
overflow: hidden;
1 year ago
--lh: 1.4em;
line-height: var(--lh);
height: calc(var(--lh) * 3);
color: var(--text-muted);
font-size: var(--font-smallest);
2 years ago
}
.auto-card-link-host {
1 year ago
font-size: var(--font-smallest);
2 years ago
display: flex;
1 year ago
flex-direction: row;
2 years ago
align-items: center;
9 months ago
& span {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* Prevent clash with copy url button */
.auto-card-link-container:hover &,
.is-mobile .auto-card-link-container & {
margin-right: var(--auto-card-link-button-width);
}
1 year ago
&:hover {
color: var(--link-external-color-hover)
}
2 years ago
}
9 months ago
2 years ago
.auto-card-link-favicon {
1 year ago
width: 16px !important;
9 months ago
height: auto !important;
1 year ago
margin: 0 0.5em 0 0 !important;
2 years ago
}
.auto-card-link-thumbnail {
1 year ago
width: unset !important;
1 year ago
border-radius: var(--radius-s) 0 0 var(--radius-s) !important;
height: 100%;
object-fit: cover;
max-width: 50% !important;
pointer-events: none;
2 years ago
}
1 year ago
.auto-card-link-copy-url {
position: absolute;
9 months ago
right: var(--size-2-2);
bottom: var(--size-2-2);
1 year ago
z-index: 1;
9 months ago
/* Show copy button only on hover on desktop */
.obsidian-app:not(.is-mobile) .auto-card-link-container:not(:hover) & {
display: none;
1 year ago
}
2 years ago
}