MCPcopy Index your code
hub / github.com/darkreader/darkreader / createTextStyle

Function createTextStyle

src/generators/text-style.ts:33–49  ·  view source on GitHub ↗
(config: Theme)

Source from the content-addressed store, hash-verified

31];
32
33export function createTextStyle(config: Theme): string {
34 const lines: string[] = [];
35 lines.push(`*:not(${excludedSelectors.join(', ')}) {`);
36
37 if (config.useFont && config.fontFamily) {
38 lines.push(` font-family: ${config.fontFamily} !important;`);
39 }
40
41 if (config.textStroke > 0) {
42 lines.push(` -webkit-text-stroke: ${config.textStroke}px !important;`);
43 lines.push(` text-stroke: ${config.textStroke}px !important;`);
44 }
45
46 lines.push('}');
47
48 return lines.join('\n');
49}

Callers 3

createStaticStylesheetFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected