[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. ...
随机推荐
- Gym-101915J The Volcano Eruption 计算几何
题面 题意:给你一个矩阵,然后有很多的圆,这些圆可能相交着,一个或者几个就导致这个矩形被分割开了,就是从最下面的边到上面的边,连线被这些圆阻隔了,每一堆圆当做一个阻碍,问一共有几个阻碍 题解:看起来好 ...
- Unity3d gameObject
using UnityEngine; using System.Collections; public class test : MonoBehaviour { //print只能在MonoBehav ...
- Codeforces Round #450
Find Extra One Solution Position in Fraction Solution Remove Extra One f[i]表示删掉i能增加的record数目 从左到右处理, ...
- 第六课: - GroupBy函数
第 6 课 让我们看一看 groupby 函数. In [1]: # Import libraries import pandas as pd import sys In [2]: print(' ...
- 利用JavaScript制作简易日历
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"> <head> <met ...
- javascript中天气接口案例
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- OpenCV_Python教程 系列!
这个是作者的总结系列!赞一个! 原文链接:http://blog.csdn.net/sunny2038/article/details/9057415 在python中使用OpenCV:http:// ...
- 杭电1003 Max Sum TLE
这一题目是要求连续子序列的最大和,所以在看到题目的一瞬间就想到的是把所有情况列举出来,再两个两个的比较,取最大的(即为更新最大值的意思),这样的思路很简单,但是会超时,时间复杂度为O(n^3),因为有 ...
- html img加载不同大小图像速度
最近要想法提高网页的性能,在查看图片加载时,产生了试验的想法.一直以来都没有太去深究,还是挖掘一下的好. 很简单的试验,<img>加载两个图像,一个2.3MB,5000*5000,一个22 ...
- 那些年 IE 下踩过的坑
1年过去了,换了一个不用兼容IE8一下浏览器的工作了! 1.:before,:after(伪类) 所有主流浏览器都支持 :before 选择器. 注释:对于 IE8 及更早版本中的 :before,必 ...