提交 f4d020ff 编写于 作者: M Martin Aeschlimann

[theme] css rule tag function

上级 8c95810b
......@@ -106,4 +106,22 @@ platform.Registry.add(Extensions.ThemingContribution, themingRegistry);
export function registerThemingParticipant(participant: IThemingParticipant): IDisposable {
return themingRegistry.onThemeChange(participant);
}
/**
* Tag function for strings containing css rules
*/
export function cssRule(literals, ...placeholders) {
let result = '';
for (let i = 0; i < placeholders.length; i++) {
result += literals[i];
let placeholder = placeholders[i];
if (placeholder === null) {
result += 'transparent';
} else {
result += placeholder.toString();
}
}
result += literals[literals.length - 1];
return result;
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册