【发布时间】:2019-04-09 08:07:25
【问题描述】:
我正在为我的非营利组织设计一个网页,为了让事情变得更简单,我购买了一个引导主题模板(Leap Bootstrap 主题)。
在我的项目的主文件夹中,我有以下文件夹:
/dist
/表格
/js
/node_modules
/页
/scss
在'/scss'文件夹中,为了修改主题的配色方案,设置我想要的颜色,我必须这样修改文件'/scss/user-variables.css':
//
//
// user-variables.scss
//
// Place your own variable overrides here, these will override any Bootstrap and theme variables.
// Color Scheme
// Uncomment the variables below and change the hex values.
$primary: #3D3B3C;
$primary-2: #FDFDB7;
$primary-3: #3D3B3C;
// Do not change or remove the $theme-color-scheme or $theme-colors maps below
$theme-color-scheme: (
"primary": $primary,
"primary-2": $primary-2,
"primary-3": $primary-3
);
$theme-colors: (
"primary": $primary,
"primary-2": $primary-2,
"primary-3": $primary-3,
);
“index.html”文件位于“/pages”文件夹中,还有其他文件夹(css、js、img、fonts...)。
当我使用 gulp 和 browsersync 进行这些更改时,它会显示我想要的正确配色方案(正如我在 user-variables.css 文件中编码的那样)。
问题是当我将文件上传到网络托管服务器时。当我访问该网站时,我仍然看到引导主题的原始配色方案,而不是我设置的颜色。可怕的是,一些外部用户看到了正确的颜色。
在“public”文件夹中,我只上传了“index.html”文件和“/assets”文件夹。我必须上传那个 'user-variables.css' 文件吗?
你能帮我解决这个问题吗?抱歉,我是这个世界上的新人。
谢谢!
【问题讨论】:
-
不确定这是否解决了错误,但您这里有一个额外的逗号
"primary-3": $primary-3,,请尝试删除它,看看它是否有效 -
不,逗号没有修复错误。不过还是谢谢你! :)
-
如果其他用户看到正确的颜色,请尝试碰撞您的 css。它可能会缓存在您的浏览器中。
-
网站网址:link你看到的是什么颜色?蓝灯还是黑灯?撞我的 CSS 是什么意思?
-
@MatiesAlzinaSoler 你能告诉我你想用这些颜色改变什么颜色吗?
标签: css sass themes color-scheme bootstrap-themes