Skip to content

Commit

Permalink
fix: margin between code blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
djdjz7 committed Dec 27, 2024
1 parent b6985a1 commit 1dd2143
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 57 deletions.
56 changes: 0 additions & 56 deletions src/assets/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -81,62 +81,6 @@ img {
--at-apply: bg-gray-200 'dark:bg-dark-100' rounded-full;
}

.warning,
.error,
.info {
--at-apply: p-4 rounded-md m-y-2;
}

.expander {
--at-apply: p-x-4 rounded-md m-y-2;
}

.warning::before,
.error::before,
.info::before {
--at-apply: text-sm font-bold;
}

.warning > p:last-of-type,
.error > p:last-of-type,
.info > p:last-of-type,
/* no '>' here as it is two levels deep */
.expander p:last-of-type {
margin-bottom: 0;
}

.expander p:first-of-type {
margin-top: 0;
}

.warning {
--at-apply: 'text-yellow-800 bg-yellow-200/20 dark:bg-yellow-500/20 dark:text-yellow-100';
}

.warning::before {
content: var(--warning-text);
}

.error {
--at-apply: 'text-red-800 bg-red-300/20 dark:bg-red-500/20 dark:text-red-100';
}

.error::before {
content: var(--error-text);
}

.info {
--at-apply: 'text-blue-800 bg-blue-300/20 dark:bg-blue-500/20 dark:text-blue-100';
}

.info::before {
content: var(--info-text);
}

.expander {
--at-apply: 'text-gray-800 bg-gray-200/30 dark:bg-truegray-500/20 dark:text-truegray-100 ';
}

@media (prefers-color-scheme: dark) {
:root {
color: var(--text-color);
Expand Down
2 changes: 1 addition & 1 deletion src/assets/codeblocks.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
}

pre.shiki {
--at-apply: rounded-md p-y-3 overflow-auto m-0;
--at-apply: rounded-md p-y-3 overflow-auto m-y-2;
}

.shiki code {
Expand Down
58 changes: 58 additions & 0 deletions src/assets/containers.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
.warning,
.error,
.info {
--at-apply: p-4 rounded-md m-y-2;
}

.expander {
--at-apply: p-x-4 rounded-md m-y-2;
}

.warning::before,
.error::before,
.info::before {
--at-apply: text-sm font-bold;
}

.warning > p:last-of-type,
.error > p:last-of-type,
.info > p:last-of-type,
/* no '>' here as it is two levels deep */
.expander p:last-of-type {
margin-bottom: 0;
}

.expander *:first-child {
margin-top: 0;
}
.expander *:last-child {
margin-bottom: 0;
}

.warning {
--at-apply: 'text-yellow-800 bg-yellow-200/20 dark:bg-yellow-500/20 dark:text-yellow-100';
}

.warning::before {
content: var(--warning-text);
}

.error {
--at-apply: 'text-red-800 bg-red-300/20 dark:bg-red-500/20 dark:text-red-100';
}

.error::before {
content: var(--error-text);
}

.info {
--at-apply: 'text-blue-800 bg-blue-300/20 dark:bg-blue-500/20 dark:text-blue-100';
}

.info::before {
content: var(--info-text);
}

.expander {
--at-apply: 'text-gray-800 bg-gray-200/30 dark:bg-truegray-500/20 dark:text-truegray-100 ';
}
1 change: 1 addition & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'virtual:uno.css'
import 'virtual:base.css'
import '@/assets/codeblocks.css'
import '@/assets/containers.css'

import { createSSRApp } from 'vue'
import App from './App.vue'
Expand Down

0 comments on commit 1dd2143

Please sign in to comment.