emily-css 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -25,6 +25,11 @@ All notable changes to `emily-css` are documented here.
25
25
 
26
26
  ## v1.2.1 — May 2026
27
27
 
28
+ **Refactor utility generators into modules**
29
+
30
+ ---
31
+ ## v1.2.1 — May 2026
32
+
28
33
  **updated the full system to be more efficient**
29
34
 
30
35
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "emily-css",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "A config-driven utility CSS framework. Define your brand once, generate the CSS.",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -0,0 +1,40 @@
1
+ 'use strict'
2
+
3
+ function accessibilityUtilities() {
4
+ return `/* Accessibility */
5
+ .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; }
6
+ .not-sr-only { position: static; width: auto; height: auto; padding: 0; margin: 0; overflow: visible; clip: auto; white-space: normal; }
7
+ .sr-only-focusable:not(:focus):not(:focus-within) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; }
8
+ .focus-ring:focus-visible { outline: 2px solid var(--color-brand-80); outline-offset: 2px; }
9
+ .focus-ring-inset:focus-visible { outline: 2px solid var(--color-brand-80); outline-offset: -2px; }
10
+ .focus-ring-none:focus-visible { outline: none; }
11
+ .focus-visible:focus { outline: 2px solid currentColor; outline-offset: 2px; }
12
+ .focus\\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }
13
+
14
+ /* Touch target — WCAG 2.2 SC 2.5.8 minimum 24x24px hit area */
15
+ .touch-target { position: relative; }
16
+ .touch-target::before { content: ''; position: absolute; top: 50%; left: 50%; width: max(100%, 24px); height: max(100%, 24px); transform: translate(-50%, -50%); }
17
+
18
+ /* Skip link — reveals on focus for keyboard/AT users */
19
+ .skip-link { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; }
20
+ .skip-link:focus { position: fixed; top: 1rem; left: 1rem; z-index: 1070; width: auto; height: auto; padding: 0.75rem 1.25rem; background-color: #ffffff; color: #000000; font-weight: 700; text-decoration: underline; border: 2px solid currentColor; border-radius: 4px; clip: auto; white-space: normal; }
21
+
22
+ @media (prefers-reduced-motion: reduce) {
23
+ .motion-reduce\\:transition-none { transition-property: none; }
24
+ .motion-reduce\\:animate-none { animation: none; }
25
+ }
26
+ @media (prefers-reduced-motion: no-preference) {
27
+ .motion-safe\\:transition { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
28
+ }
29
+ @media (forced-colors: active) {
30
+ .forced-colors\\:outline { outline: 1px solid CanvasText; }
31
+ .forced-colors\\:outline-1 { outline: 1px solid CanvasText; }
32
+ .forced-colors\\:forced-color-adjust-none { forced-color-adjust: none; }
33
+ }
34
+
35
+ `;
36
+ }
37
+
38
+ module.exports = {
39
+ accessibilityUtilities,
40
+ };
@@ -0,0 +1,31 @@
1
+ 'use strict'
2
+
3
+ function animationUtilities() {
4
+ return `/* Animations — keyframes */
5
+ @keyframes spin {
6
+ to { transform: rotate(360deg); }
7
+ }
8
+ @keyframes ping {
9
+ 75%, 100% { transform: scale(2); opacity: 0; }
10
+ }
11
+ @keyframes pulse {
12
+ 50% { opacity: 0.5; }
13
+ }
14
+ @keyframes bounce {
15
+ 0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(0.8, 0, 1, 1); }
16
+ 50% { transform: translateY(0); animation-timing-function: cubic-bezier(0, 0, 0.2, 1); }
17
+ }
18
+
19
+ /* Animations — utilities */
20
+ .animate-none { animation: none; }
21
+ .animate-spin { animation: spin 1s linear infinite; }
22
+ .animate-ping { animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite; }
23
+ .animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
24
+ .animate-bounce { animation: bounce 1s infinite; }
25
+
26
+ `;
27
+ }
28
+
29
+ module.exports = {
30
+ animationUtilities,
31
+ };
@@ -0,0 +1,36 @@
1
+ 'use strict'
2
+
3
+ function backgroundUtilities() {
4
+ return `/* Background */
5
+ .bg-fixed { background-attachment: fixed; }
6
+ .bg-local { background-attachment: local; }
7
+ .bg-scroll { background-attachment: scroll; }
8
+ .bg-clip-border { background-clip: border-box; }
9
+ .bg-clip-padding { background-clip: padding-box; }
10
+ .bg-clip-content { background-clip: content-box; }
11
+ .bg-clip-text { -webkit-background-clip: text; background-clip: text; }
12
+ .bg-repeat { background-repeat: repeat; }
13
+ .bg-no-repeat { background-repeat: no-repeat; }
14
+ .bg-repeat-x { background-repeat: repeat-x; }
15
+ .bg-repeat-y { background-repeat: repeat-y; }
16
+ .bg-repeat-round { background-repeat: round; }
17
+ .bg-repeat-space { background-repeat: space; }
18
+ .bg-auto { background-size: auto; }
19
+ .bg-cover { background-size: cover; }
20
+ .bg-contain { background-size: contain; }
21
+ .bg-center { background-position: center; }
22
+ .bg-top { background-position: top; }
23
+ .bg-bottom { background-position: bottom; }
24
+ .bg-left { background-position: left; }
25
+ .bg-right { background-position: right; }
26
+ .bg-left-top { background-position: left top; }
27
+ .bg-left-bottom { background-position: left bottom; }
28
+ .bg-right-top { background-position: right top; }
29
+ .bg-right-bottom { background-position: right bottom; }
30
+
31
+ `;
32
+ }
33
+
34
+ module.exports = {
35
+ backgroundUtilities,
36
+ };
@@ -0,0 +1,31 @@
1
+ 'use strict'
2
+
3
+ function codeUtilities() {
4
+ return `/* Code — window chrome */
5
+ .code-window { border-radius: 8px; overflow: hidden; border: 1px solid #3c3c3c; }
6
+ .code-title-bar { background-color: #2d2d2d; padding: 0.5rem 1rem; display: flex; align-items: center; gap: 0.5rem; border-bottom: 1px solid #3c3c3c; }
7
+ .code-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
8
+ .code-dot-red { background-color: #ff5f57; }
9
+ .code-dot-yellow { background-color: #ffbd2e; }
10
+ .code-dot-green { background-color: #28c840; }
11
+ .code-filename { font-family: "Menlo", "Monaco", "Courier New", monospace; font-size: 0.85rem; color: white; margin-left: 0.5rem; }
12
+
13
+ /* Code — VSCode Dark+ token colours */
14
+ .token-tag { color: #569cd6; }
15
+ .token-attr { color: #9cdcfe; }
16
+ .token-string { color: #ce9178; }
17
+ .token-number { color: #b5cea8; }
18
+ .token-variant { color: #4ec9b0; }
19
+ .token-utility { color: #dcdcaa; }
20
+ .token-colour { color: #6a9955; }
21
+ .token-comment { color: #6a9955; opacity: 0.75; font-style: italic; }
22
+ .token-keyword { color: #c586c0; }
23
+ .token-operator { color: #d4d4d4; }
24
+ .token-line-number { color: #858585; user-select: none; padding-right: 1rem; display: inline-block; min-width: 2rem; text-align: right; }
25
+
26
+ `;
27
+ }
28
+
29
+ module.exports = {
30
+ codeUtilities,
31
+ };
@@ -0,0 +1,46 @@
1
+ 'use strict'
2
+
3
+ function displayUtilities() {
4
+ return `/* Display & Visibility */
5
+ .block { display: block; }
6
+ .inline { display: inline; }
7
+ .inline-block { display: inline-block; }
8
+ .flow-root { display: flow-root; }
9
+ .flex { display: flex; }
10
+ .inline-flex { display: inline-flex; }
11
+ .grid { display: grid; }
12
+ .inline-grid { display: inline-grid; }
13
+ .contents { display: contents; }
14
+ .list-item { display: list-item; }
15
+ .hidden { display: none; }
16
+ .table { display: table; }
17
+ .inline-table { display: inline-table; }
18
+ .table-caption { display: table-caption; }
19
+ .table-cell { display: table-cell; }
20
+ .table-column { display: table-column; }
21
+ .table-column-group { display: table-column-group; }
22
+ .table-footer-group { display: table-footer-group; }
23
+ .table-header-group { display: table-header-group; }
24
+ .table-row-group { display: table-row-group; }
25
+ .table-row { display: table-row; }
26
+ .visible { visibility: visible; }
27
+ .invisible { visibility: hidden; }
28
+ .collapse { visibility: collapse; }
29
+ .float-start { float: inline-start; }
30
+ .float-end { float: inline-end; }
31
+ .float-right { float: right; }
32
+ .float-left { float: left; }
33
+ .float-none { float: none; }
34
+ .clear-start { clear: inline-start; }
35
+ .clear-end { clear: inline-end; }
36
+ .clear-left { clear: left; }
37
+ .clear-right { clear: right; }
38
+ .clear-both { clear: both; }
39
+ .clear-none { clear: none; }
40
+
41
+ `;
42
+ }
43
+
44
+ module.exports = {
45
+ displayUtilities,
46
+ };
@@ -0,0 +1,218 @@
1
+ 'use strict'
2
+
3
+ function opacityUtilities() {
4
+ const opacities = [0, 5, 10, 20, 25, 30, 40, 50, 60, 70, 75, 80, 90, 95, 100];
5
+ let css = `/* Opacity */\n`;
6
+
7
+ opacities.forEach(op => {
8
+ css += `.opacity-${op} { opacity: ${op / 100}; }\n`;
9
+ });
10
+
11
+ css += `\n`;
12
+ return css;
13
+ }
14
+
15
+ function transitionUtilities() {
16
+ return `/* Transitions */
17
+ .transition { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
18
+ .transition-none { transition-property: none; }
19
+ .transition-colors { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
20
+ .transition-opacity { transition-property: opacity; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
21
+ .transition-transform { transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
22
+ .duration-75 { transition-duration: 75ms; }
23
+ .duration-100 { transition-duration: 100ms; }
24
+ .duration-150 { transition-duration: 150ms; }
25
+ .duration-200 { transition-duration: 200ms; }
26
+ .duration-300 { transition-duration: 300ms; }
27
+ .duration-500 { transition-duration: 500ms; }
28
+ .duration-700 { transition-duration: 700ms; }
29
+ .duration-1000 { transition-duration: 1000ms; }
30
+ .ease-linear { transition-timing-function: linear; }
31
+ .ease-in { transition-timing-function: cubic-bezier(0.4, 0, 1, 1); }
32
+ .ease-out { transition-timing-function: cubic-bezier(0, 0, 0.2, 1); }
33
+ .ease-in-out { transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
34
+ .delay-75 { transition-delay: 75ms; }
35
+ .delay-100 { transition-delay: 100ms; }
36
+ .delay-150 { transition-delay: 150ms; }
37
+ .delay-200 { transition-delay: 200ms; }
38
+ .delay-300 { transition-delay: 300ms; }
39
+ .delay-500 { transition-delay: 500ms; }
40
+
41
+ `;
42
+ }
43
+
44
+ function shadowUtilities() {
45
+ return `/* Shadows */
46
+ .shadow-none { box-shadow: none; }
47
+ .shadow-sm { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }
48
+ .shadow { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06); }
49
+ .shadow-md { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06); }
50
+ .shadow-lg { box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05); }
51
+ .shadow-xl { box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04); }
52
+ .shadow-2xl { box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25); }
53
+ .shadow-inner { box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06); }
54
+
55
+ `;
56
+ }
57
+
58
+ function blendUtilities() {
59
+ return `/* Blend Modes */
60
+ .mix-normal { mix-blend-mode: normal; }
61
+ .mix-multiply { mix-blend-mode: multiply; }
62
+ .mix-screen { mix-blend-mode: screen; }
63
+ .mix-overlay { mix-blend-mode: overlay; }
64
+ .mix-darken { mix-blend-mode: darken; }
65
+ .mix-lighten { mix-blend-mode: lighten; }
66
+ .mix-color-dodge { mix-blend-mode: color-dodge; }
67
+ .mix-color-burn { mix-blend-mode: color-burn; }
68
+ .mix-hard-light { mix-blend-mode: hard-light; }
69
+ .mix-soft-light { mix-blend-mode: soft-light; }
70
+ .mix-difference { mix-blend-mode: difference; }
71
+ .mix-exclusion { mix-blend-mode: exclusion; }
72
+ .mix-hue { mix-blend-mode: hue; }
73
+ .mix-saturation { mix-blend-mode: saturation; }
74
+ .mix-color { mix-blend-mode: color; }
75
+ .mix-luminosity { mix-blend-mode: luminosity; }
76
+
77
+ `;
78
+ }
79
+
80
+ function cursorUtilities() {
81
+ return `/* Cursors & Interactions */
82
+ .cursor-auto { cursor: auto; }
83
+ .cursor-default { cursor: default; }
84
+ .cursor-pointer { cursor: pointer; }
85
+ .cursor-wait { cursor: wait; }
86
+ .cursor-text { cursor: text; }
87
+ .cursor-move { cursor: move; }
88
+ .cursor-help { cursor: help; }
89
+ .cursor-not-allowed { cursor: not-allowed; }
90
+ .cursor-none { cursor: none; }
91
+ .cursor-context-menu { cursor: context-menu; }
92
+ .cursor-progress { cursor: progress; }
93
+ .cursor-cell { cursor: cell; }
94
+ .cursor-crosshair { cursor: crosshair; }
95
+ .cursor-vertical-text { cursor: vertical-text; }
96
+ .cursor-alias { cursor: alias; }
97
+ .cursor-copy { cursor: copy; }
98
+ .cursor-no-drop { cursor: no-drop; }
99
+ .cursor-grab { cursor: grab; }
100
+ .cursor-grabbing { cursor: grabbing; }
101
+ .cursor-all-scroll { cursor: all-scroll; }
102
+ .cursor-col-resize { cursor: col-resize; }
103
+ .cursor-row-resize { cursor: row-resize; }
104
+ .cursor-n-resize { cursor: n-resize; }
105
+ .cursor-e-resize { cursor: e-resize; }
106
+ .cursor-s-resize { cursor: s-resize; }
107
+ .cursor-w-resize { cursor: w-resize; }
108
+ .cursor-ne-resize { cursor: ne-resize; }
109
+ .cursor-nw-resize { cursor: nw-resize; }
110
+ .cursor-se-resize { cursor: se-resize; }
111
+ .cursor-sw-resize { cursor: sw-resize; }
112
+ .cursor-ew-resize { cursor: ew-resize; }
113
+ .cursor-ns-resize { cursor: ns-resize; }
114
+ .cursor-nesw-resize { cursor: nesw-resize; }
115
+ .cursor-nwse-resize { cursor: nwse-resize; }
116
+ .cursor-zoom-in { cursor: zoom-in; }
117
+ .cursor-zoom-out { cursor: zoom-out; }
118
+ .pointer-events-auto { pointer-events: auto; }
119
+ .pointer-events-none { pointer-events: none; }
120
+ .select-none { user-select: none; }
121
+ .select-text { user-select: text; }
122
+ .select-all { user-select: all; }
123
+ .select-auto { user-select: auto; }
124
+ .resize-none { resize: none; }
125
+ .resize { resize: both; }
126
+ .resize-x { resize: horizontal; }
127
+ .resize-y { resize: vertical; }
128
+ .touch-auto { touch-action: auto; }
129
+ .touch-none { touch-action: none; }
130
+ .touch-pan-x { touch-action: pan-x; }
131
+ .touch-pan-left { touch-action: pan-left; }
132
+ .touch-pan-right { touch-action: pan-right; }
133
+ .touch-pan-y { touch-action: pan-y; }
134
+ .touch-pan-up { touch-action: pan-up; }
135
+ .touch-pan-down { touch-action: pan-down; }
136
+ .touch-pinch-zoom { touch-action: pinch-zoom; }
137
+ .touch-manipulation { touch-action: manipulation; }
138
+ .isolate { isolation: isolate; }
139
+ .isolation-auto { isolation: auto; }
140
+ .will-change-auto { will-change: auto; }
141
+ .will-change-scroll { will-change: scroll-position; }
142
+ .will-change-contents { will-change: contents; }
143
+ .will-change-transform { will-change: transform; }
144
+
145
+ `;
146
+ }
147
+
148
+ function filterUtilities() {
149
+ return `/* Filters */
150
+ .filter-none { filter: none; }
151
+ .blur-none { filter: blur(0); }
152
+ .blur-sm { filter: blur(4px); }
153
+ .blur { filter: blur(8px); }
154
+ .blur-md { filter: blur(12px); }
155
+ .blur-lg { filter: blur(16px); }
156
+ .blur-xl { filter: blur(24px); }
157
+ .brightness-0 { filter: brightness(0); }
158
+ .brightness-50 { filter: brightness(.5); }
159
+ .brightness-75 { filter: brightness(.75); }
160
+ .brightness-90 { filter: brightness(.9); }
161
+ .brightness-100 { filter: brightness(1); }
162
+ .brightness-110 { filter: brightness(1.1); }
163
+ .brightness-125 { filter: brightness(1.25); }
164
+ .brightness-150 { filter: brightness(1.5); }
165
+ .brightness-200 { filter: brightness(2); }
166
+ .contrast-0 { filter: contrast(0); }
167
+ .contrast-50 { filter: contrast(.5); }
168
+ .contrast-75 { filter: contrast(.75); }
169
+ .contrast-100 { filter: contrast(1); }
170
+ .contrast-125 { filter: contrast(1.25); }
171
+ .contrast-150 { filter: contrast(1.5); }
172
+ .contrast-200 { filter: contrast(2); }
173
+ .grayscale-0 { filter: grayscale(0); }
174
+ .grayscale { filter: grayscale(100%); }
175
+ .invert-0 { filter: invert(0); }
176
+ .invert { filter: invert(100%); }
177
+ .sepia-0 { filter: sepia(0); }
178
+ .sepia { filter: sepia(100%); }
179
+ .saturate-0 { filter: saturate(0); }
180
+ .saturate-50 { filter: saturate(.5); }
181
+ .saturate-100 { filter: saturate(1); }
182
+ .saturate-150 { filter: saturate(1.5); }
183
+ .saturate-200 { filter: saturate(2); }
184
+ .hue-rotate-0 { filter: hue-rotate(0deg); }
185
+ .hue-rotate-15 { filter: hue-rotate(15deg); }
186
+ .hue-rotate-30 { filter: hue-rotate(30deg); }
187
+ .hue-rotate-60 { filter: hue-rotate(60deg); }
188
+ .hue-rotate-90 { filter: hue-rotate(90deg); }
189
+ .hue-rotate-180 { filter: hue-rotate(180deg); }
190
+ .-hue-rotate-30 { filter: hue-rotate(-30deg); }
191
+ .-hue-rotate-60 { filter: hue-rotate(-60deg); }
192
+ .-hue-rotate-90 { filter: hue-rotate(-90deg); }
193
+
194
+ `;
195
+ }
196
+
197
+ function backdropUtilities() {
198
+ return `/* Backdrop Filters */
199
+ .backdrop-blur-none { backdrop-filter: blur(0); }
200
+ .backdrop-blur-sm { backdrop-filter: blur(4px); }
201
+ .backdrop-blur { backdrop-filter: blur(8px); }
202
+ .backdrop-blur-md { backdrop-filter: blur(12px); }
203
+ .backdrop-blur-lg { backdrop-filter: blur(16px); }
204
+ .backdrop-blur-xl { backdrop-filter: blur(24px); }
205
+ .backdrop-blur-2xl { backdrop-filter: blur(40px); }
206
+
207
+ `;
208
+ }
209
+
210
+ module.exports = {
211
+ opacityUtilities,
212
+ transitionUtilities,
213
+ shadowUtilities,
214
+ blendUtilities,
215
+ cursorUtilities,
216
+ filterUtilities,
217
+ backdropUtilities,
218
+ };
@@ -0,0 +1,25 @@
1
+ 'use strict'
2
+
3
+ function formUtilities() {
4
+ return `/* Forms */
5
+ .appearance-none { appearance: none; }
6
+ .caret-transparent { caret-color: transparent; }
7
+ .caret-current { caret-color: currentColor; }
8
+ .placeholder-transparent::placeholder { color: transparent; }
9
+ .placeholder-current::placeholder { color: currentColor; }
10
+ .autofill\\:bg-transparent:autofill { background-color: transparent !important; }
11
+ .autofill\\:text-current:autofill { color: currentColor !important; }
12
+ .accent-current { accent-color: currentColor; }
13
+ .checked\\:bg-current:checked { background-color: currentColor; }
14
+ .indeterminate\\:bg-current:indeterminate { background-color: currentColor; }
15
+ .default\\:ring-0:default { box-shadow: 0 0 0 0px transparent; }
16
+ .disabled\\:opacity-50:disabled { opacity: 0.5; }
17
+ .enabled\\:opacity-100:enabled { opacity: 1; }
18
+ .read-only\\:bg-gray-100:read-only { background-color: rgb(243, 244, 246); }
19
+
20
+ `;
21
+ }
22
+
23
+ module.exports = {
24
+ formUtilities,
25
+ };
@@ -0,0 +1,45 @@
1
+ 'use strict'
2
+
3
+ const { displayUtilities } = require('./display');
4
+ const { sizingUtilities } = require('./sizing');
5
+ const { positioningUtilities } = require('./positioning');
6
+ const { overflowUtilities } = require('./overflow');
7
+ const { opacityUtilities, transitionUtilities, shadowUtilities, blendUtilities, cursorUtilities, filterUtilities, backdropUtilities } = require('./effects');
8
+ const { transformUtilities } = require('./transforms');
9
+ const { ringUtilities } = require('./rings');
10
+ const { objectUtilities, tableListUtilities, verticalAlignUtilities, contentScrollUtilities, containerUtilities, spaceUtilities, divideUtilities } = require('./layout');
11
+ const { svgUtilities } = require('./svg');
12
+ const { formUtilities } = require('./forms');
13
+ const { accessibilityUtilities } = require('./accessibility');
14
+ const { codeUtilities } = require('./code');
15
+ const { animationUtilities } = require('./animation');
16
+ const { backgroundUtilities } = require('./background');
17
+
18
+ module.exports = {
19
+ displayUtilities,
20
+ sizingUtilities,
21
+ positioningUtilities,
22
+ overflowUtilities,
23
+ opacityUtilities,
24
+ transitionUtilities,
25
+ transformUtilities,
26
+ shadowUtilities,
27
+ ringUtilities,
28
+ objectUtilities,
29
+ tableListUtilities,
30
+ svgUtilities,
31
+ formUtilities,
32
+ verticalAlignUtilities,
33
+ contentScrollUtilities,
34
+ blendUtilities,
35
+ cursorUtilities,
36
+ accessibilityUtilities,
37
+ containerUtilities,
38
+ codeUtilities,
39
+ animationUtilities,
40
+ backdropUtilities,
41
+ spaceUtilities,
42
+ divideUtilities,
43
+ backgroundUtilities,
44
+ filterUtilities,
45
+ };
@@ -0,0 +1,138 @@
1
+ 'use strict'
2
+
3
+ function objectUtilities() {
4
+ return `/* Object Fit & Position */
5
+ .object-contain { object-fit: contain; }
6
+ .object-cover { object-fit: cover; }
7
+ .object-fill { object-fit: fill; }
8
+ .object-none { object-fit: none; }
9
+ .object-scale-down { object-fit: scale-down; }
10
+ .object-center { object-position: center; }
11
+ .object-top { object-position: top; }
12
+ .object-bottom { object-position: bottom; }
13
+ .object-left { object-position: left; }
14
+ .object-right { object-position: right; }
15
+ .object-top-left { object-position: top left; }
16
+ .object-top-right { object-position: top right; }
17
+ .object-bottom-left { object-position: bottom left; }
18
+ .object-bottom-right { object-position: bottom right; }
19
+
20
+ `;
21
+ }
22
+
23
+ function tableListUtilities() {
24
+ return `/* Tables & Lists */
25
+ .border-collapse { border-collapse: collapse; }
26
+ .border-separate { border-collapse: separate; }
27
+ .table-auto { table-layout: auto; }
28
+ .table-fixed { table-layout: fixed; }
29
+ .caption-top { caption-side: top; }
30
+ .caption-bottom { caption-side: bottom; }
31
+ .list-none { list-style-type: none; }
32
+ .list-disc { list-style-type: disc; }
33
+ .list-decimal { list-style-type: decimal; }
34
+ .list-inside { list-style-position: inside; }
35
+ .list-outside { list-style-position: outside; }
36
+
37
+ `;
38
+ }
39
+
40
+ function verticalAlignUtilities() {
41
+ return `/* Vertical Align */
42
+ .align-baseline { vertical-align: baseline; }
43
+ .align-top { vertical-align: top; }
44
+ .align-middle { vertical-align: middle; }
45
+ .align-bottom { vertical-align: bottom; }
46
+ .align-text-top { vertical-align: text-top; }
47
+ .align-text-bottom { vertical-align: text-bottom; }
48
+ .align-sub { vertical-align: sub; }
49
+ .align-super { vertical-align: super; }
50
+
51
+ `;
52
+ }
53
+
54
+ function contentScrollUtilities() {
55
+ return `/* Content Visibility & Scroll */
56
+ .content-normal { content-visibility: normal; }
57
+ .content-hidden { content-visibility: hidden; }
58
+ .content-auto { content-visibility: auto; }
59
+ .scroll-auto { scroll-behavior: auto; }
60
+ .scroll-smooth { scroll-behavior: smooth; }
61
+ .scroll-m-0 { scroll-margin: 0; }
62
+ .snap-none { scroll-snap-type: none; }
63
+ .snap-x { scroll-snap-type: x var(--emily-scroll-snap-strictness); }
64
+ .snap-y { scroll-snap-type: y var(--emily-scroll-snap-strictness); }
65
+ .snap-both { scroll-snap-type: both var(--emily-scroll-snap-strictness); }
66
+ .snap-mandatory { --emily-scroll-snap-strictness: mandatory; }
67
+ .snap-proximity { --emily-scroll-snap-strictness: proximity; }
68
+ .snap-start { scroll-snap-align: start; }
69
+ .snap-center { scroll-snap-align: center; }
70
+ .snap-end { scroll-snap-align: end; }
71
+ .snap-align-none { scroll-snap-align: none; }
72
+
73
+ `;
74
+ }
75
+
76
+ function containerUtilities() {
77
+ return `/* Container Queries */
78
+ .container-type-inline { container-type: inline-size; }
79
+ .container-type-size { container-type: size; }
80
+ .container-type-normal { container-type: normal; }
81
+ .container-name-none { container-name: none; }
82
+
83
+ `;
84
+ }
85
+
86
+ function spaceUtilities(spacing) {
87
+ let css = `/* Space Between */\n`;
88
+ Object.entries(spacing).forEach(([key, value]) => {
89
+ const escaped = key.replace(/\./g, '\\.');
90
+ css += `.space-x-${escaped} > * + * { margin-left: ${value}; }\n`;
91
+ css += `.space-y-${escaped} > * + * { margin-top: ${value}; }\n`;
92
+ css += `.-space-x-${escaped} > * + * { margin-left: -${value}; }\n`;
93
+ css += `.-space-y-${escaped} > * + * { margin-top: -${value}; }\n`;
94
+ });
95
+ css += `.space-x-auto > * + * { margin-left: auto; }\n`;
96
+ css += `.space-y-auto > * + * { margin-top: auto; }\n`;
97
+ css += `\n`;
98
+ return css;
99
+ }
100
+
101
+ function divideUtilities(spacing, colours) {
102
+ let css = `/* Divide */\n`;
103
+ // Widths
104
+ css += `.divide-x > * + * { border-left-width: 1px; border-left-style: solid; }\n`;
105
+ css += `.divide-y > * + * { border-top-width: 1px; border-top-style: solid; }\n`;
106
+ css += `.divide-x-0 > * + * { border-left-width: 0px; }\n`;
107
+ css += `.divide-y-0 > * + * { border-top-width: 0px; }\n`;
108
+ css += `.divide-x-2 > * + * { border-left-width: 2px; border-left-style: solid; }\n`;
109
+ css += `.divide-y-2 > * + * { border-top-width: 2px; border-top-style: solid; }\n`;
110
+ css += `.divide-x-4 > * + * { border-left-width: 4px; border-left-style: solid; }\n`;
111
+ css += `.divide-y-4 > * + * { border-top-width: 4px; border-top-style: solid; }\n`;
112
+ // Styles
113
+ css += `.divide-solid > * + * { border-style: solid; }\n`;
114
+ css += `.divide-dashed > * + * { border-style: dashed; }\n`;
115
+ css += `.divide-dotted > * + * { border-style: dotted; }\n`;
116
+ css += `.divide-none > * + * { border-style: none; }\n`;
117
+ // Colours
118
+ Object.entries(colours).forEach(([colourName, shades]) => {
119
+ Object.entries(shades).forEach(([shade]) => {
120
+ css += `.divide-${colourName}-${shade} > * + * { border-color: var(--color-${colourName}-${shade}); }\n`;
121
+ });
122
+ });
123
+ css += `.divide-white > * + * { border-color: #FAFAFA; }\n`;
124
+ css += `.divide-black > * + * { border-color: #111110; }\n`;
125
+ css += `.divide-transparent > * + * { border-color: transparent; }\n`;
126
+ css += `\n`;
127
+ return css;
128
+ }
129
+
130
+ module.exports = {
131
+ objectUtilities,
132
+ tableListUtilities,
133
+ verticalAlignUtilities,
134
+ contentScrollUtilities,
135
+ containerUtilities,
136
+ spaceUtilities,
137
+ divideUtilities,
138
+ };
@@ -0,0 +1,36 @@
1
+ 'use strict'
2
+
3
+ function overflowUtilities() {
4
+ return `/* Overflow & Clipping */
5
+ .overflow-auto { overflow: auto; }
6
+ .overflow-hidden { overflow: hidden; }
7
+ .overflow-clip { overflow: clip; }
8
+ .overflow-visible { overflow: visible; }
9
+ .overflow-scroll { overflow: scroll; }
10
+ .overflow-x-auto { overflow-x: auto; }
11
+ .overflow-x-hidden { overflow-x: hidden; }
12
+ .overflow-x-clip { overflow-x: clip; }
13
+ .overflow-x-visible { overflow-x: visible; }
14
+ .overflow-x-scroll { overflow-x: scroll; }
15
+ .overflow-y-auto { overflow-y: auto; }
16
+ .overflow-y-hidden { overflow-y: hidden; }
17
+ .overflow-y-clip { overflow-y: clip; }
18
+ .overflow-y-visible { overflow-y: visible; }
19
+ .overflow-y-scroll { overflow-y: scroll; }
20
+ .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
21
+ .text-ellipsis { text-overflow: ellipsis; }
22
+ .text-clip { text-overflow: clip; }
23
+ .line-clamp-none { overflow: visible; display: block; -webkit-box-orient: horizontal; -webkit-line-clamp: unset; }
24
+ .line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
25
+ .line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
26
+ .line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
27
+ .line-clamp-4 { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
28
+ .line-clamp-5 { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
29
+ .line-clamp-6 { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
30
+
31
+ `;
32
+ }
33
+
34
+ module.exports = {
35
+ overflowUtilities,
36
+ };