mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-29 06:29:03 +02:00
use faded primaryColor background for inline code snippets instead of link color (#276)
This commit is contained in:
parent
e655ac0f37
commit
c22203523f
5 changed files with 50 additions and 14 deletions
lib/server
|
@ -17,6 +17,7 @@ function execute(port) {
|
|||
const fs = require('fs-extra');
|
||||
const os = require('os');
|
||||
const path = require('path');
|
||||
const color = require('color');
|
||||
const toSlug = require('../core/toSlug.js');
|
||||
const mkdirp = require('mkdirp');
|
||||
const glob = require('glob');
|
||||
|
@ -479,6 +480,9 @@ function execute(port) {
|
|||
const color = siteConfig.colors[key];
|
||||
cssContent = cssContent.replace(new RegExp('\\$' + key, 'g'), color);
|
||||
});
|
||||
const codeColor = color(siteConfig.colors.primaryColor).alpha(0.07).string();
|
||||
cssContent = cssContent.replace(new RegExp('\\$codeColor', 'g'), codeColor);
|
||||
|
||||
|
||||
res.send(cssContent);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue