You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: webcomponent/README.md
+50-4Lines changed: 50 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,12 +35,58 @@ The code below illustrates the usage of these attributes.
35
35
</cdx-summary>
36
36
```
37
37
38
-
Override the `--cdxsummary-thumb-scale` CSS variable to change the size of the thumbnail from the original `960x600` iframe dimension (default scale is set to `0.3`).
38
+
Customize the style of various parts using any of the following CSS custom properties (variables).
39
+
For example, override the `--cdxsummary-thumb-scale` CSS variable to change the size of the thumbnail from the original `960x600` iframe dimension (default scale is set to `0.3`).
39
40
40
41
```css
41
-
:root {
42
-
--cdxsummary-thumb-scale: 0.25;
42
+
cdx-summary {
43
+
--cdxsummary-main-txt-color: initial;
44
+
--cdxsummary-main-bg-color: initial;
45
+
--cdxsummary-main-font-family: sans-serif;
46
+
--cdxsummary-main-font-size: initial;
47
+
--cdxsummary-main-margin: 0;
48
+
--cdxsummary-main-padding: 5px;
49
+
--cdxsummary-mono-font-family: monospace;
50
+
--cdxsummary-link-txt-color: blue;
51
+
--cdxsummary-link-txt-decoration: underline;
52
+
--cdxsummary-link-bg-color: inherit;
53
+
--cdxsummary-info-txt-color: inherit;
54
+
--cdxsummary-info-bg-color: inherit;
55
+
--cdxsummary-info-font-family: inherit;
56
+
--cdxsummary-info-font-size: inherit;
57
+
--cdxsummary-info-font-style: italic;
58
+
--cdxsummary-info-border: initial;
59
+
--cdxsummary-info-border-radius: initial;
60
+
--cdxsummary-info-margin: 5px;
61
+
--cdxsummary-info-padding: 5px;
62
+
--cdxsummary-h2-txt-color: inherit;
63
+
--cdxsummary-h2-bg-color: inherit;
64
+
--cdxsummary-h2-font-family: inherit;
65
+
--cdxsummary-h2-font-size: 1.5em;
66
+
--cdxsummary-h2-margin: 1em00.7em;
67
+
--cdxsummary-h2-padding: initial;
68
+
--cdxsummary-tbl-txt-color: inherit;
69
+
--cdxsummary-tbl-bg-color: inherit;
70
+
--cdxsummary-tbl-hdr-txt-color: white;
71
+
--cdxsummary-tbl-hdr-bg-color: gray;
72
+
--cdxsummary-tbl-alt-txt-color: inherit;
73
+
--cdxsummary-tbl-alt-bg-color: inherit;
74
+
--cdxsummary-tbl-border: 1pxsolidgray;
75
+
--cdxsummary-tbl-font-family: inherit;
76
+
--cdxsummary-tbl-font-size: inherit;
77
+
--cdxsummary-tbl-margin: initial;
78
+
--cdxsummary-btn-txt-color: white;
79
+
--cdxsummary-btn-bg-color: gray;
80
+
--cdxsummary-btn-font-family: inherit;
81
+
--cdxsummary-btn-font-size: inherit;
82
+
--cdxsummary-btn-border: tbl-border;
83
+
--cdxsummary-btn-border-radius: 5px;
84
+
--cdxsummary-btn-margin: 0010px;
85
+
--cdxsummary-btn-padding: 5px10px;
86
+
--cdxsummary-thumb-border: tbl-border;
87
+
--cdxsummary-thumb-border-radius: 5px;
88
+
--cdxsummary-thumb-scale: 0.3;
43
89
}
44
90
```
45
91
46
-
An [interactive test interface](https://internetarchive.github.io/cdx-summary/webcomponent/)is available for the Web Component that renders the JSON summary.
92
+
Alternatively, use the [interactive tester interface](https://internetarchive.github.io/cdx-summary/webcomponent/)to customize the style and copy the generated code for integration.
0 commit comments