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

How to change border radius of autocomplete? #17422

Open
LukaMajcenic opened this issue Jan 17, 2025 · 0 comments
Open

How to change border radius of autocomplete? #17422

LukaMajcenic opened this issue Jan 17, 2025 · 0 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@LukaMajcenic
Copy link

From the docs

The design tokens of a specific component is defined at components layer. Overriding components tokens is not the recommended approach if you are building your own style, building your own preset should be preferred instead.

Design tokens can be scoped to a certain component using the dt property.

This approach is recommended over the ::ng-deep as it offers a cleaner API while avoiding the hassle of CSS rule overrides.

My autocomplete dt:

autocompleteDt = {
      root: {
          borderRadius: "{border.radius.xl}"
      },
      overlay: {
          borderRadius: "{border.radius.xl}"
      },
      option: {
          borderRadius: "{border.radius.xl}"
      },
      dropdown: {
          borderRadius: "{border.radius.xl}"
      }
  };

This changes the dropdown border radius, but the border radius for the input itself is defined in inputtext.root.borderRadius.

@github-actions github-actions bot added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

1 participant