You are able to extend the custom css with hover, focus, group-hover, responsive variants class in tailwind.

https://tailwindcss.com/docs/functions-and-directives/#variants

          <section>
<div>
<h2 class="banana hover:chocolate">
some text here
</h2>
</div>
</section>
  @variants hover, focus {
.banana {
color: yellow;
}
.chocolate {
color: brown;
}
}

Tailwind will generate css for you:

.banana {
color: yellow;
}
.chocolate {
color: brown;
}
.focus\:banana:focus {
color: yellow;
}
.focus\:chocolate:focus {
color: brown;
}
.hover\:banana:hover {
color: yellow;
}
.hover\:chocolate:hover {
color: brown;
}

[Tailwind] Extending Tailwind with Responsive Custom Utility Classes的更多相关文章

  1. [Tailwind] Create Custom Utility Classes in Tailwind

    In this lesson, we learn how to generate custom utility classes in tailwind. We add new properties t ...

  2. [Tailwind] Abstract Utility Classes to BEM Components in Tailwind

    When creating UIs with utility classes, a lot of repetition can occur within the HTML markup. In thi ...

  3. Top 15 Java Utility Classes

    In Java, a utility class is a class that defines a set of methods that perform common functions. Thi ...

  4. Utility Classes Are Evil

    原文地址:http://alphawang.com/blog/2014/09/utility-classes-are-evil/ This post is a summary of this arti ...

  5. add a private constructor to hide the implicit public one(Utility classes should not have public constructors)

    sonarlint提示add a private constructor to hide the implicit public one Utility classes should not have ...

  6. Implement Custom Business Classes and Reference Properties实现自定义业务类和引用属性(EF)

    In this lesson, you will learn how to implement business classes from scratch. For this purpose, the ...

  7. Implement Custom Business Classes and Reference Properties 实现自定义业务类和引用属性(XPO)

    In this lesson, you will learn how to implement business classes from scratch. For this purpose, the ...

  8. [Tailwind] Control What Variations are Generated for Each Utility Class Module in Tailwind

    In this lesson, we learn how to control what utility classes are generated for each utility class mo ...

  9. [Tailwind] Get started with Tailwindcss

    In this lesson, we learn how to generate CSS utility classes from Tailwind's JavaScript config file. ...

随机推荐

  1. Node.js:多进程

    ylbtech-Node.js:多进程 1.返回顶部 1. Node.js 多进程 我们都知道 Node.js 是以单线程的模式运行的,但它使用的是事件驱动来处理并发,这样有助于我们在多核 cpu 的 ...

  2. 【BZOJ3218】【UOJ#77】a + b Problem

    题目 题目在这里 思路&做法 明显的最小割(其实是之前做过一道类似的题) S向每一个格子连容量为\(b_i\)的边 每一个格子向T连容量为\(w_i\)的边 对于格子\(i\)向满足条件的格子 ...

  3. Docker修改hosts方法

    方法一: 直接进入容器中修改/etc/hosts 缺点:重启容器后,增加的内容会丢失 方法二: 制作镜像的时候,直接修改. 限制: 需要是root用户,需要在容器中安装sudo 增大了镜像大小 方法三 ...

  4. BZOJ 2729 高精度+组合数学

    思路: 考虑 把男生排成一排 女生和老师往里插 分成两种情况. 1. 女生中间夹着老师 2. 女生中间没有夹着老师 求一下组合* 阶乘就好了 先放Python代码 简洁易懂 def fact(n): ...

  5. mysql 1862 密码过期

    1.管理员权限运行命令: cmd mysqladmin -uroot -p password 修改密码. 2.设置密码永不过期. mysql 数据库\ user 表\ password_expired ...

  6. OpenCV+VS 2015开发环境配置

    最近跑C程序,头文件中用到了OpenCV中的文件,找了很多篇OpenCV+VS的环境配置,发现如下这篇写的最为详细,特转载来自己的博客中留存,并附上原博客地址如下 OpenCV学习笔记(一)——Ope ...

  7. Matplotlib库常用函数大全

    Python之Matplotlib库常用函数大全(含注释) plt.savefig(‘test’, dpi = 600) :将绘制的图画保存成png格式,命名为 test plt.ylabel(‘Gr ...

  8. 更换WordPress后台登录地址

    在后台找到wp-content—themes—twentyfifteen(当前的网站主题)—functions.php 在代码的最下面加入以下代码: //后台唯一登录地址 add_action('lo ...

  9. Android 消息队列机制

    在非UI线程使用Handler进行线程通信时,一般都需要进行3个步骤: 创建Looper Looper.prepar() 创建Handler 启动消息循环Looper.loop() 通过这3步,基本就 ...

  10. Spring 获取propertise文件中的值

    Spring 获取propertise文件中的值 Spring 获取propertise的方式,除了之前的博文提到的使用@value的注解注入之外,还可以通过编码的方式获取,这里主要说的是要使用Emb ...