Skip to content

Commit fc41a05

Browse files
committed
Fixed some issues with the latest version of purgeTSS
1 parent d6db924 commit fc41a05

File tree

14 files changed

+2172
-724
lines changed

14 files changed

+2172
-724
lines changed

.eslintrc

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,45 @@
11
{
22
"extends": [
33
"axway/env-alloy"
4-
]
4+
],
5+
"globals": {
6+
// declare globals here...
7+
},
8+
"rules": {
9+
// project specific overrides...
10+
"curly": [
11+
"warn",
12+
"multi-line"
13+
],
14+
// /* eslint-disable computed-property-spacing */
15+
"computed-property-spacing": [
16+
0,
17+
"never"
18+
],
19+
"array-bracket-spacing": [
20+
0,
21+
"never"
22+
],
23+
// /* Missing space before function parentheses.eslintspace-before-function-paren */
24+
"space-before-function-paren": [
25+
0,
26+
"never"
27+
],
28+
"alloy/no-unused-vars": [
29+
0,
30+
"never"
31+
],
32+
"security/detect-non-literal-require": [
33+
0,
34+
"never"
35+
],
36+
"no-undef": [
37+
0,
38+
{
39+
"ignoreBuiltinGlobals": [
40+
"$model"
41+
]
42+
}
43+
]
44+
}
545
}

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"i18n/": true,
55
"platform/": true,
66
"Resources/": true,
7-
"node_modules/": true,
7+
"node_modules/": false,
88
"package-lock.json": true
99
},
1010
"search.exclude": {

app/styles/app.tss

Lines changed: 76 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -41,137 +41,141 @@
4141
}
4242

4343
// Custom Tailwind Styles
44-
'.-ml-1': { left: -4 }
45-
'.-mr-1': { right: -4 }
46-
'.-mx-1': { right: -4, left: -4 }
4744
'ImageView[platform=ios]': { hires: true }
4845
'View': { width: Ti.UI.SIZE, height: Ti.UI.SIZE }
4946
'Window': { backgroundColor: '#ffffff' }
47+
'.bg-white': { backgroundColor: '#ffffff' }
48+
'.bg-indigo-500': { backgroundColor: '#6366f1' }
5049
'.bg-blue-200': { backgroundColor: '#bfdbfe' }
5150
'.bg-blue-500': { backgroundColor: '#3b82f6' }
5251
'.bg-blue-700': { backgroundColor: '#1d4ed8' }
5352
'.bg-blue-900': { backgroundColor: '#1e3a8a' }
53+
'.bg-green-500': { backgroundColor: '#22c55e' }
54+
'.bg-orange-100': { backgroundColor: '#ffedd5' }
55+
'.bg-gray-50': { backgroundColor: '#fafafa' }
5456
'.bg-gray-100': { backgroundColor: '#f4f4f5' }
5557
'.bg-gray-200': { backgroundColor: '#e4e4e7' }
5658
'.bg-gray-300': { backgroundColor: '#d4d4d8' }
57-
'.bg-gray-50': { backgroundColor: '#fafafa' }
5859
'.bg-gray-500': { backgroundColor: '#71717a' }
5960
'.bg-gray-800': { backgroundColor: '#27272a' }
6061
'.bg-gray-900': { backgroundColor: '#18181b' }
61-
'.bg-green-500': { backgroundColor: '#22c55e' }
62-
'.bg-indigo-500': { backgroundColor: '#6366f1' }
63-
'.bg-orange-100': { backgroundColor: '#ffedd5' }
64-
'.bg-white': { backgroundColor: '#ffffff' }
65-
'.block': { visible: true }
66-
'.border-2': { borderWidth: 2 }
67-
'.border-4': { borderWidth: 4 }
6862
'.border-blue-600': { borderColor: '#2563eb' }
6963
'.border-blue-800': { borderColor: '#1e40af' }
7064
'.border-gray-400': { borderColor: '#a1a1aa' }
7165
'.border-gray-500': { borderColor: '#71717a' }
66+
'.rounded-8': { borderRadius: 16 }
67+
'.rounded-10': { borderRadius: 20 }
68+
'.rounded-12': { borderRadius: 24 }
69+
'.rounded-16': { borderRadius: 32 }
70+
'.rounded': { borderRadius: 4 }
71+
'.rounded-md': { borderRadius: 6 }
72+
'.rounded-lg': { borderRadius: 8 }
73+
'.border-2': { borderWidth: 2 }
74+
'.border-4': { borderWidth: 4 }
7275
'.clip-enabled[platform=ios]': { clipMode: Ti.UI.iOS.CLIP_MODE_ENABLED }
73-
'.font-bold': { font: { fontWeight: 'bold' } }
76+
'.block': { visible: true }
77+
'.text-xs': { font: { fontSize: 12 } }
78+
'.text-sm': { font: { fontSize: 14 } }
79+
'.text-base': { font: { fontSize: 16 } }
80+
'.text-xl': { font: { fontSize: 20 } }
81+
'.text-2xl': { font: { fontSize: 24 } }
82+
'.text-3xl': { font: { fontSize: 30 } }
83+
'.text-4xl': { font: { fontSize: 36 } }
84+
'.italic': { font: { fontStyle: 'italic' } }
85+
'.font-thin': { font: { fontWeight: 'thin' } }
7486
'.font-normal': { font: { fontWeight: 'normal' } }
7587
'.font-semibold': { font: { fontWeight: 'semibold' } }
76-
'.font-thin': { font: { fontWeight: 'thin' } }
88+
'.font-bold': { font: { fontWeight: 'bold' } }
89+
'.h-6': { height: 24 }
90+
'.h-8': { height: 32 }
7791
'.h-10': { height: 40 }
7892
'.h-12': { height: 48 }
7993
'.h-16': { height: 64 }
8094
'.h-20': { height: 80 }
81-
'.h-6': { height: 24 }
82-
'.h-8': { height: 32 }
83-
'.h-auto': { height: Ti.UI.SIZE }
8495
'.h-px': { height: '1px' }
96+
'.h-full': { height: '100%' }
97+
'.h-auto': { height: Ti.UI.SIZE }
98+
'.vertical': { layout: 'vertical' }
8599
'.horizontal': { layout: 'horizontal' }
86-
'.italic': { font: { fontStyle: 'italic' } }
87100
'.m-3': { top: 12, right: 12, bottom: 12, left: 12 }
88101
'.m-4': { top: 16, right: 16, bottom: 16, left: 16 }
102+
'.my-2': { top: 8, bottom: 8 }
103+
'.my-10': { top: 40, bottom: 40 }
104+
'.mx-0': { right: 0, left: 0 }
105+
'.mx-2': { right: 8, left: 8 }
106+
'.mx-3': { right: 12, left: 12 }
107+
'.mx-4': { right: 16, left: 16 }
108+
'.mx-6': { right: 24, left: 24 }
109+
'.mx-8': { right: 32, left: 32 }
110+
'.mx-10': { right: 40, left: 40 }
111+
'.mt-0': { top: 0 }
112+
'.mt-1': { top: 4 }
113+
'.mt-2': { top: 8 }
114+
'.mt-3': { top: 12 }
115+
'.mt-4': { top: 16 }
116+
'.mr-0': { right: 0 }
117+
'.mr-3': { right: 12 }
118+
'.mr-4': { right: 16 }
89119
'.mb-1': { bottom: 4 }
90120
'.mb-3': { bottom: 12 }
91121
'.mb-4': { bottom: 16 }
92122
'.mb-8': { bottom: 32 }
93123
'.ml-0': { left: 0 }
94124
'.ml-1': { left: 4 }
95-
'.ml-2': { left: 8 }
96125
'.ml-3': { left: 12 }
97126
'.ml-4': { left: 16 }
98-
'.mr-0': { right: 0 }
99-
'.mr-2': { right: 8 }
100-
'.mr-3': { right: 12 }
101-
'.mr-4': { right: 16 }
102-
'.mt-0': { top: 0 }
103-
'.mt-1': { top: 4 }
104-
'.mt-2': { top: 8 }
105-
'.mt-3': { top: 12 }
106-
'.mt-4': { top: 16 }
107-
'.mx-0': { right: 0, left: 0 }
108-
'.mx-10': { right: 40, left: 40 }
109-
'.mx-2': { right: 8, left: 8 }
110-
'.mx-3': { right: 12, left: 12 }
111-
'.mx-4': { right: 16, left: 16 }
112-
'.mx-8': { right: 32, left: 32 }
113-
'.my-2': { top: 8, bottom: 8 }
114-
'.opacity-100': { opacity: 1 }
127+
'.-mx-1': { left: -4, right: -4 }
128+
'.-mr-1': { right: -4 }
129+
'.-ml-1': { left: -4 }
115130
'.opacity-25': { opacity: 0.25 }
116131
'.opacity-50': { opacity: 0.5 }
117132
'.opacity-75': { opacity: 0.75 }
133+
'.opacity-100': { opacity: 1 }
118134
'.pl-2': { padding: { left: 8 } }
119-
'.rounded': { borderRadius: 4 }
120-
'.rounded-10': { borderRadius: 20 }
121-
'.rounded-12': { borderRadius: 24 }
122-
'.rounded-16': { borderRadius: 32 }
123-
'.rounded-8': { borderRadius: 16 }
124-
'.rounded-lg': { borderRadius: 8 }
125-
'.rounded-md': { borderRadius: 6 }
135+
'.shadow-xs': { viewShadowOffset: { x: 0, y: 0 }, viewShadowRadius: 1, viewShadowColor: '#80000000' }
136+
'.shadow-sm': { viewShadowOffset: { x: 0, y: 1 }, viewShadowRadius: 1, viewShadowColor: '#80000000' }
126137
'.shadow': { viewShadowOffset: { x: 0, y: 2 }, viewShadowRadius: 2, viewShadowColor: '#80000000' }
138+
'.shadow-md': { viewShadowOffset: { x: 0, y: 4 }, viewShadowRadius: 4, viewShadowColor: '#80000000' }
139+
'.shadow-lg': { viewShadowOffset: { x: 0, y: 8 }, viewShadowRadius: 8, viewShadowColor: '#80000000' }
140+
'.shadow-xl': { viewShadowOffset: { x: 0, y: 12 }, viewShadowRadius: 12, viewShadowColor: '#80000000' }
127141
'.shadow-2xl': { viewShadowOffset: { x: 0, y: 16 }, viewShadowRadius: 16, viewShadowColor: '#80000000' }
128142
'.shadow-inner': { viewShadowOffset: { x: 0, y: 0 }, viewShadowRadius: null, viewShadowColor: null }
129-
'.shadow-lg': { viewShadowOffset: { x: 0, y: 8 }, viewShadowRadius: 8, viewShadowColor: '#80000000' }
130-
'.shadow-md': { viewShadowOffset: { x: 0, y: 4 }, viewShadowRadius: 4, viewShadowColor: '#80000000' }
131-
'.shadow-none': { viewShadowOffset: { x: 0, y: 0 }, viewShadowRadius: null, viewShadowColor: null }
132143
'.shadow-outline': { viewShadowOffset: { x: 0, y: 0 }, viewShadowRadius: 2, viewShadowColor: '#80000000' }
133-
'.shadow-sm': { viewShadowOffset: { x: 0, y: 1 }, viewShadowRadius: 1, viewShadowColor: '#80000000' }
134-
'.shadow-xl': { viewShadowOffset: { x: 0, y: 12 }, viewShadowRadius: 12, viewShadowColor: '#80000000' }
135-
'.shadow-xs': { viewShadowOffset: { x: 0, y: 0 }, viewShadowRadius: 1, viewShadowColor: '#80000000' }
136-
'.text-2xl': { font: { fontSize: 24 } }
137-
'.text-3xl': { font: { fontSize: 30 } }
138-
'.text-4xl': { font: { fontSize: 36 } }
139-
'.text-base': { font: { fontSize: 16 } }
140-
'.text-blue-700': { color: '#1d4ed8' }
144+
'.text-left': { textAlign: Ti.UI.TEXT_ALIGNMENT_LEFT }
145+
'.text-right': { textAlign: Ti.UI.TEXT_ALIGNMENT_RIGHT }
141146
'.text-center': { textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER }
147+
'.text-white': { color: '#ffffff' }
148+
'.text-purple-500': { color: '#a855f7' }
149+
'.text-indigo-700': { color: '#4338ca' }
150+
'.text-blue-700': { color: '#1d4ed8' }
151+
'.text-red-600': { color: '#dc2626' }
152+
'.text-red-700': { color: '#b91c1c' }
142153
'.text-gray-200': { color: '#e4e4e7' }
143154
'.text-gray-500': { color: '#71717a' }
144155
'.text-gray-600': { color: '#52525b' }
145156
'.text-gray-700': { color: '#3f3f46' }
146157
'.text-gray-800': { color: '#27272a' }
147158
'.text-gray-900': { color: '#18181b' }
148-
'.text-indigo-700': { color: '#4338ca' }
149-
'.text-left': { textAlign: Ti.UI.TEXT_ALIGNMENT_LEFT }
150-
'.text-purple-500': { color: '#a855f7' }
151-
'.text-red-600': { color: '#dc2626' }
152-
'.text-red-700': { color: '#b91c1c' }
153-
'.text-right': { textAlign: Ti.UI.TEXT_ALIGNMENT_RIGHT }
154-
'.text-sm': { font: { fontSize: 14 } }
155-
'.text-white': { color: '#ffffff' }
156-
'.text-xl': { font: { fontSize: 20 } }
157-
'.text-xs': { font: { fontSize: 12 } }
158-
'.vertical': { layout: 'vertical' }
159-
'.w-1/2': { width: '50%' }
160-
'.w-1/3': { width: '33.333333%' }
161-
'.w-1/4': { width: '25%' }
162-
'.w-1/5': { width: '20%' }
159+
'.w-6': { width: 24 }
163160
'.w-10': { width: 40 }
164-
'.w-11/12': { width: '91.666667%' }
165161
'.w-12': { width: 48 }
166162
'.w-16': { width: 64 }
167163
'.w-24': { width: 96 }
168-
'.w-4/5': { width: '80%' }
169164
'.w-56': { width: 224 }
170-
'.w-6': { width: 24 }
171-
'.w-auto': { width: Ti.UI.SIZE }
165+
'.w-1/2': { width: '50%' }
166+
'.w-1/3': { width: '33.333334%' }
167+
'.w-1/4': { width: '25%' }
168+
'.w-1/5': { width: '20%' }
169+
'.w-4/5': { width: '80%' }
170+
'.w-11/12': { width: '91.666667%' }
172171
'.w-full': { width: '100%' }
172+
'.w-auto': { width: Ti.UI.SIZE }
173173
'.w-screen': { width: Ti.UI.FILL }
174174

175+
// Classes with arbitrary values
176+
// Property not yet supported: (111)
177+
// Property not yet supported: (555)
178+
175179
// Default Font Awesome styles
176180
'.fa':{ font: { fontFamily: 'FontAwesome5Free-Solid' } }
177181
'.fa-align-left': { text: '\uf036', title: '\uf036' }

app/views/examples/card.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<View class="h-auto m-3 text-gray-600 vertical">
77
<View class="w-screen h-auto horizontal">
88
<Label class="text-2xl font-thin text-gray-600">Card Content</Label>
9-
<Label class="ml-2 text-sm font-semibold text-gray-500">Nov 3rd, 2019</Label>
9+
<Label class="text-sm font-semibold text-gray-500">May 23rd, 2021</Label>
1010
</View>
1111

1212
<Label class="w-screen font-normal text-gray-500">This is some card content to demonstrate how the cards work.</Label>

app/views/examples/customer.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<View class="mt-3 mb-3 vertical">
77
<Label class="text-xl text-gray-800">Erin Lindford</Label>
88
<Label class="text-base text-purple-500">Customer Support</Label>
9-
<Label class="text-base text-gray-600">[email protected]</Label>
10-
<Label class="text-base text-gray-600">(555) 765-4321</Label>
9+
<Label class="text-sm text-gray-600">[email protected]</Label>
10+
<Label class="text-sm text-gray-600">(555) 765-4321</Label>
1111
</View>
1212
</View>
1313
</ScrollView>

app/views/examples/house.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111

1212
<View class="w-screen h-px bg-gray-300"></View>
1313
<View class="horizontal">
14-
<View class="w-auto h-20 mr-2 horizontal">
15-
<Label class="h-20 text-gray-800 fa fa-bed" />
16-
<Label class="h-20 ml-1 font-bold text-gray-800 ">3 Bedrooms</Label>
14+
<View class="w-auto h-20 mx-2 horizontal">
15+
<Label class="w-auto h-20 text-gray-800 fa fa-bed" />
16+
<Label class="w-auto h-20 ml-1 font-bold text-gray-800 ">3 Bedrooms</Label>
1717
</View>
1818

19-
<View class="w-auto h-20 ml-2 horizontal">
19+
<View class="w-auto h-20 mx-2 horizontal">
2020
<Label class="h-20 text-gray-800 fa fa-bath" />
2121
<Label class="h-20 ml-1 font-bold text-gray-800">2 Bathrooms</Label>
2222
</View>

app/views/examples/nike.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<ScrollView>
33
<View class="mx-10 shadow-lg">
44
<View class="bg-white border-gray-400 rounded-lg vertical clip-enabled">
5-
<View class="mx-4 my-2 vertical ">
5+
<View class="h-auto mx-4 my-2 vertical">
66
<Label class="w-full text-3xl font-bold text-gray-900">NIKE AIR</Label>
77
<Label class="w-full mt-1 text-sm text-gray-600">Lorem ipsum dolor sit amet consectetur adipisicing elit. Modi quos quidem sequi illum facere recusandae voluptatibus</Label>
88
</View>

app/views/examples/shadows.xml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
<Alloy>
2-
<ScrollView>
2+
<ScrollView class="bg-blue-900">
33
<View class="horizontal">
4-
<View class="w-16 h-16 m-4 bg-blue-500 shadow-xs"></View>
5-
<View class="w-16 h-16 m-4 bg-blue-500 shadow-sm"></View>
6-
<View class="w-16 h-16 m-4 bg-blue-500 shadow"></View>
7-
<View class="w-16 h-16 m-4 bg-blue-500 shadow-md"></View>
8-
<View class="w-16 h-16 m-4 bg-blue-500 shadow-lg"></View>
9-
<View class="w-16 h-16 m-4 bg-blue-500 shadow-xl"></View>
10-
<View class="w-16 h-16 m-4 bg-blue-500 shadow-2xl"></View>
11-
<View class="w-16 h-16 m-4 bg-blue-500 shadow-inner"></View>
12-
<View class="w-16 h-16 m-4 bg-blue-500 shadow-outline"></View>
13-
<View class="w-16 h-16 m-4 bg-blue-500 shadow-none"></View>
4+
<View class="w-16 h-16 mx-6 my-10 bg-blue-500 shadow-xs" />
5+
<View class="w-16 h-16 mx-6 my-10 bg-blue-500 shadow-sm" />
6+
<View class="w-16 h-16 mx-6 my-10 bg-blue-500 shadow" />
7+
<View class="w-16 h-16 mx-6 my-10 bg-blue-500 shadow-md" />
8+
<View class="w-16 h-16 mx-6 my-10 bg-blue-500 shadow-lg" />
9+
<View class="w-16 h-16 mx-6 my-10 bg-blue-500 shadow-xl" />
10+
<View class="w-16 h-16 mx-6 my-10 bg-blue-500 shadow-2xl" />
11+
<View class="w-16 h-16 mx-6 my-10 bg-blue-500 shadow-inner" />
12+
<View class="w-16 h-16 mx-6 my-10 bg-blue-500 shadow-outline" />
1413
</View>
1514
</ScrollView>
1615
</Alloy>

app/views/index.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Alloy>
22
<NavigationWindow id="navWindow">
33
<Window title="tailwind tss">
4-
<ScrollableView class="bg-white" showPagingControl="true" pagingControlColor="#cecece">
4+
<ScrollableView class="w-full h-full bg-white" cacheSize="9" showPagingControl="true" pagingControlColor="#cecece">
55
<Require src="examples/nike" />
66

77
<Require src="examples/register" />

package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)