Skip to content

Removing properties in the typography preset #5091

@svmrw

Description

@svmrw

Clear and concise description of the problem

I can't remove some properties from the final CSS that I don't need from the typography preset.
Tailwind CSS has this capability. I haven't checked in version 4, but in version 3 it could be done like this:

typography: {
    DEFAULT: {
        css: {
            'code': null,
            'code::before': null,
            'code::after': null,
        }
    },
},

I tried removing the CSS properties using the following methods:

presetTypography({
    cssExtend: {
        'code': null, // It doesn't delete it. It only sets the value to null.
        'code': {}, // Either it doesn't delete it, or it sets the value to [Object object].
        'max-width': {}, // This method worked for `max-width` and it was removed.
    },
}),

Suggested solution

Provide the option to completely remove the CSS code from typography to save on file size (albeit a small amount).

Alternative

Perhaps I misunderstood something, but I've tried many things and couldn't find a solution.
I would appreciate it if you could tell me what I need to do.
Thank you.

Additional context

No response

Validations

  • Read the Contributing Guidelines.
  • Read the README.md of using the package.
  • Already used the Interactive Docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions