【问题标题】:How to convert the following CSS into SCSS format?如何将以下 CSS 转换为 SCSS 格式?
【发布时间】:2022-01-25 10:53:57
【问题描述】:

我正在使用添加到灵活内容模板客户字段的新布局的 WordPress 页面。我找到了应该放置样式的 .scss 文件,但不确定如何将我的 CSS 转换为 .scss 格式。下面是我要改成 SCSS 的 CSS。

.hero-with-text-cta-hero {
  background-color: #ececec;
}

.texts-and-cta {
  position: absolute;
  top: 2rem;
  right: 4rem;
  width: 40%;
  text-align: right;
}

.texts-and-cta-col {
  position:static !important;
}

.texts-and-cta h2 {
  margin-left: 1rem;
  margin-right: 1rem;
  font-size: 1.8rem !important;
  font-family: Roboto, sans-serif !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  font-weight: 400 !important;
  color: #a6a2a3 !important;
}

@media (max-width: 959px) {
  .texts-and-cta {
    position: relative;
    top: 0;
    right: 0;
    width: 100%;
    text-align: center;
    padding-top:1rem;
  }
}

.hero-with-text-cta-hero h1 {
  color: #666766 !important;
}

@media (min-width: 1280px) {
.hero-with-text-cta-hero  h1 {
      font-size: 4rem !important;
  }
}

【问题讨论】:

    标签: css wordpress sass styles gulp-sass


    【解决方案1】:

    只要把它复制到.scss文件中,sass就可以处理普通的css

    【讨论】:

    • 达米安,我试过了,但它似乎不起作用。
    • 抱歉,它正在工作。清除缓存有帮助。
    猜你喜欢
    • 2020-02-09
    • 1970-01-01
    • 1970-01-01
    • 2012-05-24
    • 2017-11-06
    • 1970-01-01
    • 1970-01-01
    • 2017-02-23
    • 2012-11-18
    相关资源
    最近更新 更多