Skip to content

Commit f817c88

Browse files
committed
styling
1 parent 091f60e commit f817c88

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

services/static-webserver/client/source/class/osparc/wrapper/JsonFormatter.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ qx.Class.define("osparc.wrapper.JsonFormatter", {
6969
}
7070
console.log(jsonFormatterPath + " loaded");
7171
this.setLibReady(true);
72+
73+
this.__applyStyles();
74+
7275
resolve();
7376
}, this);
7477

@@ -82,6 +85,30 @@ qx.Class.define("osparc.wrapper.JsonFormatter", {
8285
});
8386
},
8487

88+
__applyStyles: function() {
89+
const styleId = "json-formatter-osparc-style";
90+
if (!document.getElementById(styleId)) {
91+
const color = qx.theme.manager.Color.getInstance().resolve("text");
92+
const style = document.createElement("style");
93+
style.id = styleId;
94+
style.innerHTML = `
95+
.osparc-json-formatter-root .json-formatter-row,
96+
.osparc-json-formatter-root .json-formatter-key,
97+
.osparc-json-formatter-root .json-formatter-value {
98+
color: ${color} !important;
99+
font-family: "Manrope", sans-serif !important;
100+
}
101+
.osparc-json-formatter-root .json-formatter-key {
102+
font-size: 13px !important;
103+
}
104+
.osparc-json-formatter-root .json-formatter-constructor-name {
105+
display: none !important;
106+
}
107+
`;
108+
document.head.appendChild(style);
109+
}
110+
},
111+
85112
createContainer: function(divId) {
86113
const container = new qx.ui.embed.Html("<div id='"+divId+"'></div>");
87114

0 commit comments

Comments
 (0)