summaryrefslogtreecommitdiff
path: root/nix/data/public-inbox.css
blob: df948731461a7537cf90f0f263ec19f1792f5305 (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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
:root {
  --bg: #f8f9fa;
  --fg: #2e3440;
  --link: #5e81ac;
  --link-hover: #81a1c1;
  --border: #d8dee9;
  --card-bg: #ffffff;
  --meta-fg: #4c566a; /* Darker gray for better legibility */
  --btn-fg: #ffffff;
  --max-width: 780px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1b26;
    --fg: #a9b1d6;
    --link: #7aa2f7;
    --link-hover: #bb9af7;
    --border: #414868; /* Distinct border for dark mode */
    --card-bg: #1f2335;
    --meta-fg: #9aa5ce; /* Brighter gray for dark mode */
    --btn-fg: #1a1b26;
  }
}

span.q {
  color: var(--meta-fg);
  font-style: italic;
}

body {
  background-color: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  max-width: var(--max-width);
  margin: 3rem auto;
  padding: 0 1.5rem;
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  
  /* Keep this for smoother rendering on macOS/iOS */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 1. Global Link Fixes */
body a, body a:visited {
  color: var(--link);
}

/* 2. Card Styling */
body pre {
  white-space: pre-wrap;
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

/* 3. Header Cleanup */
body pre b:first-of-type {
  font-weight: 700;
  color: var(--link);
  font-size: 1.1rem;
  display: block;
  margin-bottom: 0.5rem;
}

/* 4. Fixing the "Permalink" label on documentation */
/* We target links ending in / but EXCLUDE system paths like help or mirror */
body pre a[href$="/"]:not([href*="_/"]):not([href*="new.atom"]) {
  font-size: 0;
  text-decoration: none;
  margin-right: 10px;
}

body pre a[href$="/"]:not([href*="_/"]):not([href*="new.atom"]):after {
  content: "permalink";
  font-size: 11px;
  font-weight: bold;
  color: var(--fg); /* Use main text color for high contrast */
  background: var(--bg);
  border: 1px solid var(--link); /* Use link color for the border */
  padding: 4px 10px;
  border-radius: 4px;
  display: inline-block;
}

/* 5. Fixing the "Raw" button contrast */
body pre a[href$="/raw"] {
  font-size: 0;
  text-decoration: none;
}

body pre a[href$="/raw"]:after {
  content: "raw";
  font-size: 11px;
  font-weight: bold;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--link);
  padding: 4px 10px;
  border-radius: 4px;
  display: inline-block;
}

/* Hover effect for ghost buttons: solid color shift */
body pre a[href$="/"]:hover:after,
body pre a[href$="/raw"]:hover:after {
  background: var(--link);
  color: var(--btn-fg);
}

/* 6. The Reply Button (Primary Action) */
body pre a[href$="#R"], body pre a[href$="#R"]:visited {
  font-size: 0;
  text-decoration: none;
}

body pre a[href$="#R"]:after {
  content: "REPLY";
  font-size: 12px;
  font-weight: bold;
  padding: 6px 20px;
  background: var(--link);
  color: var(--btn-fg);
  border-radius: 6px;
  display: inline-block;
  margin-left: 10px;
}

/* 7. Hide clutter */
body pre a[href^="#r"], body pre a[href^="#r"] + b, body hr {
  display: none;
}

/* Fix: Mathematically outscore the header rule to keep link text inline */
body pre a[href] b:first-of-type {
  display: inline;
  font-size: inherit;
  margin-bottom: 0;
  color: inherit;
}