【问题标题】:Can I put a LESS/Sass variable in an Angular TypeScript component?我可以在 Angular TypeScript 组件中放置一个 LESS/Sass 变量吗?
【发布时间】:2017-10-11 08:24:03
【问题描述】:

我可以在 Angular TypeScript 组件中添加一些 LESS/Sass 变量吗?

例如:

animations: [
    trigger('dialog', [
      state('*', style({
        transform: 'translate(unit(@var1, px), unit(@var2, px))',
        top: 'unit(@var3, px)',
        height: 'unit(@var4, px)'

当前代码:

@Component({
  selector: 'animationDialog', 
  templateUrl: './animationDialog.component.html',
  styleUrls: ['./modal.component.css'], 
  animations: [
    trigger('dialog', [
      state('*', style({
        transform: 'translate(20px, 20px)',
        top: '20px',
        height: '20px'
}))

【问题讨论】:

    标签: angular sass less


    【解决方案1】:

    这样的东西会有帮助吗? https://github.com/davidkpiano/sassport

    【讨论】:

      猜你喜欢
      • 2019-06-03
      • 1970-01-01
      • 1970-01-01
      • 2018-07-02
      • 2014-10-03
      • 2013-11-03
      • 1970-01-01
      • 2015-11-15
      • 1970-01-01
      相关资源
      最近更新 更多