更少的数组 [英] Arrays with Less

查看:54
本文介绍了更少的数组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用SASS,您可以创建如下这样的变量数组:

With SASS you can create an array of variables like this:

$badge-colors: blue #7FB3D4, gray #767676, green #8CC079, red #b35d5d, dark-red #b5473e, black #666, cyan #81BABD, purple #AEA7CF;

是否也可以使用Less创建数组?

Is there some way of creating arrays with Less as well?

推荐答案

问题的答案是是的,您可以在Less中创建和使用数组".数组(在CSS中,因此称为Less领域,通常称为列表")使用与Q中相同的代码定义:

The answer to the question is "Yes, you can create and work with arrays in Less". An array (in CSS and thus Less realm it's usually referred to as "List") is defined with just the same code as in your Q:

@badge-colors: blue #7FB3D4, gray #767676, green #8CC079, red #b35d5d;

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆