Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to V4 #61

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Upgrade to V4 #61

wants to merge 6 commits into from

Conversation

davidpiesse
Copy link
Owner

An initial version of Toggle for Nova V4.

@davidpiesse davidpiesse mentioned this pull request Jul 21, 2022
@hoczeus
Copy link

hoczeus commented Jul 30, 2022

Feedback: The toggle without more options runs pretty well.
Options like ->editableIndex() or ->falseColor('#bacad6') gets Errors

@muhammadsaeedparacha
Copy link

Bump

composer.json Show resolved Hide resolved
@davidpiesse davidpiesse changed the title Upgarde to V4 Upgrade to V4 Oct 3, 2022
@VGirol
Copy link

VGirol commented Oct 3, 2022

When using nova-toggle with Nova 4, there is a bug : in each create form, the save buttons are not well displayed.
When inspecting the html elements, we can see that the css rules provided by the last version of this package conflict with the rules provided by Nova. The background color provided by Nova css class :
.bg-primary-500 { background-color: rgba(var(--colors-primary-500)); }
is overwritten by a rule provided by nova-toggle.css :
[type=button], [type=reset], [type=submit], button { -webkit-appearance: button; background-color: transparent; background-image: none; }
I think there is no need to export a css file with only the tailwind presets.

@VGirol
Copy link

VGirol commented Oct 15, 2022

In the dist/css/field.css file, you can safely remove all selectors that don't begin with tw-.
To do so, you could use the postcss-purgecss-laravel package and modify the webpack.mix.js file as below :

.postCss('resources/sass/app.css', 'public/css', [ require('tailwindcss')(), require('postcss-purgecss-laravel')({ safelist: { greedy: [/^tw-/] } }), ])
I haven't tested it, but I think it might work.

@VGirol
Copy link

VGirol commented Feb 4, 2023

Ok,
Disregard my two previous comments : after upgrading to the latest commit, everything is ok.
I'm sorry for the inconvenience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants