feat: support tw-shadow variable by lekhmanrus · Pull Request #128 · NativeScript/tailwind · GitHub
Skip to content

feat: support tw-shadow variable#128

Open
lekhmanrus wants to merge 1 commit intoNativeScript:mainfrom
lekhmanrus:support-tw-shadow
Open

feat: support tw-shadow variable#128
lekhmanrus wants to merge 1 commit intoNativeScript:mainfrom
lekhmanrus:support-tw-shadow

Conversation

@lekhmanrus
Copy link
Copy Markdown
Contributor

Because the shadow is supported, the --tw-shadow variable has to be supported as well.

@cla-bot cla-bot Bot added the cla: yes label Mar 11, 2022
@rigor789
Copy link
Copy Markdown
Member

@lekhmanrus
Copy link
Copy Markdown
Contributor Author

The reason for this PR was that tailwind .shadow classes throw such errors like:

JS: Error: Failed to apply property [box-shadow] with value [0 0 #0000, 0 0 #0000, unset] to CardView(271). Error: Invalid color: unset
JS:     at new Color (file: src\webpack:\sc\node_modules\@nativescript\core\color\color-common.js:33:0)
JS:     at new Color (file: src\webpack:\sc\node_modules\@nativescript\core\color\index.android.js:2:7)
JS:     at parseCSSShadow (file: src\webpack:\sc\node_modules\@nativescript\core\ui\styling\css-shadow.js:56:0)
JS:     at valueConverter (file: src\webpack:\sc\node_modules\@nativescript\core\ui\styling\style-properties.js:1133:29)
JS:     at Style.setCssValue [as css:box-shadow] (file: src\webpack:\sc\node_modules\@nativescript\core\ui\core\properties\index.js:573:0)     
JS:     at CssState.setPropertyValues (file: src\webpack:\sc\node_modules\@nativescript\core\ui\styling\style-scope.js:540:47)
JS:     at file: src\webpack:\sc\node_modules\@nativescript\core\ui\styling\style-scope.js:428:0
JS:     at CardView._batchUpdate (file: src\webpack:\sc\node_modules\@nativescript\core\ui\core\view-base\index.js:286:0)

Because --tw-shadow is unset.

@rigor789
Copy link
Copy Markdown
Member

@lekhmanrus right, but I don't think it would work with this PR either - need to test a bit more... You can try as well - pack @nativescript/tailwind locally and try it npm i && npm pack after cloning should be all to produce a tgz file you can install into your project.

@lekhmanrus
Copy link
Copy Markdown
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants