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. linux for LVM 创建笔记

    LVM: 1.创建pv(物理卷) [root@localhost dev]# pvcreate /dev/sdd /dev/sde /dev/sdf Writing physical volume d ...

  2. linux 标准输出和后台运行

    一.后台运行程序 至需要在命令后面加上一个 & 即可 # command & 例如: python test.py & 二.标准输出.标准错误输出 # command > ...

  3. 利用@factory和@dataProvider实现参数化

    利用构造函数将要用的的参数初始化,非常有利于简化脚本.它将外部的数据赋给本地的变量,可以使得初始化后的参数被其他方法使用.直接上代码: private String url;    private S ...

  4. testNG中方法的调用顺序

    今天在执行selnium的test case时,总是遇到空指针错误.但是以前也有run成功过,然后换了各种方法定位元素,都失败了,所以怀疑应该不是元素定位不到的问题,所以可能是method之间有依赖, ...

  5. C#缓存

    最近在学习缓存的知识,博客园中的 缓存资料 觉得信息不错值得学习

  6. Json转换成DataTable

    今天看到Json转DataTable的例子,总结一下.... using System; using System.Collections; using System.Collections.Gene ...

  7. 应用Struts2框架,开发一个加法器,采用两个页面,一个页面输入数据,另一个界面输出结果。

    软件152谭智馗 一.新建maven项目 1.选择菜单file—new—maven project,勾选“Create a &simple project (skip archetype se ...

  8. [ Java ] [ JUnit ] [ Eclipse ] coverage

    官方資訊: https://www.eclemma.org/ - 簡短使用範例說明: https://dzone.com/articles/java-code-coverage-in-eclipse ...

  9. Spring AOP理解

    Spring的核心思想的IOC和AOP.最近学习AOP,对切面的学习有了进一步的认识. Spring用代理类包裹切面,把他们织入到Spring管理的bean中.也就是说代理类伪装成目标类,它会截取对目 ...

  10. HDL之Bitwise operation

    1 Verilog 1.1 Bitwise operator Bitwise operators perform a bit wise operation on two operands. They ...