Skip to content

CSS classes exist twice: with and without antd-prefix #121

Closed

Description

@mic-web

Reproduce:

Result:

This demonstrates that the mll-ant prefix works (mll-ant-btn applies), but it doesn't prevent the generation of the default classes (like ant-btn) -> ant-btn and mll-ant-btn-Styles exist

image

Expectation:

With a prefix being defined in antd.less, only classes with this prefix should be generated and being injected with this library.

Activity

  1. spawnia commented on Oct 30, 2026

    @spawnia
    Member

    Fixed in 21.0.1 by #338.

    The unprefixed classes came from Grid and DatePicker. They imported antd's per-component styles (antd/es/grid/style/index and antd/es/date-picker/style/index), and those compiled without the @ant-prefix: mll-ant of src/antd.less. Both imports are gone, so esm/index.css and Storybook now carry only mll-ant- rules. The exceptions are six selectors that antd/dist/antd.less hardcodes itself: .ant-divider-inner-text and .ant-motion-collapse*.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions