![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
@cosmic-design/style
Advanced tools
/** package.json */
{
"exports": {
"./*": "./dist/*", /** compiled css **/
"./common": "./src/common" /** souce code css **/
},
}
.
├── dist
│ ├── utilities.css # Tool CSS
│ ├── button.module.css # Component CSS, including default & prefab style
│ ├── global.css # Global CSS = Tool CSS + CSS Variables
├── src
│ ├── common
│ │ ├── theme.css # CSS Variables
以下内容为组件代码库引用 @cosmic-design/style 的方式
import style "@cosmic-design/style/button.module.css";
;import style from '@cosmic-design/style/button.modules.css';
const ButtonTemplate = `<div class="${style.button} cos-sm"></div>`
以下内容为组件/业务代码库,如何使用工具样式/组件样式
<!-- 使用组件的变体修饰 -->
<button class="cos-lg" >大号按钮</button>
<!-- 使用组件的变体修饰 -->
<button class="cos-rounded" >放行按钮</button>
<!-- 使用组件的预制修饰 -->
<button class="cos-dashed" >描边按钮</button>
衍生外观的实现位于 component/Button/button-dashed.module.less 中,编译时打包到 dist/button.module.css 中。
目前在 vite.config.js 中对 CSS Module 编译进行了基本配置
{
modules: {
scopeBehaviour: 'local', // 默认配置, 全局样式需要加 :global() 来避免className编译
localsConvention: 'camelCase', // js的产出中增加驼峰变量名,以便于 style.buttonPrefix 方式引用
generateScopedName: "cos-[local]" // className 编译规则, 目前cos-前缀在这里统一添加
}
}
FAQs
## Exports
The npm package @cosmic-design/style receives a total of 123 weekly downloads. As such, @cosmic-design/style popularity was classified as not popular.
We found that @cosmic-design/style demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.