Skip to content
This repository was archived by the owner on May 11, 2024. It is now read-only.

Commit b36af51

Browse files
committed
v1.2.1 Remove custom components
1 parent b5ffad7 commit b36af51

6 files changed

+7
-130
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Twinkle CSS
22

3-
This is a minified but unpurged build of Tailwind CSS 2.0 with autoprefixer, Inter font, some extra variants and common components from [learnawesome.org](https://learnawesome.org). See `tailwind.config.js`.
3+
This is a minified but unpurged build of Tailwind CSS 2.0.2 with autoprefixer, Inter font, and plugins like aspect-ratio, forms, typography etc. See `tailwind.config.js`.
44

55
Uncompressed, this turns out to be about 3.2 MB. But when served via a CDN that supports Brotli-compression (eg: unpkg.com or Cloudflare), this is less than 250KB in size. This is a bit heavy but it becomes much more easier to work on multiple sites that cannot use custom builds which requires NodeJS and NPM.
66

77
# Usage
88

99
```
1010
<link rel="stylesheet" href="https://rsms.me/inter/inter.css">
11-
<link rel="stylesheet" href="https://unpkg.com/[email protected].0/twinkle.min.css">
11+
<link rel="stylesheet" href="https://unpkg.com/[email protected].1/twinkle.min.css">
1212
```
1313

1414
# Build
@@ -17,4 +17,4 @@ Run `npm install` and then `npm run build` to generate a local `twinkle.min.css`
1717

1818
# Customize
1919

20-
If you want to extract your own component classes, add them in `myapp.css` before the `@tailwind utilities;` statement. And if you want to add/remove Tailwind plugins, customize the default theme or breakpoints or add/remove variants, modify `tailwind.config.js`.
20+
If you want to add your own component classes, add them in `myapp.css`. And if you want to add/remove Tailwind plugins, customize the default theme or breakpoints or add/remove variants, modify `tailwind.config.js`.

myapp.css

-122
Original file line numberDiff line numberDiff line change
@@ -1,125 +1,3 @@
11
@tailwind base;
22
@tailwind components;
33
@tailwind utilities;
4-
5-
@layer components {
6-
7-
.btn {
8-
@apply relative inline-flex items-center px-4 py-2 border border-transparent text-sm leading-5 font-medium rounded-md;
9-
}
10-
11-
.btn-primary {
12-
@apply text-white bg-indigo-600 hover:bg-indigo-500 focus:outline-none focus:ring-indigo-200 focus:border-indigo-700;
13-
}
14-
15-
form.simple-form h1 {
16-
@apply font-semibold text-xl mb-4;
17-
}
18-
19-
form.simple-form ul {
20-
@apply bg-red-200 border-2 border-red-600 mt-4 mb-4 p-2;
21-
}
22-
23-
form.simple-form ul li {
24-
@apply text-red-700;
25-
}
26-
27-
form.simple-form label {
28-
@apply block mt-2;
29-
}
30-
31-
form.simple-form input[type=text], form.simple-form input[type=url], form.simple-form input[type=email] {
32-
@apply w-full px-2 py-1 mb-4 text-gray-900 bg-gray-200 rounded focus:ring focus:border-gray-500;
33-
}
34-
35-
form.simple-form-inline input[type=text] {
36-
@apply px-2 py-1 mb-4 text-gray-900 bg-gray-200 rounded focus:ring focus:border-gray-500;
37-
}
38-
39-
form.simple-form input[type=number] {
40-
@apply w-full px-2 py-1 mb-4 text-gray-900 bg-gray-200 rounded focus:ring focus:border-gray-500;
41-
}
42-
43-
form.simple-form textarea {
44-
@apply w-full px-2 py-1 mb-4 text-gray-900 bg-gray-200 rounded;
45-
}
46-
47-
form.simple-form select {
48-
@apply w-full px-2 py-1 mb-4 text-gray-900 bg-gray-200 rounded;
49-
}
50-
51-
form.simple-form-inline select {
52-
@apply px-2 py-1 mb-4 text-gray-900 bg-gray-200 rounded;
53-
}
54-
55-
form.simple-form input[type=submit] {
56-
@apply btn btn-primary mt-4;
57-
}
58-
59-
.card {
60-
@apply m-4 p-6 bg-white rounded-lg shadow-xl;
61-
}
62-
63-
.article {
64-
@apply max-w-4xl mx-auto bg-white overflow-hidden shadow-md rounded-lg p-6;
65-
66-
h1,h2,h3,h4,h5,h6 {
67-
@apply mb-4;
68-
}
69-
70-
p {
71-
@apply text-gray-600 mt-4 mb-4 leading-loose;
72-
}
73-
74-
img {
75-
76-
}
77-
78-
blockquote {
79-
@apply max-w-2xl bg-gray-200 border-2 border-blue-400 rounded p-2 my-4 mx-auto;
80-
}
81-
82-
a {
83-
@apply text-blue-600 underline;
84-
}
85-
86-
a:hover {
87-
@apply text-blue-800;
88-
}
89-
90-
a.cta {
91-
@apply block max-w-lg mx-auto bg-indigo-600 text-white px-4 py-3 underline rounded mb-8 text-center;
92-
}
93-
94-
a.cta:hover {
95-
@apply bg-indigo-800;
96-
}
97-
}
98-
99-
main.pattern {
100-
background-color: #f4f1fa;
101-
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='152' height='152' viewBox='0 0 152 152'%3E%3Cg fill-rule='evenodd'%3E%3Cg id='temple' fill='%23e7e4ed' fill-opacity='0.4'%3E%3Cpath d='M152 150v2H0v-2h28v-8H8v-20H0v-2h8V80h42v20h20v42H30v8h90v-8H80v-42h20V80h42v40h8V30h-8v40h-42V50H80V8h40V0h2v8h20v20h8V0h2v150zm-2 0v-28h-8v20h-20v8h28zM82 30v18h18V30H82zm20 18h20v20h18V30h-20V10H82v18h20v20zm0 2v18h18V50h-18zm20-22h18V10h-18v18zm-54 92v-18H50v18h18zm-20-18H28V82H10v38h20v20h38v-18H48v-20zm0-2V82H30v18h18zm-20 22H10v18h18v-18zm54 0v18h38v-20h20V82h-18v20h-20v20H82zm18-20H82v18h18v-18zm2-2h18V82h-18v18zm20 40v-18h18v18h-18zM30 0h-2v8H8v20H0v2h8v40h42V50h20V8H30V0zm20 48h18V30H50v18zm18-20H48v20H28v20H10V30h20V10h38v18zM30 50h18v18H30V50zm-2-40H10v18h18V10z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
102-
}
103-
104-
.danger {
105-
@apply bg-red-500;
106-
}
107-
108-
.notice {
109-
@apply bg-yellow-500;
110-
}
111-
112-
.success {
113-
@apply bg-green-500
114-
}
115-
116-
.warning {
117-
@apply bg-yellow-500;
118-
}
119-
120-
.info {
121-
@apply bg-gray-300;
122-
}
123-
124-
125-
}

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "twinklecss",
3-
"version": "1.2.0",
4-
"description": "A minified but unpurged build of Tailwind CSS 2.0 with autoprefixer, Inter font, some extra variants and common components from learnawesome.org",
3+
"version": "1.2.1",
4+
"description": "A minified but unpurged build of Tailwind CSS 2.0.2 with autoprefixer, Inter font, and plugins like aspect-ratio, forms, typography",
55
"main": "index.js",
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1",

tailwind.config.js

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ module.exports = {
1010
},
1111
},
1212
variants: {
13-
display: ['responsive', 'group-hover','group-focus']
1413
},
1514
plugins: [
1615
require('@tailwindcss/forms'),

twinkle.min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)