Skip to content
Open
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
23 changes: 0 additions & 23 deletions docs/.vuepress/components/Generator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -120,33 +120,10 @@ export default {
font-size: 0.8rem;
}

.executable {
@apply opacity-50 transition-opacity duration-200;

.generator:hover & {
@apply opacity-100;
}
}

.make {
@apply text-red;
}

.component {
@apply opacity-50 transition-opacity duration-200 delay-100;

.generator:hover & {
@apply opacity-100;
}
}

.options {
@apply opacity-50 transition-opacity duration-200 delay-200;

.generator:hover & {
@apply opacity-100;
}
}
.copy {
@apply absolute top-0 right-0 mt-4 mr-4 uppercase tracking-widest text-xs;
}
Expand Down
15 changes: 14 additions & 1 deletion docs/.vuepress/theme/global-components/BrowserShot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
</div>
<div
class="viewport"
ref="viewport"
:class="{ 'limit-height': maxHeight }"
:style="{ maxHeight: maxHeight ? `${maxHeight}px` : null }">
<div class="image">
Expand Down Expand Up @@ -150,6 +151,7 @@
</style>

<script>
import { applyTabindexIfOverflowing } from '../util/apply-tabindex-if-overflowing';
import { v4 as uuidv4 } from 'uuid';

export default {
Expand Down Expand Up @@ -213,6 +215,17 @@ export default {
.replace("http://", "")
.replace(/\/$/, "");
}
}
},
mounted() {
this.$nextTick(() => {
applyTabindexIfOverflowing(this.$refs.viewport);

const img = this.$refs.viewport.querySelector('img');
if (img && !img.complete) {
img.addEventListener('load', () =>
applyTabindexIfOverflowing(this.$refs.viewport), { once: true });
}
});
},
};
</script>
2 changes: 1 addition & 1 deletion docs/.vuepress/theme/global-components/InfoHud.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default {
}

.info-hud .v-popover {
color: #b8c2cc;
color: var(--ui-component-color);
display: inline-block;
line-height: 0;

Expand Down
3 changes: 2 additions & 1 deletion docs/.vuepress/theme/global-components/Term.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
}

.glossary-term-link {
text-decoration: none !important;
text-decoration: var(--link-underline-color) dotted underline !important;
font-weight: 500;
}

.glossary-term-heading {
Expand Down
5 changes: 3 additions & 2 deletions docs/.vuepress/theme/styles/base.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
--text-color: theme("colors.slate");
--text-color-muted: #6D7480;
--text-color-inverted: theme("colors.white");
--ui-component-color: #8491A4;
--ui-component-color: #7F8C9F;
--bg-color: theme("colors.white");
--sidebar-bg-color: theme("colors.softer");
--search-bg-color: theme("colors.soft");
Expand All @@ -11,7 +11,7 @@
--heading-color: theme("colors.slate");
--link-color-default: theme("colors.blue.default");
--code-link-color: theme("colors.blue.darker");
--link-underline-color: #5E8BF7;
--link-underline-color: var(--link-color-default);
--sidebar-link-color: theme("colors.slate");
--sidebar-active-link-color: theme("colors.blue.default");
--hamburger-color: theme("colors.black");
Expand All @@ -30,6 +30,7 @@
--black: theme("colors.black");
--custom-focus-outline: 2px solid var(--link-color-default);
--active-tab-border-color: (theme("colors.slate"));
--color-red: #C83D28;

/* Custom button */
--button-background-color: theme("colors.blue.default");
Expand Down
2 changes: 2 additions & 0 deletions docs/.vuepress/theme/styles/color-mode.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
--code-bg-color: theme("colors.cinder");
--custom-block-bg-color: theme("colors.slate");
--custom-block-border-color: transparent;
--color-red: #D8503B;

/* Links */
--link-color-default: theme("colors.blue.lighter");
Expand Down Expand Up @@ -69,6 +70,7 @@
--code-bg-color: theme("colors.cinder");
--custom-block-bg-color: theme("colors.slate");
--custom-block-border-color: transparent;
--color-red: #D8503B;

/* Links */
--link-color-default: theme("colors.blue.lighter");
Expand Down
8 changes: 8 additions & 0 deletions docs/.vuepress/theme/util/apply-tabindex-if-overflowing.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export function applyTabindexIfOverflowing(el) {
if (!el) return;
const isOverflowing = el.scrollWidth > el.clientWidth || el.scrollHeight > el.clientHeight;

if (isOverflowing) {
el.setAttribute('tabindex', '0');
}
}
9 changes: 5 additions & 4 deletions docs/.vuepress/theme/util/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { applyTabindexIfOverflowing } from "./apply-tabindex-if-overflowing";
export const hashRE = /#.*$/;
export const extRE = /\.(md|html)$/;
export const endingSlashRE = /\/$/;
Expand Down Expand Up @@ -631,10 +632,10 @@ function getAnchorHash(path) {
* allowing users to focus and scroll them using the keyboard.
*/
export function makeOverflowingContainersFocusable() {
document.querySelectorAll('pre,.toggle-tip .wrapper,.viewport.limit-height').forEach(el => {
if (el.scrollWidth > el.clientWidth || el.scrollHeight > el.clientHeight) {
el.setAttribute('tabindex', '0');
}
const containers = document.querySelectorAll('pre,.toggle-tip .wrapper');

containers.forEach(el => {
applyTabindexIfOverflowing(el);
});
}

Expand Down
2 changes: 1 addition & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = {
"default": "#2963F5",
"darker": "#1554F4",
},
red: "#da5a47",
red: "var(--color-red)",
cinder: "#131119",
green: "#27AB83",
"light-slate": "#66778A",
Expand Down
Loading