Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💄 style(error): enhance visibility of Zola errors #359

Merged
merged 2 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sass/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
@use 'parts/_table.scss';
@use 'parts/_tags.scss';
@use 'parts/_theme-switch.scss';
@use 'parts/_zola-error.scss';

@font-face {
src: local('Inter'),
Expand Down
28 changes: 28 additions & 0 deletions sass/parts/_zola-error.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Styles Zola error messages. See https://github.com/welpo/tabi/pull/359
body > div:last-child > div:last-child[style]:not([class]):not([id]) {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 9999;
box-shadow: rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;
border: 2px solid var(--admonition-danger-border);
border-radius: 5px;
background-color: var(--admonition-danger-bg);
padding: 15px;
width: fit-content;
max-width: 80%;
}

body > div:last-child > div:last-child[style]:not([class]):not([id]) > p[style]:first-child {
margin: 0;
color: var(--admonition-danger-border);
font-weight: bold;
}

body > div:last-child > div:last-child[style]:not([class]):not([id]) > pre[style]:last-child {
margin-bottom: 0;
background-color: var(--admonition-danger-code);
padding: 10px;
overflow-x: auto;
}