Skip to content

πŸ“š The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.

5.5 KB
Raw Blame
@use "../abstract/static.scss" as *;

.markdown-container {
	margin-top: 10px;
	padding: 10px;
	border-radius: var(--radius-xs);
	background-color: var(--surface-raised);

	&:has(.blue) {
		padding: 10px;
		border-left: 4px solid var(--blue);
	}

	&:has(.red) {
		border-left: 4px solid var(--red);
	}

	&:has(.yellow) {
		border-left: 4px solid var(--yellow);
	}

	&:has(.orange) {
		border-left: 4px solid var(--orange);
	}

	&:has(.teal) {
		border-left: 4px solid var(--teal);
		background-color: var(--surface-raised);
	}

	.svg-icon {
		display: inline-block;
		box-sizing: border-box;
		margin-right: 8px;
		font-size: 16px;
		color: var(--blue);
		vertical-align: text-bottom;
		color-scheme: dark;
		fill: var(--blue);
		overflow: visible;
		overflow-wrap: break-word
	}

	.title {
		background-color: transparent;
	}

	.red {
		color: var(--red);

		.svg-icon {
			color: var(--red);
			fill: var(--red);
		}
	}

	.teal {
		color: var(--teal);

		.svg-icon {
			color: var(--teal);
			fill: var(--teal);
		}
	}

	.blue {
		color: var(--blue);

		.svg-icon {
			color: var(--blue);
			fill: var(--blue);
		}
	}

	.yellow {
		color: var(--yellow);

		.svg-icon {
			color: var(--yellow);
			fill: var(--yellow);
		}
	}

	p {
		margin: 0;
	}
}

.custom-block {
	margin-top: 10px;
	margin-bottom: 5px;
	padding: 10px 10px 8px;
	border: 1px solid transparent;
	border-radius: var(--radius-md);
	font-size: 14px;
	line-height: 24px;
	color: rgb(235 235 235 / 100%);

	p {
		margin: 0;
		padding: 0;
	}

	p+p {
		margin: 8px 0;
	}

	a {
		font-weight: 600;
		color: inherit;
		text-decoration: underline;
	}

	a:hover {
		opacity: 0.6;
	}
}

.custom-block-title {
	font-weight: 700;
}

.checkbox-container {
	display: flex;
	justify-content: flex-start;
	align-items: center;
	padding: 0;
}

.checkbox-container input[type="checkbox"] {
	width: unset;
	margin-right: 8px;
}

.checkbox-container span {
	vertical-align: middle;
}



.custom-block.details {
	border-color: var(--blue-border);
	color: var(--blue);
	background-color: var(--blue-bg);

	summary {
		margin: 0 0 8px;
		font-weight: 700;
		cursor: pointer;

		&+p {
			margin: 8px 0;
		}
	}
}

.columns {
	display: flex;
	flex-flow: row wrap;
	justify-content: space-around;
}

.columns .column {
	flex: 1;
	margin: 0 10px;
}

// *************** CODE BLOCKS **************** //
.code-block-wrapper {
	position: relative;
	margin: 1em 0;
}

.code-copy-btn {
	position: absolute;
	top: 20px;
	right: 8px;
	z-index: 5;
	display: inline-flex;
	justify-content: center;
	align-items: center;
	width: 32px;
	height: 32px;
	padding: 6px;
	border: 1px solid var(--grey-dark);
	border-radius: 6px;
	color: #a0a0a0;
	background: rgb(30 30 30 / 70%);
	cursor: pointer;
	transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
	backdrop-filter: blur(4px);
}

.code-copy-btn:hover {
	border-color: var(--grey);
	color: #fff;
	background: rgb(45 45 45 / 90%);
}

.code-copy-btn:active {
	transform: scale(0.92);
}

.code-copy-btn .btn-icon,
.code-copy-btn .btn-icon-success {
	display: flex;
	justify-content: center;
	align-items: center;
	transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
		opacity 0.2s ease;
}

.code-copy-btn .btn-icon-success {
	position: absolute;
	color: var(--green);
	opacity: 0;
	transform: scale(0.5) rotate(-45deg);
}

.code-copy-btn.copied {
	border-color: var(--green-border);
	background: var(--green-bg);
}

.code-copy-btn.copied .btn-icon {
	opacity: 0;
	transform: scale(0.5) rotate(45deg);
}

.code-copy-btn.copied .btn-icon-success {
	opacity: 1;
	transform: scale(1) rotate(0deg);
}

// *************** CARDS BLOCKS **************** //
.block {
	display: flex;
	flex-direction: column;
	margin: 0.5rem 0;
	padding: 0.5rem;
	border: 1px solid var(--border);
}


.block.card {
	border-radius: var(--radius-sm);
}

.block-title {
	font-weight: 600;
}

// *************** PANNEL **************** //

.block.panel {
	padding-top: 0;

	.block-title {
		margin: 0 -0.5rem;
		padding: .5rem 1rem;
		border-bottom: 1px solid var(--border);
		font-weight: 600;
		background: var(--surface-raised);
	}
}

/* Modifiers */
.rounded {
	border-radius: var(--radius-lg);

	.block-title {
		border-radius: 12px 12px 0 0;
	}
}

.shadow {
	box-shadow: var(--shadow-md);
}

.bordered {
	border: 1px solid var(--border);
}

.block.background-base {
	background: var(--surface-base);
}

.block.background-raised {
	background: var(--surface-raised);
}

.block.background-overlay {
	background: var(--surface-overlay);
}

/* Internal document links (#<id>) */
.internal-link {
	padding: 1px 5px;
	border-radius: var(--radius-sm);
	font-weight: 500;
	color: var(--primary);
	text-decoration: none;
	background: var(--accent-bg);

	&:hover {
		text-decoration: underline;
	}
}

/* Markdown tooltips: [[hint]] and [text]{tooltip=hint} (#618).
   Reuses the global .hint-tooltip look; the reveal is CSS-only because
   rendered markdown has no component logic behind it. */
.md-tooltip {
	position: relative;
	display: inline-block;

	>.hint-tooltip {
		width: max-content;
		max-width: 280px;
		text-transform: none;
		white-space: normal;
	}

	&:hover>.hint-tooltip,
	&:focus-visible>.hint-tooltip {
		opacity: 1;
		visibility: visible;
		transition-delay: 0s;
	}
}

.md-tooltip-text {
	border-bottom: 1px dotted currentcolor;
	cursor: help;
}

.md-tooltip-icon {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	width: 1rem;
	height: 1rem;
	border-radius: 50%;
	font-size: 0.7rem;
	font-weight: bold;
	font-style: normal;
	color: white;
	background-color: var(--primary);
	cursor: help;
	user-select: none;
}