项目
在 GitHub 查看
RonMelkhior/tailwindcss-dir
关于
Adds direction (LTR, RTL) variants to your Tailwind project
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Tailwind Direction
Tailwind Direction adds a custom direction variant to your tailwind project,
letting you have custom CSS rules for LTR and RTL layouts.
Note: This package requires Tailwind >= v1.0.1.
Getting started
Install the package via NPM/Yarn.
# Yarn
yarn add tailwindcss-dir --dev
# NPM
npm install tailwindcss-dir --save-dev
Now, setup the plugin in your Tailwind config's plugins section.
Currently the plugin doesn't offer any configuration.
plugins: [
require('tailwindcss-dir')(),
],
Finally, you can use the plugin and add it to modules you want to use it with.
variants: {
float: ['responsive', 'direction'],
margin: ['responsive', 'direction'],
padding: ['responsive', 'direction'],
},
Usage
The plugin adds ltr and rtl variants to your modules. With the default Tailwind configuration, you can use them like so:
<div class="text-green text-2xl ltr:pl-4 rtl:pr-4">
Hello world.
</div>
License
Tailwind Direction is licensed under the MIT license.
探索相关项目
加载中…