@clayui/css

中文文档
3.167.0发布于 2026/11/06MITCommonJS零依赖近 30 天下载 2.7万

Liferay's web implementation of the Lexicon Design Language

原始使用文档
文档目录3 节
  1. Jump to Section
  2. About
  3. Adding New SVG Icons

Jump to Section

About

Clay is Liferay's web implementation of the Lexicon Design Language. It is built with HTML, CSS, and Javascript with Bootstrap as a foundation.

You can view the various components on the Clay site.

Adding New SVG Icons

  1. The copyright license should be added at the top of the new SVG icon file using the format:
<!--
* SPDX-FileCopyrightText: © 2022 Liferay, Inc. <https://liferay.com>
* SPDX-FileCopyrightText: © 2022 Contributors to the project Clay <https://github.com/liferay/clay/graphs/contributors>
*
* SPDX-License-Identifier: BSD-3-Clause
-->

See https://liferay.dev/blogs/-/blogs/how-and-why-to-properly-write-copyright-statements-in-your-code#tldr for more details.

  1. The <svg></svg> element should only have the attributes xmlns and viewBox.

  2. Remove any fill and id attributes from the SVG elements, unless it is a language flag. Language flags should have the fill attribute.

  3. Remove any <style></style> tags and the classes / ids that are referenced by it.

  4. The class lexicon-icon-body is deprecated and is no longer being included in newer icons. This class allowed the background color of an icon to be modified using the property fill. We shouldn't use this class.

  5. The class lexicon-icon-outline is a marker on each SVG element (e.g., path, circle, rect). It provides another class to use as a selector to apply CSS changes to an icon. This class should be included on all SVG elements.

  6. Run yarn compile and include the auto generated file src/scss/functions/_lx-icons-generated.scss in your commit.

  7. In the file, clay/clayui.com/plugins/gatsby-plugin-clay-css-tasks/clay-icon-aliases.js, find iconsData and add the icon aliases if needed.

  8. In the clayui.com directory run yarn develop and check to see if the icon shows up in the icon section.

  9. Include the files static/images/icons/icons.svg, static/js/icons-autogenerated.json, and static/js/flags-autogenerated.json to the commit. Some of these files might not show up in git's "Changes not staged for commit:" if aliases or flags have not been added.

版本与发布记录

@clayui/css 共发布 200 个版本,首次发布于 2019/06/21;过去 12 个月发布了 16 个版本。

版本发布日期距今
3.167.0latest2026/11/064 天前
3.166.02026/08/102 个月前
3.136.33.136.x2026/06/095 个月前
3.165.02026/06/055 个月前
3.164.02026/06/025 个月前
3.163.02026/05/135 个月前

其他发布通道:beta → 3.106.0-alpha.0,next → 3.157.0-alpha.1,3.136.x → 3.136.3。

关于 @clayui/css 的常见问题

@clayui/css 是什么?

Liferay's web implementation of the Lexicon Design Language

如何安装 @clayui/css?

在项目目录运行 npm install @clayui/css,或使用 pnpm add / yarn add / bun add。

@clayui/css 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/clayui__css 是否存在。

@clayui/css 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@clayui/css 可以商用吗?

@clayui/css 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@clayui/css 的下载量有多少?

根据 npm 官方下载统计,@clayui/css 在 2026/10/10 – 2026/11/08 这 30 天内被下载 26,655 次,日均约 889 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@clayui/css 还在维护吗?

最新版本 3.167.0 发布于 2026/11/06(4 天前);至今共发布 200 个版本,其中过去 12 个月发布了 16 个;首次发布于 2019/06/21。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。