[Tailwind] Extending Tailwind with Responsive Custom Utility Classes
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的更多相关文章
- [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 ...
 - [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 ...
 - Top 15 Java Utility Classes
		
In Java, a utility class is a class that defines a set of methods that perform common functions. Thi ...
 - Utility Classes Are Evil
		
原文地址:http://alphawang.com/blog/2014/09/utility-classes-are-evil/ This post is a summary of this arti ...
 - 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 ...
 - 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 ...
 - 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 ...
 - [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 ...
 - [Tailwind] Get started with Tailwindcss
		
In this lesson, we learn how to generate CSS utility classes from Tailwind's JavaScript config file. ...
 
随机推荐
- strlen和mb_strlen
			
在PHP中,strlen与mb_strlen是求字符串长度的函数,但是对于一些初学者来说,如果不看手册,也许不太清楚其中的区别.下面通过例子,讲解这两者之间的区别. 先看例子: <?php // ...
 - 28. Implement strStr()[E]实现strStr()
			
题目 Implement strStr(). Return the index of the first occurrence of needle in haystack, or -1 if need ...
 - 如何卸载Win10自带Xbox、人脉、天气等应用?
			
Win10中的Modern应用一般可在右键菜单中进行卸载,不过某些自带的Modern应用,比如Xbox.天气.人脉.照片等应用是无法在右键菜单中进行卸载的.如果你有卸载这些应用的需求,可参考下面的方法 ...
 - Email非正则表达式的判断
			
判断一个邮件是否合法,我们除了可以使用正则表达四以外还可以利用,Email地址的规律进行判断,那么一个合法的Email有哪些要求昵?具体如下: 必须有@与. @必须在第一个.之前 @与.不能连在一起 ...
 - golang二维码
			
package main import ( "github.com/boombuler/barcode" "github.com/boombuler/barcode/qr ...
 - 如何在Hexo中实现自适应响应式相册功能
			
用最清晰简洁的方法整合一个响应式相册 效果 技术选型 由于我选用的主题使用了fancyBox作为图片弹出展示的框架,查看后表示很不错,能满足需要 http://fancyapps.com/fancyb ...
 - in 与 exist , not in 与 not exist
			
in和exists in 是把外表和内表作hash 连接,而exists是对外表作loop循环,每次loop循环再对内表进行查询.一直以来认为exists比in效率高的说法是不准确的. 如果查询的两个 ...
 - ML一些简单的资源
			
参考文献及推荐阅读 维基百科,http://en.wikipedia.org/wiki/K-nearest_neighbor_algorithm: 机器学习中的相似性度量,http://www.cnb ...
 - nodeJs配置相关以及JSON.parse
			
nodeJs配置相关 实际上说应用相关更好吧,我不是很懂. 今天在工作中,被同事解决了一个问题,虽然多花了一些额外时间,但长痛不如短痛嘛 实际上的问题就是npm run target等命令可以,但是n ...
 - 【前端分享】jQuery.lazyload详解(转)
			
jQuery实现图片延迟加载,不知道是否可以节省带宽呢?有人知道吗?这究竟只是一个视觉特效还是真的能延迟加载减少服务器的请求呢? <script type="text/javascri ...