redaction component, margin not stacking, other cleanup

This commit is contained in:
2026-08-22 12:18:39 -05:00
parent ce7ed0fd37
commit 5baf764d67
69 changed files with 440 additions and 77 deletions
+38
View File
@@ -0,0 +1,38 @@
<script setup lang="ts">
import {
redactionFamily,
resolveRedactionStrength,
} from '~/utils/fonts';
const props = withDefaults(
defineProps<{
strength?: number | string;
}>(),
{
strength: 35,
},
);
const grade = computed(() => resolveRedactionStrength(props.strength));
const family = computed(
() => `'${redactionFamily(grade.value)}', Georgia, serif`,
);
</script>
<template>
<span
class="redacted"
:data-strength="grade"
:style="{ fontFamily: family }"
><slot /></span>
</template>
<style scoped>
.redacted {
font-weight: 400;
}
:where(strong, b) .redacted {
font-weight: 700;
}
</style>