【问题标题】:Custom SCSS Seemingly Not Referenced自定义 SCSS 似乎没有被引用
【发布时间】:2017-09-15 02:16:44
【问题描述】:

我正在构建一个使用 Grommet UX 框架的 React 站点。我的网站的一部分使用聊天控件,我想在其中应用聊天控件的样式。问题是我的 custom.css 似乎没有将样式应用于 Web 控件,而是似乎一直在尝试应用 Grommet。

我到底错过了什么?

自定义 CSS

customstyle{

    body .wc-app, .wc-app button, .wc-app input, .wc-app textarea {
        font-family: 'Segoe UI', sans-serif;
        font-size: 15px;
    }
...
};

这是我的 app.js

import webchatstyles from '../app/custom.scss';
...
 render() {
    return (
      <App centered={false}>
        <Article>
            <Split flex='right'>
              <Section>
                <Box margin='none' pad='none'>
                  <Chat className={webchatstyles.customstyle} directLine={{secret: 'GUID.Is.Here'}} user={{id:'test', name: 'test'}}/>
                </Box>
...

【问题讨论】:

    标签: css reactjs sass


    【解决方案1】:

    我能够通过进行以下更改来解决此问题:

    • app.js:从导入语句中删除了变量名
    • app.js:已更改
    • custom.scss:将高度和宽度属性添加到 .wc-chatview-panel 这样聊天窗格就会停靠在 屏幕

    【讨论】:

      猜你喜欢
      • 2011-10-01
      • 1970-01-01
      • 1970-01-01
      • 2018-01-25
      • 2018-03-27
      • 1970-01-01
      • 2013-04-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多