{"id":13672091,"url":"https://github.com/ecomfe/est","last_synced_at":"2025-04-04T11:10:56.795Z","repository":{"id":8472591,"uuid":"10072815","full_name":"ecomfe/est","owner":"ecomfe","description":"EFE Styling Toolkit based on Less","archived":false,"fork":false,"pushed_at":"2023-03-02T06:28:13.000Z","size":2346,"stargazers_count":394,"open_issues_count":5,"forks_count":70,"subscribers_count":31,"default_branch":"dev","last_synced_at":"2025-03-22T02:34:29.132Z","etag":null,"topics":["css","less","mixins"],"latest_commit_sha":null,"homepage":"http://ecomfe.github.io/est","language":"Less","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ecomfe.png","metadata":{"files":{"readme":"README-zh_Hans.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2013-05-15T06:55:27.000Z","updated_at":"2024-11-22T21:28:58.000Z","dependencies_parsed_at":"2022-09-11T02:02:01.489Z","dependency_job_id":"63826597-bcc1-4e94-a0e0-239b05e85667","html_url":"https://github.com/ecomfe/est","commit_stats":{"total_commits":191,"total_committers":8,"mean_commits":23.875,"dds":"0.17801047120418845","last_synced_commit":"6b6b0101dbbdb58697f9dcf286b5db341a4fbb6f"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecomfe%2Fest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecomfe%2Fest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecomfe%2Fest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecomfe%2Fest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ecomfe","download_url":"https://codeload.github.com/ecomfe/est/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247166168,"owners_count":20894654,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["css","less","mixins"],"created_at":"2024-08-02T09:01:26.441Z","updated_at":"2025-04-04T11:10:56.779Z","avatar_url":"https://github.com/ecomfe.png","language":"Less","readme":"est (EFE Styling Toolkit) [![NPM package](https://img.shields.io/npm/v/less-plugin-est.svg?style=flat-square)](https://www.npmjs.com/package/less-plugin-est) [![Build Status](https://img.shields.io/travis/ecomfe/est/dev.svg?style=flat-square)](https://travis-ci.org/ecomfe/est)\n===\n\n\u003e From Middle English este, from Old English ēst (“will, consent, favour, grace, liberality, munificence, bounty, kindness, love, good pleasure, harmony, liberal gifts, luxuries”)\n\n*est 是一个基于 Less 的样式工具库，帮助您更轻松地书写 Less 代码。*\n\nest 提供了一系列方便快捷的 [mixin](http://lesscss.org/features/#mixins-feature)，只在调用时才输出代码。est 不希望提供直接给 HTML 调用的类名，用「样式类」污染 HTML 代码的语义。当然您也可以根据自己的项目需求基于 est 搭建样式类库，提供类名接口来进行快速开发。\n\n\n## 快速开始\n\nest 可以以三种方式引入您的项目：\n\n1. Less 代码中引入：\n\n    下载最新稳定版本：\n    [.zip](https://github.com/ecomfe/est/archive/master.zip) 或 [.tar.gz](https://github.com/ecomfe/est/archive/master.tar.gz)\n\n    或clone最新稳定版：\n\n    ```bash\n    $ git clone https://github.com/ecomfe/est.git\n    ```\n\n    ```less\n    // quick import\n    @import 'est/src/all.less';\n\n    // override global variables\n    @support-ie-version: 10;\n    @default-font-size: 14px;\n\n    // ...your own awesome less code starts here...\n    ```\n\n2. 使用 Less 插件在编译时引入：\n\n    * 安装插件：\n\n        ```bash\n        $ npm install -g less-plugin-est\n        ```\n\n    * 调用插件：\n\n        ```bash\n        $ lessc styles.less --est\n        ```\n\n        如果你在使用 \u003e= `3.0.0` 版本的 Less，必须用一个额外的参数来指定开启 JavaScript 计算：\n\n        ```bash\n        $ lessc styles.less --est --js\n        ```\n\n3. 在 Node.js 中以编程方式调用:\n\n    ```js\n    var less = require('less');\n    var Est = require('less-plugin-est');\n\n    var src = '.box { .clearfix(); }';\n\n    less.render(src, {\n        plugins: [\n            new Est()\n        ],\n        javascriptEnabled: true // 对于 3.0.0 以上版本的 Less 必须开启\n    }).then(function (result) {\n        // handle compiling result\n    });\n    ```\n\n\n## 插件功能及选项\n\nest 的 Less 插件目前接受两个可选项：\n\n* `autoImport`\n\n    自动在所有代码前引入 est。默认值为 `true`。**只在 Less `2.4.0` 及后续版本中有效。**\n     \n\n* `uniqueDirectives`\n\n    为所有具名 At 规则去重（Less 中称为*指令*）。这将让您可以在 mixin 内部定义 `@keyframes`，又不必担心在多次调用后重复输出的问题。默认值为 `true`。\n\n如果需要关闭不需要的功能，您可以按如下方式指定参数：\n\n```bash\n$ lessc style.less --est=\"autoImport=false\u0026uniqueDirectives=false\"\n```\n\n### 注意事项\n\n**作为插件引入时，est 支持的 Less 最低版本号为 `2.0.0`。通过在 Less 文件中 `@import` 引入时，最低版本号为 `2.3.0`。**\n\nLess 只在 `2.4.0` 之后的版本才支持通过插件自动引入代码。所以如果您正在使用更老的版本，就只能通过在 Less 代码中使用 `@import` 来引入 est 了。\n\n另外，作为插件使用时，est 支持 Less `2.3.0` 以前不支持的 `isruleset` 函数（est 代码中有使用）。\n\n## 文档\n\n* [API说明](http://ecomfe.github.io/est/)\n* [Typography相关示例](http://ecomfe.github.io/est/example/typography.html)\n* [Effects相关示例](http://ecomfe.github.io/est/example/effects.html)\n\n\n## 贡献\n\n欢迎提交 [issue](https://github.com/ecomfe/est/issues) 发表反馈意见或直接发送 pull request。\n\n### 单测\n\n单测用例在 `test/specs` 目录下，每个模块一个目录，下面可能拆成多个 spec 文件，也可能只含一个。\n\n在 est 项目目录下，运行：\n\n```bash\n$ npm install\n$ npm test\n```\n","funding_links":[],"categories":["Less"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecomfe%2Fest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fecomfe%2Fest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecomfe%2Fest/lists"}