Skip to content

Commit 09ff83f

Browse files
committed
fix: correct tailwind installation
1 parent 8e0dcd3 commit 09ff83f

File tree

3 files changed

+41
-9
lines changed

3 files changed

+41
-9
lines changed

apps/nativescript-demo-ng/.gitignore

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@ hooks/
33
node_modules/
44
platforms/
55

6-
# NativeScript Template
7-
*.js.map
8-
*.js
9-
!webpack.config.js
10-
!ngcc.config.js
11-
126
# Logs
137
logs
148
*.log

apps/nativescript-demo-ng/src/app/item2/item-detail2.component.html

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,19 @@
88
<Button text="GO BACK!" (tap)="goBack()"></Button>
99
</FlexboxLayout> -->
1010

11-
<GridLayout class="page" rows="auto,*" class="p-2">
11+
<GridLayout rows="auto,*" class="p-2">
1212
<!-- <Label marginTop="20" fontSize="18" textAlignment="center" [text]="item.name"></Label> -->
1313
<GridLayout row="1" rows="auto,auto" columns="">
14-
<Label text="Congrats to the Angular Team!" textWrap="true" class="text-center mt-5 font-bold text-3xl text-blue-500"></Label>
15-
<Label row="1" text="👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏" textWrap="true" class="text-blue-500 text-center mt-5 text-3xl"></Label>
14+
<Label
15+
text="Congrats to the Angular Team!"
16+
textWrap="true"
17+
class="text-center mt-5 font-bold text-3xl text-blue-500"
18+
></Label>
19+
<Label
20+
row="1"
21+
text="👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏"
22+
textWrap="true"
23+
class="text-blue-500 text-center mt-5 text-3xl"
24+
></Label>
1625
</GridLayout>
1726
</GridLayout>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// tailwind.config.js
2+
const plugin = require('tailwindcss/plugin');
3+
4+
/** @type {import('tailwindcss').Config} */
5+
module.exports = {
6+
content: ['./app/**/*.{css,xml,html,vue,svelte,ts,tsx}'],
7+
// use the .ns-dark class to control dark mode (applied by NativeScript) - since 'media' (default) is not supported.
8+
darkMode: ['class', '.ns-dark'],
9+
theme: {
10+
extend: {},
11+
},
12+
plugins: [
13+
/**
14+
* A simple inline plugin that adds the ios: and android: variants
15+
*
16+
* Example usage:
17+
*
18+
* <Label class="android:text-red-500 ios:text-blue-500" />
19+
*
20+
*/
21+
plugin(function ({ addVariant }) {
22+
addVariant('android', '.ns-android &');
23+
addVariant('ios', '.ns-ios &');
24+
}),
25+
],
26+
corePlugins: {
27+
preflight: false, // disables browser-specific resets
28+
},
29+
};

0 commit comments

Comments
 (0)