-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcpp-only-enhancement.css
More file actions
57 lines (51 loc) · 1.81 KB
/
cpp-only-enhancement.css
File metadata and controls
57 lines (51 loc) · 1.81 KB
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
/* Simple C++ Code Enhancement - White Background with Border */
/* Target only C++ code blocks */
div.sourceCode:has(code.language-cpp),
div.sourceCode:has(code.cpp) {
background-color: #fafbfc !important; /* Subtle off-white */
border: 1px solid rgba(0, 0, 0, 0.15) !important;
border-radius: 6px !important;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
margin: 1rem 0 !important;
}
/* C++ pre elements */
div.sourceCode:has(code.language-cpp) pre,
div.sourceCode:has(code.cpp) pre {
background-color: #fafbfc !important; /* Match container background */
border: none !important;
margin: 0 !important;
padding: 0.75rem 1rem !important;
font-size: 0.95rem !important;
}
/* C++ code elements - keep original font size and styling from a11y theme */
code.language-cpp,
code.cpp {
background-color: transparent !important;
font-size: 0.95rem !important;
line-height: 1.5 !important;
}
/* Alternative selectors for different rendering patterns */
.sourceCode.language-cpp,
pre.language-cpp {
background-color: #fafbfc !important; /* Consistent off-white background */
border: 1px solid rgba(0, 0, 0, 0.15) !important;
border-radius: 6px !important;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
font-size: 0.95rem !important;
}
/* C++ specific comment styling - make comments more distinguishable */
code.language-cpp .co, /* Comments in C++ */
code.cpp .co,
.sourceCode.language-cpp .co,
pre.language-cpp .co {
color: #6a737d !important; /* GitHub-style gray */
font-style: italic !important;
}
/* Alternative comment selectors for different syntax highlighting patterns */
code.language-cpp .comment,
code.cpp .comment,
.sourceCode.language-cpp .comment,
pre.language-cpp .comment {
color: #6a737d !important;
font-style: italic !important;
}