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

Is there any way to not load the styles ? #93

Closed
marcosschroh opened this issue Aug 5, 2019 · 6 comments
Closed

Is there any way to not load the styles ? #93

marcosschroh opened this issue Aug 5, 2019 · 6 comments
Milestone

Comments

@marcosschroh
Copy link

Hi,

I would like to load this library without the styling, is this possible?

@ukrbublik
Copy link
Owner

You mean without using antd styles at all?

@marcosschroh
Copy link
Author

yes

@ukrbublik
Copy link
Owner

Well, it was designed to use advantages of antd's components (and thus loading its styles is required).

Stripping styles is possible however, but I don't have time for this.
(PR is welcome)

@marcosschroh
Copy link
Author

marcosschroh commented Aug 7, 2019

Ok, thanks for the reply @ukrbublik . I will try to make some time for a PR.

@bandersen22000
Copy link
Contributor

I had the same problem. Based on the following link I did the following to solve the problem:

  1. Fork the repo(awsome-query-builder)
  2. Open file .babelrc and set style: false
  3. Build a new package
  4. Include the new package in your own solution and then add the individual stylings needed for Antd and query builder in your own solution:
    `@import "~antd/lib/select/style/index.css";
    @import "~antd/lib/grid/style/index.css";
    @import "~antd/lib/switch/style/index.css";
    @import "~antd/lib/icon/style/index.css";
    @import "~antd/lib/dropdown/style/index.css";
    @import "~antd/lib/date-picker/style/index.css";
    @import "~antd/lib/input-number/style/index.css";

@import "~antd/lib/input-number/style/index.css";`

  1. When you then run your own solution you will have an ugly query builder, that you can style on your own and the rest of your solution will not be affected by the Antd styling.

Thanks to @ukrbublik for sending the link.

@ukrbublik ukrbublik added the css label Nov 3, 2019
@ukrbublik ukrbublik pinned this issue Nov 3, 2019
@ukrbublik ukrbublik added this to the M1 milestone Nov 3, 2019
ukrbublik added a commit that referenced this issue Nov 17, 2019
@ukrbublik ukrbublik unpinned this issue Nov 23, 2019
@ukrbublik
Copy link
Owner

See latest version: import 'react-awesome-query-builder/css/antd.less';
Now antd styles are not loaded at all by default

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

No branches or pull requests

3 participants