
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
@techui/lessmixins
Advanced tools
A simple and efficient Less Mixins library developed and maintained by aYin.
Configure in vue.config.js:
const path = require('path');
module.exports = {
pluginOptions: {
'style-resources-loader': {
preProcessor: 'less',
patterns: [
path.resolve(__dirname, './node_modules/@techui/lessmixins/index.less')
]
}
}
};
Configure in vite.config.js:
import { defineConfig } from 'vite';
import path from 'path';
export default defineConfig({
css: {
preprocessorOptions: {
less: {
javascriptEnabled: true,
additionalData: `@import "${path.resolve(__dirname, './node_modules/@techui/lessmixins/index.less')}";`
}
}
}
});
In your .less files:
@import '@techui/lessmixins';
.your-class {
.bd(@wh); // border: 1px solid #fff;
}
// Border styles
.box {
.bd(@wh); // border: 1px solid #fff;
}
// Background color
.container {
.bgc(@bk); // background-color: #000;
}
// Absolute center positioning
.modal {
.centerAbsolute; // position: absolute; top: 50%; left: 50%; transform: translateX(-50%) translateY(-50%);
}
Less is a CSS pre-processor that extends CSS with features like variables, mixins, and functions.
For detailed usage, please refer to the Less Documentation
aYin
Issues and Pull Requests are welcome!
一个简洁高效的 Less Mixins 工具库,由 aYin 开发维护。
在 vue.config.js 中配置:
const path = require('path');
module.exports = {
pluginOptions: {
'style-resources-loader': {
preProcessor: 'less',
patterns: [
path.resolve(__dirname, './node_modules/@techui/lessmixins/index.less')
]
}
}
};
在 vite.config.js 中配置:
import { defineConfig } from 'vite';
import path from 'path';
export default defineConfig({
css: {
preprocessorOptions: {
less: {
javascriptEnabled: true,
additionalData: `@import "${path.resolve(__dirname, './node_modules/@techui/lessmixins/index.less')}";`
}
}
}
});
在需要使用的 .less 文件中:
@import '@techui/lessmixins';
.your-class {
.bd(@wh); // border: 1px solid #fff;
}
// 边框样式
.box {
.bd(@wh); // border: 1px solid #fff;
}
// 背景颜色
.container {
.bgc(@bk); // background-color: #000;
}
// 绝对居中
.modal {
.centerAbsolute; // position: absolute; top: 50%; left: 50%; transform: translateX(-50%) translateY(-50%);
}
Less 是一门 CSS 预处理语言,它扩展了 CSS 语言,增加了变量、Mixin、函数等特性。
详细使用方法请查阅 Less 中文文档
aYin
欢迎提交 Issue 和 Pull Request!
FAQs
A simple less mixins library developed by ayin.
We found that @techui/lessmixins demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.