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
The basic structure of an icon override file is shown in the following snippet:
74
74
75
75
[source,svg]
76
76
----
@@ -86,16 +86,17 @@ The `<path />` portion within the `<symbol>` tags is the definition of the actua
86
86
87
87
You are defining a small icon, so it should fit within a square boundary and have a single solid color.
88
88
89
-
There are many simple SVG icon examples available online (link:https://www.svgviewer.dev/[here for example]).
89
+
There are many simple SVG icon examples available online, for example, the link:https://www.svgviewer.dev/[SVG viewer site, window=_blank].
90
90
91
91
You only need to copy the `<path>` tags from your example SVG within the `<symbol> </symbol>` tags.
92
92
93
93
=== viewBox property
94
-
The *link:https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/viewBox[viewBox property^]* is in the order `min-x`, `min-y`, `width`, and `height`.
94
+
95
+
The link:https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/viewBox[viewBox property^] is in the order `min-x`, `min-y`, `width`, and `height`.
95
96
96
97
The first two properties should be `0 0` while the second should match any `width` and `height` properties from the source of your SVG paths.
97
98
98
-
`width` and `height` may be directly in the `<svg>` tag directly or as part of `viewBox` property in that tag, or perhaps another tag above the `<path>` tags. Use whatever values from your source SVG in the `viewBox` property of the `<symbol>` tag within your override file.
99
+
The `width` and `height` properties may be added directly in the `<svg>` tag, or as part of `viewBox` property in that tag, or perhaps in another tag above `<path>`. Use the values from your source SVG in the `viewBox` property of the `<symbol>` element within your override file.
99
100
100
101
=== fill property
101
102
You can add the `fill` property to the `<symbol>` tag to define a different fill color than the default:
@@ -106,19 +107,23 @@ You can add the `fill` property to the `<symbol>` tag to define a different fill
106
107
----
107
108
108
109
== Testing an icon override file
109
-
The link:https://try-everywhere.thoughtspot.cloud/v2/#/everywhere/playground/search[Visual Embed SDK Playground^] allows you to easily try out the icon customization framework.
110
-
111
-
If you check the *Apply custom styles* box, the `customizations` section appears with the default for CSS.
110
+
The +++<a href="{{navprefix}}/dev-playground">Visual Embed SDK Playground </a>+++ allows you to try out the icon customization framework.
112
111
113
-
Paste the following over the entire customization section that appears in the code window:
112
+
To view the code for customization:
114
113
114
+
. Select the *Apply custom styles* checkbox in the Playground. +
115
+
The `customizations` code appears for CSS modifications appears in the code panel.
116
+
. Replace the `customization` section with the following code and click *Run* to view the results:
In the public playground linked above, anything from `cdn.jsdeliver.net` is already allowed.
123
-
124
-
On your own cluster, make sure to allow any domain you will host the SVG file from via xref:security-settings.adoc[security settings], in the *CSP img-src domains* section.
125
+
[NOTE]
126
+
====
127
+
The `cdn.jsdeliver.net` domain is allowed on ThoughtSpot Embedded link:https://try-everywhere.thoughtspot.cloud/v2/#/everywhere/playground/search[public playground] and trial sites.
128
+
On your ThoughtSpot application instance, make sure to add the domain that will host the SVG file to xref:security-settings.adoc#csp-trusted-domain[the *CSP img-src domains* allowlist].
0 commit comments