Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Commit e7cd913

Browse files
amcdnljelbourn
authored andcommitted
docs(code): highlight inline code elements #232 (#234)
1 parent 0cb683f commit e7cd913

File tree

5 files changed

+41
-85
lines changed

5 files changed

+41
-85
lines changed

src/highlightjs/solarized-light.css

Lines changed: 0 additions & 84 deletions
This file was deleted.

src/styles/_api-theme.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
$background: map-get($theme, background);
99
$foreground: map-get($theme, foreground);
1010
$is-dark-theme: map-get($theme, is-dark);
11+
$exportBackgroundOpacity: if($is-dark-theme, 0.06, 0.03);
1112

1213
.docs-api-method-name-cell {
1314
color: mat-color($primary, 800);
@@ -23,4 +24,11 @@
2324
.docs-api-h1 {
2425
display: none !important;
2526
}
27+
28+
.docs-api-class-name,
29+
.docs-api-module-import,
30+
.docs-api-class-selector-name,
31+
.docs-api-class-export-name {
32+
background: rgba(mat-color($foreground, secondary-text), $exportBackgroundOpacity);
33+
}
2634
}

src/styles/_api.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@
4040
font-size: 12px;
4141
}
4242

43+
.docs-api-class-name,
44+
.docs-api-module-import {
45+
display: inline;
46+
}
47+
4348
.docs-api-method-name-cell {
4449
font-weight: 700;
4550
font-size: 18px;
@@ -55,3 +60,10 @@
5560
// Size corresponding to "caption"-style text in the spec.
5661
font-size: 12px;
5762
}
63+
64+
.docs-api-class-name,
65+
.docs-api-module-import,
66+
.docs-api-class-selector-name,
67+
.docs-api-class-export-name {
68+
padding: 3px;
69+
}

src/styles/_markdown-theme.scss

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,18 @@
1616
.docs-markdown-pre {
1717
background: rgba(mat-color($foreground, secondary-text), .01);
1818
border: .5px solid rgba(mat-color($foreground, secondary-text), .03);
19+
20+
.docs-markdown-code {
21+
background: transparent;
22+
}
1923
}
20-
}
2124

25+
.docs-markdown-code {
26+
@if $is-dark-theme {
27+
background: rgba(mat-color($foreground, secondary-text), .06);
28+
}
29+
@else {
30+
background: rgba(mat-color($foreground, secondary-text), .03);
31+
}
32+
}
33+
}

src/styles/_markdown.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@
3434
margin: 16px auto;
3535
display: block;
3636
padding: 20px;
37+
38+
.docs-markdown-code {
39+
padding: 0;
40+
}
41+
}
42+
43+
.docs-markdown-code {
44+
padding: 3px;
3745
}
3846

3947
code, pre {

0 commit comments

Comments
 (0)