less.css sharing variables across files

前端 未结 2 1577
一个人的身影
一个人的身影 2021-02-02 04:58

I am using less.css to simplify my css styling. I\'d like to declare a varaible in one less file and share its usage across my many less files. Is this possible? For example:

2条回答
  •  一个人的身影
    2021-02-02 05:53

    // e.g. BlueTheme.less Less file ---------
    @import "DefaultBlueParameters.less"; <--- only theme less vars

    @import (less) "DefaultBase.css"; <--- there is use DefaultBlueParameters.less vars

    It generates BlueTheme.css

提交回复
热议问题