V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐关注
Meteor
JSLint - a JavaScript code quality tool
jsFiddle
D3.js
WebStorm
推荐书目
JavaScript 权威指南第 5 版
Closure: The Definitive Guide
linzhe141
V2EX  ›  JavaScript

unocss 这个 Attributify preset 的~到底是什么意思?

  •  
  •   linzhe141 · 154 天前 · 1021 次点击
    这是一个创建于 154 天前的主题,其中的信息可能已经有所发展或是发生改变。

    Prefix self-referencing

    For utilities like flex, grid, border, that have the utilities same as the prefix, a special ~ value is provided.

    For example:

    <button class="border border-red">
      Button
    </button>
    

    Can be written as:

    <button border="~ red">
      Button
    </button>
    
    3 条回复    2023-11-28 14:30:55 +08:00
    zcf0508
        1
    zcf0508  
       154 天前 via Android
    border 自身
    linzhe141
        2
    linzhe141  
    OP
       154 天前
    @zcf0508 原来这么简单,谢谢~
    alleluya
        3
    alleluya  
       154 天前
    @zcf0508 和 alias 有点像?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   851 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 20:12 · PVG 04:12 · LAX 13:12 · JFK 16:12
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.