summaryrefslogtreecommitdiff
path: root/src/styles/globals.css
blob: 4576c82b0870e93e8b122ca9d2f435f9c58f0070 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
@import 'tailwindcss';

@theme {
    --font-sans: 'Inter Variable', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    --color-primary: #f67280;
    --color-primary-content: #101828;
    --color-complementary: #355c7d;
    --background-image-noise: linear-gradient(
            to bottom,
            color-mix(in oklab, var(--color-gray-950) 0%, transparent),
            color-mix(in oklab, var(--color-gray-950) 100%, transparent)
        ),
        url('/images/noise.png');
}

@layer base {
    h1 {
        @apply text-4xl font-bold tracking-tight sm:text-5xl;
    }

    h2 {
        @apply text-2xl font-bold sm:text-3xl;
    }

    a:not(.btn) {
        @apply underline transition hover:opacity-80;
    }

    pre {
        @apply p-6 overflow-x-auto rounded-lg;
    }

    :not(pre) > code {
        @apply px-1 py-0.5 font-mono rounded bg-gray-900 text-primary;
        font-size: 0.9em;
    }
}

@layer components {
    .markdown {
        > * {
            @apply my-6;
        }

        :where(h1, h2) {
            @apply mt-12 mb-6;
        }

        > :first-child {
            @apply mt-0;
        }

        > :last-child {
            @apply mb-0;
        }
    }

    .btn {
        @apply inline-flex items-center justify-center gap-2 bg-primary text-primary-content cursor-pointer text-center font-semibold no-underline transition-colors;
        padding: var(--btn-py, 0.875rem) var(--btn-px, 1.25rem);
        font-size: var(--btn-font-size, 0.875rem);
        border-radius: var(--btn-border-radius, 0.25rem);

        &:hover {
            @apply bg-primary/85;
        }

        &:disabled {
            @apply text-gray-400 bg-gray-700;
        }
    }

    .btn-lg {
        --btn-font-size: 1.125rem;
        --btn-px: 1.5rem;
        --btn-py: 1.125rem;
    }
}